|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | 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 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 |
| 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. |
IRoomRole |
createRoomRole(String roleName,
String roleDescription)
Creates a new instance of IRoomRole |
IRoomUsers |
createRoomUsersObject()
Get an empty instance of IRoomUsers.
|
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). |
String[] |
getAvailableRoomTemplateNames()
Get a list of available room template names |
ITemplate[] |
getAvailableRoomTemplates()
Get a list of available room templates |
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 |
IResourceContext |
getResourceContext(IUser contextUser)
Deprecated. Please do not use anymore because of missing default locale Get a ResourceContext the given user as ContextUser |
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 |
IRoom[] |
getRoomsForUser(IUser user,
boolean hiddenFlag)
Get only hidden or unhidden rooms a specific user is allowed to enter. |
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 |
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). |
boolean |
isRoomLocked(String roomId)
Check if a room is locked |
| Field Detail |
public static final String KM_SERVICE_ID
public static final String PORTAL_SERVICE_ID
| Method Detail |
public IRoomProps getRoomProps()
The room backend properties contain all technical information about the room backend system - such as Namespaces, Resource Types, Resource PropertyNames, Repository RIDs ...
IRoomPropspublic 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 IRoomRole createRoomRole(String roleName,
String roleDescription)
roleName - the name of the new room roleroleDescription - the description of the new room role
public String[] getAvailableRoomTemplateNames()
throws TemplateInstantiationException
TemplateInstantiationException
public ITemplate[] getAvailableRoomTemplates()
throws TemplateInstantiationException
TemplateInstantiationException
public boolean existsRoomTemplate(String templateName)
throws TemplateInstantiationException
templateName - the name of the room template
TemplateInstantiationException
public ITemplate getRoomTemplate(String templateName)
throws TemplateInstantiationException
templateName - the name of the room template
TemplateInstantiationException
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
members
RoomCreationException - 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(String roomId)
throws RoomInstantiationException
roomId - the id of the room to be instantiated
RoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).
public IRoom getRoomFromRID(String roomRID)
throws RoomInstantiationException
roomRID - the RID of the room to be instantiated
RoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).
public void deleteRoom(String id,
boolean sendNotifications)
throws RoomDeletionException,
com.sap.ip.collaboration.core.api.util.exception.IncompleteOperationException
id - the id of the room to be deletedsendNotifications - if true, the users are sent notification mails
RoomDeletionException - if the room cannot be deleted
com.sap.ip.collaboration.core.api.util.exception.IncompleteOperationException - 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.public boolean deleteRoom(String id)
public IRoom[] getAllRoomsForUser(IUser user)
public IRoom[] getRoomsForUser(IUser user,
boolean hiddenFlag)
user - the userhiddenFlag - the desired status of the rooms:
true for hidden rooms, false for unhidden rooms
public IRoom[] getRoomsWithPrivacy(RoomPrivacyType type)
type - the wanted RoomPrivacyType
public String 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 room
RoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).
public 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 room
RoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).public boolean existsRoom(String id)
id - the id of the room
public boolean isRoomLocked(String roomId)
throws RoomInstantiationException
roomId - the id of the room
RoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).
public Date getLastVisit(String roomId,
String userId)
throws RoomInstantiationException
roomId - the id of the roomuserId - the uniqueID of the user
RoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).
public Date getLastVisit(String roomId)
throws RoomInstantiationException
roomId - the id of the room
RoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).
public String getRoomName(String roomId)
throws RoomInstantiationException
roomId - the id of the room to get the name for
RoomInstantiationException - in case of an error in the backend
system. The RoomInstantiationException is a chained exception and contains
the causing error(s).
public String getRoomDescription(String roomId)
throws RoomInstantiationException
roomId - the id of the room to get the description for
RoomInstantiationException - 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 IRoomRole[] getRoomRolesForUser(String roomId,
IUser user)
throws RoomInstantiationException
roomId - the id of the roomuser - the user
IRoomRole 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 IRelationManager getRelationManager()
public IExtensionPoint[] getExtensionPoints()
public 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 100
IRoomStatusEvent[] array of events with the specified criteria
public IRoomUsageUser[] 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 user
public IRoomUsage[] getMostVisitedRooms(int listLength,
long timeStamp)
listLength - length of the list of roomstimeStamp - time since when to start counting visits
public IRoomUsage[] getLeastVisitedRooms(int listLength,
long timeStamp)
listLength - length of the list of roomstimeStamp - time since when to start counting visits
IRoomUsage[] usage data per room
public IResourceContext getResourceContext(IUser contextUser)
throws com.sapportals.portal.security.usermanagement.UserManagementException
contextUser - the EP6 user object
com.sapportals.portal.security.usermanagement.UserManagementException - is thrown if the user can't be converted from old to new IUser interface
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||