|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
Public Interface of the Rooms API
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);
| Field Summary | |
static java.lang.String |
KM_SERVICE_ID
The name of the KM Service - for use in other applications |
static java.lang.String |
PORTAL_SERVICE_ID
The name of the Portal Service - for use in other applications |
| Method Summary | |
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. |
com.sap.ip.collaboration.room.api.template.IRoomRole |
createRoomRole(java.lang.String roleName,
java.lang.String roleDescription)
Creates a new instance of IRoomRole |
IRoomUsers |
createRoomUsersObject()
Get an empty instance of IRoomUsers.
|
boolean |
deleteRoom(java.lang.String id)
Delete the room with the given id |
boolean |
existsRoom(java.lang.String id)
Check if a room with certain room id exists |
boolean |
existsRoomTemplate(java.lang.String templateName)
Check if a room template with a given template name exists |
IRoom[] |
getAllRoomsForUser(com.sap.security.api.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). |
java.lang.String[] |
getAvailableRoomTemplateNames()
Get a list of available room template names |
com.sap.ip.collaboration.room.api.template.ITemplate[] |
getAvailableRoomTemplates()
Get a list of available room templates |
com.sap.netweaver.coll.shared.api.extension.IExtensionPoint[] |
getExtensionPoints()
Get a list of all available room extension points |
java.util.Date |
getLastVisit(java.lang.String roomId)
Get the Date when the given room was last visited by any user |
java.util.Date |
getLastVisit(java.lang.String roomId,
java.lang.String userId)
Get the Date when the given user visited the given room last time |
com.sap.ip.collaboration.room.api.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. |
com.sap.ip.collaboration.room.api.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. |
com.sap.ip.collaboration.room.api.relman.IRelationManager |
getRelationManager()
Get an instance of the room relation manager |
IRoom |
getRoom(java.lang.String roomId)
Get a room instance from a room ID |
java.lang.String |
getRoomAccessURLExternal(java.lang.String roomId)
Get an external Access URL for a specific room. |
java.lang.String |
getRoomAccessURLInternal(java.lang.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. |
java.lang.String |
getRoomDescription(java.lang.String roomId)
Get the description of the room with the given room id |
com.sap.ip.collaboration.room.api.IRoomStatusEvent[] |
getRoomEvents(java.lang.String roomId,
long timeStamp,
com.sap.ip.collaboration.room.api.RoomStatusAction[] roomActions,
java.lang.String[] userIds,
int maxResultSize)
Retrieve room events according to the specified search criteria. |
IRoom |
getRoomFromRID(java.lang.String roomRID)
Get a room instance from a room RID |
java.lang.String |
getRoomName(java.lang.String roomId)
Get the name of the room with the given room id |
com.sap.ip.collaboration.room.api.template.IRoomRole[] |
getRoomRolesForUser(java.lang.String roomId,
com.sap.security.api.IUser user)
Get the room roles for a specific user in a specific room |
IRoom[] |
getRoomsForUser(com.sap.security.api.IUser user,
boolean hiddenFlag)
Get only hidden or unhidden rooms a specific user is allowed to enter. |
IRoom[] |
getRoomsWithPrivacy(com.sap.ip.collaboration.room.api.types.RoomPrivacyType type)
Get an Array containing all rooms with a specific privacy (Community, Listed Room, Unlisted Room). |
com.sap.ip.collaboration.room.api.template.ITemplate |
getRoomTemplate(java.lang.String templateName)
Get a room template instance |
com.sap.ip.collaboration.room.api.IRoomUsageUser[] |
getRoomUsage(java.lang.String roomId,
long timeStamp,
int listLength)
Returns data on room usage per user, ordered by the number of visits (most visiting users first). |
boolean |
isRoomLocked(java.lang.String roomId)
Check if a room is locked |
| Field Detail |
public static final java.lang.String KM_SERVICE_ID
public static final java.lang.String PORTAL_SERVICE_ID
| Method Detail |
public IRoomInfo getRoomCreationInfo()
IRoomInfo. With such an instance
you can define and create a new room.createRoom(IRoomInfo, boolean),
IRoomInfopublic IRoomUsers createRoomUsersObject()
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.
public com.sap.ip.collaboration.room.api.template.IRoomRole createRoomRole(java.lang.String roleName,
java.lang.String roleDescription)
roleName - the name of the new room roleroleDescription - the description of the new room role
public java.lang.String[] getAvailableRoomTemplateNames()
throws com.sap.ip.collaboration.room.api.Exceptions.TemplateInstantiationException
TemplateInstantiationException -
public com.sap.ip.collaboration.room.api.template.ITemplate[] getAvailableRoomTemplates()
throws com.sap.ip.collaboration.room.api.Exceptions.TemplateInstantiationException
TemplateInstantiationException -
public boolean existsRoomTemplate(java.lang.String templateName)
throws com.sap.ip.collaboration.room.api.Exceptions.TemplateInstantiationException
templateName - the name of the room templateTemplateInstantiationException -
public com.sap.ip.collaboration.room.api.template.ITemplate getRoomTemplate(java.lang.String templateName)
throws com.sap.ip.collaboration.room.api.Exceptions.TemplateInstantiationException
templateName - the name of the room templateTemplateInstantiationException -
public IRoom 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).
public IRoom getRoom(java.lang.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).
public IRoom getRoomFromRID(java.lang.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).public boolean deleteRoom(java.lang.String id)
id - the id of the room to be deletedpublic IRoom[] getAllRoomsForUser(com.sap.security.api.IUser user)
public IRoom[] getRoomsForUser(com.sap.security.api.IUser user,
boolean hiddenFlag)
user - the userhiddenFlag - the desired status of the rooms:
true for hidden rooms, false for unhidden roomspublic IRoom[] getRoomsWithPrivacy(com.sap.ip.collaboration.room.api.types.RoomPrivacyType type)
type - the wanted RoomPrivacyType
public java.lang.String getRoomAccessURLInternal(java.lang.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).
public java.lang.String getRoomAccessURLExternal(java.lang.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).public boolean existsRoom(java.lang.String id)
id - the id of the room
public boolean isRoomLocked(java.lang.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).
public java.util.Date getLastVisit(java.lang.String roomId,
java.lang.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).
public java.util.Date getLastVisit(java.lang.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).
public java.lang.String getRoomName(java.lang.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).
public java.lang.String getRoomDescription(java.lang.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).public IRoomCategoryFactory getRoomCategoryFactory()
IRoomCategoryFactory.
IRoomCategory objects.
public com.sap.ip.collaboration.room.api.template.IRoomRole[] getRoomRolesForUser(java.lang.String roomId,
com.sap.security.api.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).public com.sap.ip.collaboration.room.api.relman.IRelationManager getRelationManager()
public com.sap.netweaver.coll.shared.api.extension.IExtensionPoint[] getExtensionPoints()
public com.sap.ip.collaboration.room.api.IRoomStatusEvent[] getRoomEvents(java.lang.String roomId,
long timeStamp,
com.sap.ip.collaboration.room.api.RoomStatusAction[] roomActions,
java.lang.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 criteria
public com.sap.ip.collaboration.room.api.IRoomUsageUser[] getRoomUsage(java.lang.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 user
public com.sap.ip.collaboration.room.api.IRoomUsage[] getMostVisitedRooms(int listLength,
long timeStamp)
listLength - length of the list of roomstimeStamp - time since when to start counting visits
public com.sap.ip.collaboration.room.api.IRoomUsage[] getLeastVisitedRooms(int listLength,
long timeStamp)
listLength - length of the list of roomstimeStamp - time since when to start counting visitsIRoomUsage[] usage data per room
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||