public interface IRoom
The Room API contains functionality concerning one single room object whereas the Rooms API provides methods concerning all rooms (searching, creation, instantiation...).
This interface is part of the Room API. It is public to all customers. It provides methods for reading room properties and basic methods for room manipulation.
This interface is used only for existing collaboration rooms. For room
creation please see the description of the Interface IRoomInfo
in the Rooms API.
Modifier and Type | Field and Description |
---|---|
static int |
DTN_ITEM_POS_BOTTOM
This value can be used as a parameter of method
setPosition(String, int)
to move a room part to the bottom of the DTN |
static int |
DTN_ITEM_POS_TOP
This value can be used as a parameter of method
setPosition(String, int)
to move a room part to the top of the DTN |
Modifier and Type | Method and Description |
---|---|
boolean |
addRoomParameter(IRoomParameterValue param)
Set a parameter to the room.
|
IRoomPart |
createAndAddRoomPart(String roompartName,
String roompartTemplate,
boolean removeable,
IRoleMapping[] roleMappings,
IRoomParameterValue[] roompartParameters,
IParameterMapping[] parameterMappings)
Create a new room part instance from a room part template and attach it
to the room
|
IRoomPart |
createRoomPartInstance(String name,
String roomPartTemplate,
IRoleMapping[] roleMappings,
IRoomParameterValue[] parameters,
IParameterMapping[] parameterMappings)
Deprecated.
|
boolean |
deregisterUserFromCommunity(String userId)
Unsubscribe a user from a community.
|
String |
getAdminRoleName()
Get the name of the Admin Role of the room.
|
IRoomRole |
getAdminRoomRole()
Get an instance of the admin room role
|
IRoomParameterValue[] |
getAllInternalParameters()
Get all internal room parameters.
|
String[] |
getAllRoomParameterNames()
Get the parameter names of a room
|
IRoomParameterValue[] |
getAllRoomParameters()
Get the parameters of a room
|
String[] |
getAllRoomRoleNames()
Get the names of all room roles in the room
|
IRoomRole[] |
getAllRoomRoles()
Get all room roles of a room
|
String[] |
getAllRoomUserIds()
Get the ids of all users of this room.
|
com.sapportals.wcm.repository.service.archiving.AOStates |
getArchivingObjectState()
Gets the Archiving Object (AO) state for this room.
|
IRoomCategory[] |
getCategories()
Get the categories of a room
|
Date |
getCreationDate()
Get the creation date of a room
|
String |
getDescription()
Get the description of a room
|
String[] |
getDirectRoomPrincipalSetIds()
Get the ids of all principalSets assigned directly to this room.
|
String[] |
getDirectRoomRolePrincipalSetIds(String roomRoleName)
Get the ids of all principalSets who are a direct member of a specific
room role in this room
|
String[] |
getDirectRoomRoleUserIds(String roomRoleName)
Get the ids of all users who are a direct member of a specific
room role in this room
|
String[] |
getDirectRoomUserIds()
Get the ids of all users assigned directly to this room.
|
String |
getId()
Get the id of a room
|
String |
getInitialRoleName()
Get the name of the Initial Role of the room.
|
IRoomRole |
getInitialRoomRole()
Get an instance of the initial room role
|
IRoomParameterValue |
getInternalParameter(String paramName)
Get a specific internal room parameter
|
Date |
getLastModified()
Get the date of the last modification of a room
|
String |
getName()
Get the name of a room
|
String |
getOwnerId()
Get the owner of a room
|
int |
getPosition(String roomPartId)
Get the actual position of a Room Part in the DTN.
|
RoomPrivacyType |
getPrivacyType()
Get the privacy type of a room.
|
String |
getProperty(String nameSpace,
String propName)
Get the value of a custom property of the room.
|
String |
getRoomAccessURLExternal()
Get an external Access URL for a specific room.
|
String |
getRoomAccessURLInternal()
Get the internal representation of an access URL of a room.
|
IRoomStatusEvent[] |
getRoomEvents(long timeStamp,
RoomStatusAction[] roomActions,
String[] userIds,
int maxResultSize)
Retrieve room events for this room according to the specified search criteria.
|
IRoomGroups |
getRoomGroups()
Get an instance of IRoomGroups which contains the IDs of all User Management Groups
and PrincipalSets related to this room.
|
IRoomInfo |
getRoomInfo()
Get some information describing a room encapsulated in an independent
object.
|
IRoomParameterValue |
getRoomParameter(String paramName)
Get the parameter value of a specific parameter for this room
|
IRoomPart[] |
getRoomParts()
Get all Room Parts contained in this room
|
IRoomPrincipals |
getRoomPrincipals()
Get all users and principalSets who are member of any room role in this room.
|
IRoomRole |
getRoomRole(String roleName)
Get a room role instance for a given role name if such a room role exists
in the current room
|
IRoomRole[] |
getRoomRolesForMember(String memberId)
Get the room roles for a specific user or principalSet in this room (directly and indirectly)
|
IRoomRole[] |
getRoomRolesForUser(String userId)
Deprecated.
use
getRoomRolesForMember(String) instead |
String[] |
getRoomRoleUserIds(String roomRoleName)
Get the ids of all users who are member (directly and indirectly)
of a specific room role in this room
|
String |
getRoomStructureRid()
Get the RID of the room structure folder in CM.
|
IRoomUsageUser[] |
getRoomUsage(long timeStamp,
int listLength)
Returns data on the usage of this per user, ordered by the number of visits (most visiting users first).
|
IRoomUsers |
getRoomUsers()
Deprecated.
use getRoomPrincipals() instead
|
ITemplate |
getTemplate()
Get the room template this room is based on
|
String |
getTemplateDescription()
Get the template description of a room
|
String |
getTemplateName()
Get the template name of a room.
|
int |
getVersion()
Get the technical version number of a room object.
|
boolean |
hasPublicAccess()
Check if there is a public room role in the room which is mapped to at
least one page.
|
boolean |
hasRoomRole(String roomRoleName)
Check if a room role with a given role name exists in the room
|
boolean |
isCommunity()
Check if the room is a community
|
boolean |
isHidden()
Check if the room is hidden
|
boolean |
isListedRoom()
Check if the room is a listed room
|
boolean |
isLocked()
Check if the room is locked
|
boolean |
isMember(String memberId)
Tests whether a specific principal (user or principalSet) has access to this room
|
boolean |
isOIFBased()
Check whether this room should use the OIF (object instance floorplan)
based navigation pattern.
|
boolean |
isPrivacyTypeChangeAllowed()
The room template may define the room privacy type as 'strict' which
means that no changes are allowed.
|
boolean |
isRoomPartRemoveable(String roomPartId)
Check whether a specific room part can be removed in the room maintenance UI or not
|
boolean |
isUnlistedRoom()
Check if the room is a unlisted room
|
boolean |
lock()
Lock the current collaboration room
|
boolean |
registerUserInCommunity(String userId)
Subscribe a user to a community.
|
boolean |
removeAndDeleteRoomPart(String roomPartInstanceId,
boolean overrideRemovalProtection)
Remove a room part instance from the room and delete it
|
boolean |
removeRoomPartInstance(String roomPartInstanceId)
Deprecated.
|
void |
removeRoomRole(String roleName)
Remove a room role from a room.
|
boolean |
requestMembership(String userId)
Request membership for a specific user in a room.
|
boolean |
setCategories(IRoomCategory[] newCategories)
Set the categories of the room.
|
boolean |
setDescription(String description)
Set the description of the room
|
boolean |
setHidden(boolean hiddenFlag)
Set the room hide status
|
boolean |
setName(String name)
Set the name of the room
|
boolean |
setOwnerId(String newOwnerId)
Set the owner of the room
|
boolean |
setOwnerId(String newOwnerId,
boolean persist)
Deprecated.
use setOwnerId(String newOwnerId)
|
int |
setPosition(String roomPartId,
int newPosition)
Set the position of a Room Part in the DTN.
|
boolean |
setPrivacyType(RoomPrivacyType newPrivacy)
Set the privacy type of the room if changing the privacy type is allowed.
|
boolean |
setProperty(String nameSpace,
String propName,
String propValue)
Set a custom property on the room.
|
boolean |
setRoomParameters(IRoomParameterValue[] newParams)
Change the values for one or more room parameters.
|
boolean |
setRoomPrincipals(IRoomPrincipals roomPrincipals,
boolean sendNotifications)
Assign users and principalSets to the room.
|
boolean |
setRoomUsers(IRoomUsers roomUsers,
boolean sendNotifications)
Deprecated.
use setRoomPrincipals(IRoomPrincipals, boolean) instead
|
boolean |
supportsParameterChanges()
Check - depending on the room version - if changing the room parameters
is supported or not
|
boolean |
supportsRootGroup()
Check - depending on the room version - if a root group containing all
room role groups is supported
|
boolean |
unlock()
Unlock the current room
|
static final int DTN_ITEM_POS_TOP
setPosition(String, int)
to move a room part to the top of the DTNstatic final int DTN_ITEM_POS_BOTTOM
setPosition(String, int)
to move a room part to the bottom of the DTNString getId()
IRoomInfo getRoomInfo()
IRoomInfo
object can be used to query the
properties of a room. The IRoomInfo object contains all information
about the room itselbt, but not the portal related stuff (workset, pages, ...)
and also not the content (folders, documents, ...).
Also you can use this info object to copy rooms: Since room creation is
based on the same Interface IRoomInfo
just get this
info object for any existing room, change the properties you want to change
and then create a new collaboration room based on this info object using
the method IRooms.
createRoom(IRoomInfo, boolean)
.
IRoomInfo
IRoomGroups getRoomGroups()
Date getCreationDate()
Date getLastModified()
int getVersion()
RoomVersionException
.
A list of all possible versions is available at class
RoomVersion
boolean isOIFBased()
boolean isHidden()
setHidden(boolean)
boolean setHidden(boolean hiddenFlag)
hiddenFlag
- true means the room will be hidden,
false means the room will be unhiddenboolean isLocked()
boolean lock()
unlock()
,
isLocked()
boolean unlock()
lock()
,
isLocked()
String getName()
boolean setName(String name)
name
- the new name of the roomString getDescription()
boolean setDescription(String description)
description
- the new description of the roomString getRoomAccessURLInternal()
Attention: The returned URL is only useful in the portal environment. This means, it cannot be used as a link in an eMail for example.
String getRoomAccessURLExternal()
Note: External Room links generated by this method only work correctly if the server is configured properly. The correct HTTP Protocol, Servername and Port of the machine need to be configured under Collaboration Administration -> Configure Room Backend.
For links in the portal environment getRoomAccessURLInternal()
should be used because this is not dependent
on the configuration.
String getRoomStructureRid()
boolean hasPublicAccess()
ITemplate getTemplate() throws TemplateInstantiationException
TemplateInstantiationException
- TemplateInstantiationExceptionString getTemplateName()
String getTemplateDescription()
IRoomCategory[] getCategories()
boolean setCategories(IRoomCategory[] newCategories)
You can create new instances of IRoomCategory
using
the IRoomCategoryFactory
which you will get
using the method IRooms.getRoomCategoryFactory()
.
newCategories
- Array containing the new Categories of the roomString getOwnerId()
RoomPrivacyType getPrivacyType()
boolean isPrivacyTypeChangeAllowed()
setPrivacyType(RoomPrivacyType)
boolean setPrivacyType(RoomPrivacyType newPrivacy)
isPrivacyTypeChangeAllowed()
newPrivacy
- the new privacy type of the roomboolean setProperty(String nameSpace, String propName, String propValue)
Custom properties are only maintained by the application which created the property itself. Each application should use its own namespace (prefix) for its own properties to make sure that there are no name clashes with other applications.
nameSpace
- the NameSpace of the application (max. 450 characters)propName
- the name of the custom property (max. 450 characters)propValue
- the value of the custom propertyString getProperty(String nameSpace, String propName)
Custom properties are only maintained by the application which created the property itself. Each application should use its own namespace (prefix) for its own properties to make sure that there are no name clashes with other applications.
nameSpace
- the NameSpace of the applicationpropName
- the name of the custom propertyString[] getAllRoomParameterNames()
IRoomParameterValue[] getAllRoomParameters()
IRoomParameterValue getRoomParameter(String paramName)
paramName
- the name of the parameter to queryIRoomParameterValue
for
the given parameter name of this room objectboolean addRoomParameter(IRoomParameterValue param)
param
- the new parameter of the roomboolean setRoomParameters(IRoomParameterValue[] newParams) throws RoomVersionException
This functionality is only supported by room instances with
version >= RoomVersion.VERSION_60_SP2FP. For earlier versions a
RoomVersionException
is thrown.
To check whether this feature is available or not for the
current version call supportsParameterChanges()
newParams
- a list of parameters to be changedRoomVersionException
- RoomVersionExceptionIRoomParameterValue[] getAllInternalParameters()
These parameters can also be mapped to iView parameters in the room template wizard.
getInternalParameter(String)
IRoomParameterValue getInternalParameter(String paramName)
paramName
- the name of the internal room parametergetAllInternalParameters()
boolean setOwnerId(String newOwnerId)
newOwnerId
- the uniqueID of the new owner for the roomboolean setOwnerId(String newOwnerId, boolean persist)
newOwnerId
- the uniqueID of the new owner for the roompersist
- if false, the new value will not be persisted in the backendIRoomUsers getRoomUsers()
Get all users who are direct member of any room role in this room.
You can also use the returned object to modify the users (invite new users,
change roles of existing users or remove users) and then put the modified
object back into the room using the method setRoomUsers(IRoomUsers, boolean)
. This will commit the changes and the room will
reflect these changes on the user level.
setRoomUsers(IRoomUsers, boolean)
,
IRoomUsers
IRoomPrincipals getRoomPrincipals()
You can also use the returned object to modify the users/principalSets (invite new users/principalSets,
change roles of existing users/principalSets or remove users/principalSets) and then put the modified
object back into the room using the method setRoomPrincipals(IRoomPrincipals, boolean)
. This will commit the changes and the room will
reflect these changes on the user/principalSet level.
setRoomPrincipals(IRoomPrincipals, boolean)
,
IRoomPrincipals
boolean setRoomUsers(IRoomUsers roomUsers, boolean sendNotifications)
Assign users to the room.
You can create a new instance of IRoomUsers
using the
API method IRoomsSystem.createRoomUsersObject()
or you can get an instance of IRoomUsers
from any
existing room using the method getRoomUsers()
. Such
an instance can be used to modify the users (invite new users, change roles
of existing users or remove users) and then put the modified object back
into the room using the method setRoomUsers(IRoomUsers, boolean). This will
commit the changes and the room will reflect these changes on the user level.
Note: Users who have not been member before the method call will get an invitation email. Users who lose their membership as an effect of the call will also be notified via email.
roomUsers
- the object containing the new user-role combinationssendNotifications
- if true invitation emails will be sent to all room
membersgetRoomUsers()
,
setRoomPrincipals(IRoomPrincipals, boolean)
,
IRoomUsers
boolean setRoomPrincipals(IRoomPrincipals roomPrincipals, boolean sendNotifications)
You can create a new instance of IRoomPrincipals
using the
API method IRooms.createRoomPrincipalsObject()
or you can get an instance of IRoomPrincipals
from any
existing room using the method getRoomPrincipals()
. Such
an instance can be used to modify the users/principalSets (invite new users/principalSets, change roles
of existing users/principalSets or remove users/principalSets) and then put the modified object back
into the room using the method setRoomPrincipals(IRoomPrincipals, boolean). This will
commit the changes and the room will reflect these changes on the user/principalSet level.
Note: Users who have not been member before the method call will get an invitation email. Users who lose their membership as an effect of the call will also be notified via email. PrincipalSet members never get email notifications.
roomPrincipals
- the object containing the new user-role/principalSet-role combinationssendNotifications
- if true invitation emails will be sent to all direct room
membersgetRoomPrincipals()
,
IRooms.createRoomPrincipalsObject()
,
IRoomPrincipals
String[] getAllRoomUserIds()
String[] getDirectRoomUserIds()
String[] getDirectRoomPrincipalSetIds()
String[] getRoomRoleUserIds(String roomRoleName)
roomRoleName
- the name of the room roleString[] getDirectRoomRoleUserIds(String roomRoleName)
roomRoleName
- the name of the room roleString[] getDirectRoomRolePrincipalSetIds(String roomRoleName)
roomRoleName
- the name of the room roleboolean isMember(String memberId)
memberId
- the uniqueId of the principal to be testedIRoomRole getRoomRole(String roleName) throws NoSuchRoomRoleException
roleName
- roleNameNoSuchRoomRoleException
- NoSuchRoomRoleExceptionIRoomRole getInitialRoomRole()
IRoomRole getAdminRoomRole()
IRoomRole[] getRoomRolesForUser(String userId)
getRoomRolesForMember(String)
insteaduserId
- the uniqueId of the userIRoomRole
containing all room roles
the given user is member of in this room.IRoomRole[] getRoomRolesForMember(String memberId)
memberId
- the uniqueId of the principal (user or principalSet)IRoomRole
containing all room roles
the given principal is member of in this room (directly and indirectly)boolean hasRoomRole(String roomRoleName)
roomRoleName
- the name of the room roleString[] getAllRoomRoleNames()
IRoomRole[] getAllRoomRoles()
String getInitialRoleName()
String getAdminRoleName()
boolean requestMembership(String userId)
userId
- the uniqueID of the userboolean isCommunity()
boolean isListedRoom()
boolean isUnlistedRoom()
boolean registerUserInCommunity(String userId)
userId
- the uniqueId of the user to be added.boolean deregisterUserFromCommunity(String userId)
userId
- the uniqueId of the user to be removedboolean supportsRootGroup()
boolean supportsParameterChanges()
boolean isRoomPartRemoveable(String roomPartId)
roomPartId
- roomPartIdIRoomPart createAndAddRoomPart(String roompartName, String roompartTemplate, boolean removeable, IRoleMapping[] roleMappings, IRoomParameterValue[] roompartParameters, IParameterMapping[] parameterMappings) throws RoomPartCreationException
roompartName
- the name for the new instanceroompartTemplate
- the name of the room part templateremoveable
- true if the room part should be removeable in the room maintenance UI, false otherwiseroleMappings
- the mappings from room part roles to room rolesroompartParameters
- the external parameters from the roomPartTemplate with valuesparameterMappings
- the parameters from the roomPartTemplate which are mapped to room parametersRoomPartCreationException
- RoomPartCreationExceptionIRoomPart createRoomPartInstance(String name, String roomPartTemplate, IRoleMapping[] roleMappings, IRoomParameterValue[] parameters, IParameterMapping[] parameterMappings) throws RoomPartCreationException
name
- the name for the new instanceroomPartTemplate
- the name of the room part templateroleMappings
- the mappings from room part roles to room rolesparameters
- the external parameters from the roomPartTemplate with valuesparameterMappings
- the parameters from the roomPartTemplate which are mapped to room parametersRoomPartCreationException
- RoomPartCreationExceptionboolean removeAndDeleteRoomPart(String roomPartInstanceId, boolean overrideRemovalProtection)
roomPartInstanceId
- the instance id of the room part to be deletedoverrideRemovalProtection
- true if the room part should be removed also if it is marked as not removeableboolean removeRoomPartInstance(String roomPartInstanceId)
roomPartInstanceId
- the instance id of the room part to be removedIRoomPart[] getRoomParts()
void removeRoomRole(String roleName) throws NoSuchRoomRoleException, RoomException
roleName
- the name of the room roleNoSuchRoomRoleException
- if the room does not have a room role with the provided nameRoomException
- if the room role cannot be removedint getPosition(String roomPartId) throws RoomException
roomPartId
- the id of the Room PartRoomException
- RoomExceptionint setPosition(String roomPartId, int newPosition) throws RoomException
DTN_ITEM_POS_TOP
should be passed
as parameter newPosition.
To set a room part to the last position in the DTN,
DTN_ITEM_POS_BOTTOM
should be passed
as parameter newPosition.
If a Room Part is set to position 50 using this method and
there are only 3 elements in the DTN then 2 (counting starts at 0)
is returned and subsequent calls to getPosition(String)
will also return 2.roomPartId
- the id of the Room PartnewPosition
- the new positionRoomException
- RoomExceptionIRoomStatusEvent[] getRoomEvents(long timeStamp, RoomStatusAction[] roomActions, String[] userIds, int maxResultSize)
timeStamp
- look for events since this time
specify null to get all StatusActionsroomActions
- return only events with the specified RoomStatusAction values,
specify null to get all RoomStatusActionsuserIds
- return only events caused by the specified users, specify null to retrieve events by any usermaxResultSize
- cut the size of the result to this number, use 0 for default of 100IRoomStatusEvent[]
array of events with the specified criteriaIRoomUsageUser[] getRoomUsage(long timeStamp, int listLength)
timeStamp
- time since when to countlistLength
- cut the size of the returned array to this value (in case the room has more users)IRoomUsageUser[]
usage data per usercom.sapportals.wcm.repository.service.archiving.AOStates getArchivingObjectState()
Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-COLL
|
[sap.com] tc/kmc/coll/room
|
api
|
EP-KM-CRS
|
Copyright 2018 SAP AG Complete Copyright Notice