com.sap.ip.collaboration.room.api

Interface IRoomInfo

All Superinterfaces:
IRoomInfoReader

public interface IRoomInfo
extends IRoomInfoReader

Interface describing a snapshot of a collaboration room

There are two Interfaces describing a collaboration room: IRoom and this one (IRoomInfo). The difference between both is that IRoom represents the persisted room instance itself whereas IRoomInfo is a snapshot of all properties of a room instance in memory. That means: If you call set...() Methods on an instance of IRoom the new value is applied directly to the room. If you call the same set...() Method on an instance of IRoomInfo the new value is set only in memory and doesn't affect any room at all in the first place.

You can obtain an instance of IRoomInfo in two ways:

To create a new room based on an instance of IRoomInfo you have to call the Rooms API method createRoom(IRoomInfo, boolean).

See Also:
IRoom

Method Summary
 boolean addGroupUsersToRole(com.sap.security.api.IGroup group, IRoomRole role, boolean childMembers)
          Assign all users who are member of a given group to a specific room role.
 boolean addGroupUsersToRoles(com.sap.security.api.IGroup group, IRoomRole[] roles, boolean childMembers)
          Assign all users who are member of a given group to a a set of room roles.
 boolean addPrincipalRoles(IRoomPrincipals refPrincipals)
          Copy all user-role assignments and all principalSet-role assignments from an IRoomPrincipals object to this object.
 boolean addPrincipalSetToRole(String principalSetId, IRoomRole role)
          Assign a given principalSet to a specific room role.
 boolean addPrincipalSetToRoles(String principalSetId, IRoomRole[] roles)
          Assign a principalSet to a a set of room roles.
 boolean addRoomParameter(IRoomParameterValue param)
          Add a room parameter
 boolean addRoomParameter(String paramName, String paramDesc, String paramValue, boolean hidden)
          Add a room parameter
 boolean addRoomParameters(IRoomParameterValue[] col)
          Add multiple room parameters
 boolean addUserRoles(IRoomUsers refUsers)
          Copy all user-role assignments from an IRoomUsers object to this object.
 boolean addUserToRole(String userId, IRoomRole role)
          Assign an additional room role to a specific user
 boolean addUserToRoles(String userId, IRoomRole[] roles)
          Assign multiple additional room roles to a specific user
 boolean deleteAllRoomParameters()
          Delete all room parameters
 RoomCreationValidationErrors[] getValidationErrors()
          Get a list of errors ocurring in the consistency validation check.
 boolean removeAllPrincipalSets()
          Remove all principalSets from the collaboration room
 boolean removeAllUsers()
          Remove all user from the collaboration room
 boolean removePrincipalSet(String principalSetId)
          Remove a principalSet from the collaboration room
 boolean removePrincipalSetFromRole(String principalSetId, IRoomRole role)
          Remove a principalSet from a specific room role
 boolean removeUser(String userId)
          Remove a user from the collaboration room
 boolean removeUserFromAllRoles(String userId)
          Remove a user from all room roles.
 boolean removeUserFromRole(String userId, IRoomRole role)
          Remove a user from a specific room role
 boolean setCategories(IRoomCategory[] newCategories)
          Set the categories of the collaboration room You can create new instances of IRoomCategory using the IRoomCategoryFactory which you will get using the method IRooms.getRoomCategoryFactory().
 boolean setDescription(String newDescription)
          Set the description of the room
 boolean setName(String newName)
          Set the name of the room
 boolean setOwnerId(String newOwnerId)
          Set the owner of the room
 boolean setPrivacy(RoomPrivacyType newPrivacy)
          Set the privacy type of the room
 boolean setTemplateName(String newTemplateName)
          Set the template name of the room
 boolean validate()
          Validate all entered data.
 
Methods inherited from interface com.sap.ip.collaboration.room.api.IRoomInfoReader
getAdminRoleName, getAllRoomParameterNames, getAllRoomParameters, getAllRoomPrincipalSetIds, getAllRoomUserIds, getCategories, getDescription, getId, getInitialRoleName, getName, getOwnerId, getPrincipalSetRoles, getPrivacy, getRoomGroups, getRoomParameter, getRoomPrincipals, getRoomUsers, getStructureRid, getTemplateDescription, getTemplateName, getUserRoles, hasPublicRole, isOIFBased
 

Method Detail

validate

boolean validate()
Validate all entered data.

When creating a new collaboration room based on an instance of IRoomInfo there are some consistency checks required. This method checks for missing or inconsistent data in the fields of the instance. This check is done by the system automatically when the createRoom(IRoomInfo, boolean) method is called. And if the check fails the room is not created.

To avoid this situation the validate() method may be called manually prior to the room creation.

Returns:
true if all constraints are fulfilled - false otherwise. In case the return value is false you may call getValidationErrors() to get a List of the actual Errors that have ocurred during the check.

getValidationErrors

RoomCreationValidationErrors[] getValidationErrors()
Get a list of errors ocurring in the consistency validation check.

Returns:
Array containing all validation errors

setName

boolean setName(String newName)
Set the name of the room

Parameters:
newName - the new name for the room
Returns:
true if successful, false otherwise

setDescription

boolean setDescription(String newDescription)
Set the description of the room

Parameters:
newDescription - the new description for the room
Returns:
true if successful, false otherwise

setTemplateName

boolean setTemplateName(String newTemplateName)
Set the template name of the room

Parameters:
newTemplateName - the name of the new template for the room
Returns:
true if successful, false otherwise

setCategories

boolean setCategories(IRoomCategory[] newCategories)
Set the categories of the collaboration room

You can create new instances of IRoomCategory using the IRoomCategoryFactory which you will get using the method IRooms.getRoomCategoryFactory().

Parameters:
newCategories - Array containing the new categories for the room
Returns:
true if successful, false otherwise

setOwnerId

boolean setOwnerId(String newOwnerId)
Set the owner of the room

Parameters:
newOwnerId - the uniqueID of the new owner for the room
Returns:
true if successful, false otherwise

setPrivacy

boolean setPrivacy(RoomPrivacyType newPrivacy)
Set the privacy type of the room

Parameters:
newPrivacyType - the new privacy type of the room
Returns:
true if successful, false otherwise

deleteAllRoomParameters

boolean deleteAllRoomParameters()
Delete all room parameters

Returns:
true if successful, false otherwise

addRoomParameter

boolean addRoomParameter(IRoomParameterValue param)
Add a room parameter

Parameters:
param - the new parameter
Returns:
true if successful, false otherwise

addRoomParameter

boolean addRoomParameter(String paramName,
                         String paramDesc,
                         String paramValue,
                         boolean hidden)
Add a room parameter

Parameters:
paramName - the name of the new parameter
paramDesc - the description of the new parameter
paramValue - the value of the new parameter
hidden - hidden flag for the new parameter
Returns:
true if successful, false otherwise

addRoomParameters

boolean addRoomParameters(IRoomParameterValue[] col)
Add multiple room parameters

Parameters:
col - Array containing the new parameters
Returns:
true if successful, false otherwise

addUserToRole

boolean addUserToRole(String userId,
                      IRoomRole role)
Assign an additional room role to a specific user

Parameters:
userId - the uniqueID of the user
role - the new room role the user should be assigned to
Returns:
true if successful, false otherwise

addUserToRoles

boolean addUserToRoles(String userId,
                       IRoomRole[] roles)
Assign multiple additional room roles to a specific user

Parameters:
userId - the uniqueID of the user
roles - Array containing the new room roles the user should be assigned to
Returns:
true if successful, false otherwise

addGroupUsersToRole

boolean addGroupUsersToRole(com.sap.security.api.IGroup group,
                            IRoomRole role,
                            boolean childMembers)
Assign all users who are member of a given group to a specific room role. Not the group itself, but its members are assigned to the role. This means if the group is changed later (e.g. new members are invited), this doesn't affect the room role. With the flag childMembers=false only the direct members of the group are assigned. childMembers=true means that also members of sub groups (recursively) are assigned to the room role. If one or more of the group members was already assigned to the given role before the call, this is not an error.

Parameters:
group - the user group
role - the role object
childMembers - false means only direct members of the group are assigned
Returns:
true if the assignment was successful, false otherwise

addPrincipalSetToRole

boolean addPrincipalSetToRole(String principalSetId,
                              IRoomRole role)
Assign a given principalSet to a specific room role. This means if the principalSet is changed later (e.g. new members are invited), this will affect the room role.

Parameters:
principalSetId - the uniqueID of the principalSet
role - the role object
Returns:
true if the assignment was successful, false otherwise

addGroupUsersToRoles

boolean addGroupUsersToRoles(com.sap.security.api.IGroup group,
                             IRoomRole[] roles,
                             boolean childMembers)
Assign all users who are member of a given group to a a set of room roles. Not the group itself, but its members are assigned to the roles. This means if the group is changed later (e.g. new members are invited), this doesn't affect the room roles. With the flag childMembers=false only the direct members of the group are assigned. childMembers=true means that also members of sub groups (recursively) are assigned to the room roles. If one or more of the group members was already assigned to the given roles before the call, this is not an error.

Parameters:
group - the user group
roles - Array containing the roles for the group users
childMembers - false means only direct members of the group are assigned
Returns:
true if the assignment was successful, false otherwise

addPrincipalSetToRoles

boolean addPrincipalSetToRoles(String principalSetId,
                               IRoomRole[] roles)
Assign a principalSet to a a set of room roles. This means if the principalSet is changed later (e.g. new members are invited), this will affect the room roles.

Parameters:
principalSetId - the uniqueID of the principalSet
roles - Array containing the roles for the principalSet
Returns:
true if the assignment was successful, false otherwise

addUserRoles

boolean addUserRoles(IRoomUsers refUsers)
Copy all user-role assignments from an IRoomUsers object to this object. Previously existing assignments on this object are preserved.

Parameters:
refUsers - the IRoomUsers object containing the room-role assignments to be copied

addPrincipalRoles

boolean addPrincipalRoles(IRoomPrincipals refPrincipals)
Copy all user-role assignments and all principalSet-role assignments from an IRoomPrincipals object to this object. Previously existing assignments on this object are preserved.

Parameters:
refPrincipals - the IRoomPrincipals object containing the role assignments to be copied

removeUserFromRole

boolean removeUserFromRole(String userId,
                           IRoomRole role)
Remove a user from a specific room role

Parameters:
userId - the uniqueID of the user
role - the room role to be removed from the user

removePrincipalSetFromRole

boolean removePrincipalSetFromRole(String principalSetId,
                                   IRoomRole role)
Remove a principalSet from a specific room role

Parameters:
principalSetId - the uniqueID of the principalSet
role - the room role to be removed from the principalSet

removeUserFromAllRoles

boolean removeUserFromAllRoles(String userId)
Remove a user from all room roles.
This call has the same effect than removing the user from the whole room using the method removeUser(String userId).

Parameters:
userId - the uniqueID of the user to be removed

removeUser

boolean removeUser(String userId)
Remove a user from the collaboration room

Parameters:
userId - the uniqueID of the user to be removed

removePrincipalSet

boolean removePrincipalSet(String principalSetId)
Remove a principalSet from the collaboration room

Parameters:
groupId - the uniqueID of the principalSet to be removed

removeAllUsers

boolean removeAllUsers()
Remove all user from the collaboration room


removeAllPrincipalSets

boolean removeAllPrincipalSets()
Remove all principalSets from the collaboration room

Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-COLL [sap.com] tc/kmc/coll/room api EP-KM-CRS


Copyright 2012 SAP AG Complete Copyright Notice