public interface IRooms
The Rooms API provides methods concerning all rooms (searching, creation, instantiation...) whereas the Room API contains functionality concerning one single room object.
This interface is part of the Rooms API. It is public to all customers. It provides basic functionality concerning all rooms, such as room creation and retrieval.
The whole Rooms API (including this Interface) is covered by a KM Service. You can get Access to it using the following code:
import com.sapportals.wcm.service.ServiceFactory; IRooms roomsAPI = (IRooms) ServiceFactory.getInstance().getService(IRooms.KM_SERVICE_ID);The Rooms API (including this Interface) is also covered by a Portal Service. To get Access to the Portal Service you may use the following code:
import com.sapportals.portal.prt.runtime.PortalRuntime; IRooms roomsAPI = (IRooms) PortalRuntime.getRuntimeResources().getService(IRooms.PORTAL_SERVICE_ID);
| Type | Property and Description |
|---|---|
ICustomProperty |
createCustom
Get an new instance of ICustomProperty which is needed to search for rooms using TRex
|
| Modifier and Type | Field and Description |
|---|---|
static String |
KM_SERVICE_ID
The name of the KM Service - for use in other applications
|
static String |
PORTAL_SERVICE_ID
The name of the Portal Service - for use in other applications
|
| Modifier and Type | Method and Description |
|---|---|
ICustomProperty |
createCustomProperty()
Get an new instance of ICustomProperty which is needed to search for rooms using TRex
|
ICustomProperty |
createCustomProperty(String nameSpace,
String name,
String value)
Get an new instance of ICustomProperty which is needed to search for rooms using TRex
|
IRoom |
createRoom(IRoomInfo info,
boolean sendNotifications)
Create a new room
To create a new room you first have to call
getRoomCreationInfo(), fill the info object with properties and then call
the createRoom(IRoomInfo) method. |
IRoomPrincipals |
createRoomPrincipalsObject()
Get an empty instance of
IRoomPrincipals. |
IRoomRole |
createRoomRole(String roleName,
String roleDescription)
Creates a new instance of IRoomRole
|
IRoomUsers |
createRoomUsersObject()
Deprecated.
use createRoomPrincipalsObject() instead
|
boolean |
deleteRoom(String id)
Deprecated.
|
void |
deleteRoom(String id,
boolean sendNotifications)
Delete the room with the given id
|
boolean |
existsRoom(String id)
Check if a room with certain room id exists
|
boolean |
existsRoomTemplate(String templateName)
Check if a room template with a given template name exists
|
IRoom[] |
getAllRoomsForUser(IUser user)
Get an Array containing ALL rooms a specific user is allowed to enter (all
rooms in which the user is member of any room role).
|
com.sapportals.wcm.repository.service.archiving.IArchivingObject |
getArchivingObject(String roomID)
Get the archiving object for a room qualified by a room id.
|
com.sapportals.wcm.repository.service.archiving.IArchivingObject |
getArchivingObjectFromRID(String roomRID)
Get the archiving object for a room qualified by a room rid.
|
com.sapportals.wcm.repository.service.archiving.AOStates |
getArchivingObjectState(String roomID)
Gets the Archiving Object (AO) state for a room qualified by a room id.
|
com.sapportals.wcm.repository.service.archiving.AOStates |
getArchivingObjectStateFromRID(String roomRID)
Gets the Archiving Object (AO) state for a room qualified by a room rid.
|
String[] |
getAvailableRoomTemplateNames()
Get a list of available room template names
|
ITemplate[] |
getAvailableRoomTemplates()
Get a list of available room templates
|
ITemplate |
getCurrentTemplateVersion(String templateBaseName)
Get the newest version of a room template
|
IExtensionPoint[] |
getExtensionPoints()
Get a list of all available room extension points
|
Date |
getLastVisit(String roomId)
Get the Date when the given room was last visited by any user
|
Date |
getLastVisit(String roomId,
String userId)
Get the Date when the given user visited the given room last time
|
IRoomUsage[] |
getLeastVisitedRooms(int listLength,
long timeStamp)
Returns a list of the least visited rooms since the time given by timeStamp,
ordered ascendingly by the number of visits.
|
IRoomUsage[] |
getMostVisitedRooms(int listLength,
long timeStamp)
Returns a list of the most visited rooms since the time given by timeStamp,
ordered descendingly by the number of visits.
|
IRelationManager |
getRelationManager()
Get an instance of the room relation manager
|
IRoom |
getRoom(String roomId)
Get a room instance from a room ID
|
String |
getRoomAccessURLExternal(String roomId)
Get an external Access URL for a specific room.
|
String |
getRoomAccessURLInternal(String roomId)
Get an internal Access URL for a specific room.
|
IRoomCategoryFactory |
getRoomCategoryFactory()
Get an instance of the
IRoomCategoryFactory. |
IRoomInfo |
getRoomCreationInfo()
Get a new instance of
IRoomInfo. |
String |
getRoomDescription(String roomId)
Get the description of the room with the given room id
|
IRoomStatusEvent[] |
getRoomEvents(String roomId,
long timeStamp,
RoomStatusAction[] roomActions,
String[] userIds,
int maxResultSize)
Retrieve room events according to the specified search criteria.
|
IRoom |
getRoomFromRID(String roomRID)
Get a room instance from a room RID
|
String |
getRoomName(String roomId)
Get the name of the room with the given room id
|
IRoomProps |
getRoomProps()
Get all room backend properties
The room backend properties contain all technical information about the
room backend system - such as Namespaces, Resource Types, Resource
PropertyNames, Repository RIDs ...
|
IRoomRole[] |
getRoomRolesForUser(String roomId,
IUser user)
Get the room roles for a specific user in a specific room
|
String |
getRoomSearchURL(String roomId,
com.sapportals.portal.prt.component.IPortalComponentRequest request)
Get the URL of the search iView for searching the content of a specific room
|
IRoom[] |
getRoomsForUser(IUser user,
boolean hiddenFlag)
Get only hidden or unhidden rooms a specific user is allowed to enter.
|
IRoomsSearchFactory |
getRoomsSearchFactory()
Get an instance of the RoomsSearchFactory which is needed to search for rooms using TRex
|
IRoomsStructure |
getRoomsStructure()
Get the Structure API of the rooms
The Structure API is used by search engines, entry point providers and room extensions.
|
IRoom[] |
getRoomsWithPrivacy(RoomPrivacyType type)
Get an Array containing all rooms with a specific privacy (Community,
Listed Room, Unlisted Room).
|
ITemplate |
getRoomTemplate(String templateName)
Get a room template instance
|
IRoomURLGenerator |
getRoomURLGenerator()
Get an instance of IRoomURLGenerator which provides methods to calculate
internal WebDynpro and non-WebDynpro URLs as well as external URLs for rooms
|
IRoomUsageUser[] |
getRoomUsage(String roomId,
long timeStamp,
int listLength)
Returns data on room usage per user, ordered by the number of visits (most visiting users first).
|
IRoomUsageUser[] |
getRoomUsage(String roomId,
long fromTimeStamp,
long toTimeStamp,
int listLength)
Returns data on room usage per user, ordered by the number of visits (most visiting users first).
|
boolean |
getUseTrexSearch()
Get the cobfiguration flag if TRex search should be used to find rooms.
|
IRoomUsage[] |
getVisitedRooms(int listLength,
long timeStamp,
boolean includeMarked,
boolean ascendingOrder)
Returns a list of the rooms visited since the time given by timeStamp,
ordered by the number of visits depending on ascendingOrder parameter.
|
String |
getWriteProtectModeReason()
Get the write protect mode reason
|
boolean |
isOIFBased(String roomId)
Check whether this room should use the OIF (object instance floorplan)
based navigation pattern.
|
boolean |
isRoomLocked(String roomId)
Check if a room is locked
|
boolean |
isWriteProtectModeEnabled()
Get the write protect mode flag.
|
ICustomProperty createCustomProperty
static final String KM_SERVICE_ID
static final String PORTAL_SERVICE_ID
IRoomProps getRoomProps()
The room backend properties contain all technical information about the room backend system - such as Namespaces, Resource Types, Resource PropertyNames, Repository RIDs ...
IRoomPropsIRoomInfo getRoomCreationInfo()
IRoomInfo. With such an instance
you can define and create a new room.createRoom(IRoomInfo, boolean),
IRoomInfoIRoomUsers createRoomUsersObject()
Get an empty instance of IRoomUsers.
You can use such an instance of IRoomUsers to set all user relevant data in
a new or in an existing room.
IRoomUsers containing no users
and no roles.IRoomPrincipals createRoomPrincipalsObject()
IRoomPrincipals.
You can use such an instance of IRoomPrincipals to set all user/group relevant data in
a new or in an existing room.IRoomPrincipals containing no users,
no groups and no roles.IRoomRole createRoomRole(String roleName, String roleDescription)
roleName - the name of the new room roleroleDescription - the description of the new room roleString[] getAvailableRoomTemplateNames() throws TemplateInstantiationException
TemplateInstantiationException - TemplateInstantiationExceptionITemplate[] getAvailableRoomTemplates() throws TemplateInstantiationException
TemplateInstantiationException - TemplateInstantiationExceptionboolean existsRoomTemplate(String templateName) throws TemplateInstantiationException
templateName - the name of the room templateTemplateInstantiationException - TemplateInstantiationExceptionITemplate getRoomTemplate(String templateName) throws TemplateInstantiationException
templateName - the name of the room templateTemplateInstantiationException - TemplateInstantiationExceptionITemplate getCurrentTemplateVersion(String templateBaseName) throws TemplateInstantiationException
templateBaseName - the name of the room templateTemplateInstantiationException - TemplateInstantiationExceptionIRoom createRoom(IRoomInfo info, boolean sendNotifications) throws RoomCreationException
To create a new room you first have to call getRoomCreationInfo(), fill the info object with properties and then call
the createRoom(IRoomInfo) method.
info - the room info object describing the room to be createdsendNotifications - if true invitation emails will be sent to all room
membersRoomCreationException - in case of any error. If the exception is
thrown the room is not created in the backend system. The exception
contains more info about the error cause (chained exception).IRoom getRoom(String roomId) throws RoomInstantiationException
roomId - the id of the room to be instantiatedRoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).IRoom getRoomFromRID(String roomRID) throws RoomInstantiationException
roomRID - the RID of the room to be instantiatedRoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).void deleteRoom(String id, boolean sendNotifications) throws RoomDeletionException, IncompleteOperationException
id - the id of the room to be deletedsendNotifications - if true, the users are sent notification mailsRoomDeletionException - if the room cannot be deletedIncompleteOperationException - if the room has been deleted with
errors. In this case a cleanup function is activated after the deletion.
It is not guaranteed (but possible) that all parts of the room have been
deleted.boolean deleteRoom(String id)
id - idIRoom[] getAllRoomsForUser(IUser user)
user - userIRoom[] getRoomsForUser(IUser user, boolean hiddenFlag)
user - the userhiddenFlag - the desired status of the rooms:
true for hidden rooms, false for unhidden roomsIRoom[] getRoomsWithPrivacy(RoomPrivacyType type)
type - the wanted RoomPrivacyTypeString getRoomAccessURLInternal(String roomId) throws RoomInstantiationException
Attention: The internal Access URL cannot be used in an email or
anywhere else outside the portal. The link will not work in such an
environment. In this case you have to use getRoomAccessURLExternal(String)
roomId - the id of the roomRoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).String getRoomAccessURLExternal(String roomId) throws RoomInstantiationException
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.
Note: For links in the portal environment getRoomAccessURLInternal(String) should be used because this is not dependent
on the configuration.
roomId - the id of the roomRoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).boolean existsRoom(String id)
id - the id of the roomboolean isRoomLocked(String roomId) throws RoomInstantiationException
roomId - the id of the roomRoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).Date getLastVisit(String roomId, String userId) throws RoomInstantiationException
roomId - the id of the roomuserId - the uniqueID of the userRoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).Date getLastVisit(String roomId) throws RoomInstantiationException
roomId - the id of the roomRoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).boolean isOIFBased(String roomId) throws RoomInstantiationException
roomId - the id of the roomRoomInstantiationException - RoomInstantiationExceptionString getRoomName(String roomId) throws RoomInstantiationException
roomId - the id of the room to get the name forRoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).String getRoomDescription(String roomId) throws RoomInstantiationException
roomId - the id of the room to get the description forRoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).IRoomCategoryFactory getRoomCategoryFactory()
IRoomCategoryFactory.
IRoomCategory objects.IRoomRole[] getRoomRolesForUser(String roomId, IUser user) throws RoomInstantiationException
roomId - the id of the roomuser - the userIRoomRole containing all room roles
the given user is member of in this room.RoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).IRelationManager getRelationManager()
IExtensionPoint[] getExtensionPoints()
IRoomStatusEvent[] getRoomEvents(String roomId, long timeStamp, RoomStatusAction[] roomActions, String[] userIds, int maxResultSize)
roomId - id of the roomtimeStamp - 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(String roomId, long timeStamp, int listLength)
roomId - the room idtimeStamp - 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 userIRoomUsageUser[] getRoomUsage(String roomId, long fromTimeStamp, long toTimeStamp, int listLength)
roomId - the room idfromTimeStamp - time since when to counttoTimeStamp - time until when to countlistLength - cut the size of the returned array to this value (in case the room has more users)IRoomUsageUser[] usage data per userIRoomUsage[] getMostVisitedRooms(int listLength, long timeStamp)
listLength - length of the list of roomstimeStamp - time since when to start counting visitsIRoomUsage[] getLeastVisitedRooms(int listLength, long timeStamp)
listLength - length of the list of roomstimeStamp - time since when to start counting visitsIRoomUsage[] usage data per roomIRoomUsage[] getVisitedRooms(int listLength, long timeStamp, boolean includeMarked, boolean ascendingOrder)
listLength - length of the list of roomstimeStamp - time since when to start counting visitsincludeMarked - true to include all rooms in the result, false to exclude rooms marked for archivingascendingOrder - sort order of the result list (true for ascending, false for descending)IRoomUsage[] usage data per roomboolean getUseTrexSearch()
IRoomsSearchFactory getRoomsSearchFactory()
ICustomProperty createCustomProperty(String nameSpace, String name, String value)
nameSpace - nameSpacename - namevalue - valueICustomProperty createCustomProperty()
IRoomsStructure getRoomsStructure()
The Structure API is used by search engines, entry point providers and room extensions. It provides information about e.g. which folders belong to a room or to which room a resource belongs.
IRoomsStructureString getRoomSearchURL(String roomId, com.sapportals.portal.prt.component.IPortalComponentRequest request)
roomId - the id of the room to be searchedrequest - a request object is necessary to calculate the URLboolean isWriteProtectModeEnabled()
String getWriteProtectModeReason()
IRoomURLGenerator getRoomURLGenerator()
com.sapportals.wcm.repository.service.archiving.IArchivingObject getArchivingObjectFromRID(String roomRID)
roomRID - the RID of the main resource of the roomcom.sapportals.wcm.repository.service.archiving.IArchivingObject getArchivingObject(String roomID)
roomID - the id of the roomcom.sapportals.wcm.repository.service.archiving.AOStates getArchivingObjectState(String roomID)
roomID - the id of the roomcom.sapportals.wcm.repository.service.archiving.AOStates getArchivingObjectStateFromRID(String roomRID)
roomRID - the RID of the main resource of the room| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] KMC-COLL
|
[sap.com] tc/kmc/coll/room
|
api
|
EP-KM-CRS
|
Copyright 2021 SAP SE Complete Copyright Notice