Oracle® Collaboration Suite Workspaces API Reference
10g Release 1 (10.1.2)

B25479-01


oracle.workspaces.resource
Class CwResource

java.lang.Object
  extended byoracle.workspaces.resource.CwResource

Direct Known Subclasses:
CwCalendarResource, CwDiscussionResource, CwEmailResource, CwFilesResource, CwViewResource

public abstract class CwResource
extends java.lang.Object

Interface that represents a workspace resource. Each subsystem of CW (files, calendar, etc) will be represented by an instance of this class per workspace. Access control methods are included so that a given resource type can provide the actions necessary in its subsystem when a role is granted or revoked. They are not intended to be exposed to the API user; they will be called internally as needed by a higher-level class.

Since:
release specific (what release of product did this appear in)

Method Summary
abstract CwResourceItem getItemByUid(CwUid uid)
Return the resource item for the given CwUid
CwResourceProperties getProperties()
Returns the resource properties
CwResourceItem[] getRecentActivities()
The default implementation here returns an empty array.
CwResourceStatus getStatus()
No Exception should be thrown from this method.
CwUid getUid()
Returns the UID of the resource.
CwWorkspace getWorkspace()
Returns the workspace this resource belongs to.
abstract CwResourceBulkResponse listItemsByUids(CwUid[] uids)
Return multiple resource items for the given CwUid array.
void storeProperties()
Set the properties for the resource.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getItemByUid

public abstract CwResourceItem getItemByUid(CwUid uid)
                                     throws CwException
Return the resource item for the given CwUid
Throws:
CwException

getProperties

public final CwResourceProperties getProperties()
Returns the resource properties

getRecentActivities

public CwResourceItem[] getRecentActivities()
                                     throws CwException
The default implementation here returns an empty array.
Throws:
CwException

getStatus

public CwResourceStatus getStatus()
No Exception should be thrown from this method. Member resource status actually contains serval aspects: - resource service is up, - resource instance initialized, - user is provisioned for the resource, - and user's data in the resource is consistent. NOTE: We checked the first three at this point, and it is subclasses' responsibility to check data consistency. The resource does not need to check if the member is an actual workspace member.

getUid

public final CwUid getUid()
Returns the UID of the resource.

getWorkspace

public final CwWorkspace getWorkspace()
Returns the workspace this resource belongs to.

listItemsByUids

public abstract CwResourceBulkResponse listItemsByUids(CwUid[] uids)
                                                throws CwException
Return multiple resource items for the given CwUid array. In the returned CwResourceBulkReponse: - getSuccessfulItems() returns an array of CwResourceItems that has been successful retrieved. - getFailedUids() returns an array of CwUid instances that failed to be used to retrieve data. - getFailedExceptions() returns the causes of failures.
Parameters:
uids - UIDs of the resource items to be retrieved.
Throws:
CwException

storeProperties

public void storeProperties()
                     throws CwException
Set the properties for the resource. Note that this method should not cause any side effects (state changes) in the resource object, aside from setting the properties object. If it does, then upon error recovery we could have an in-memory resource object whose state is inconsistent.
Throws:
CwException

Copyright © 2001, 2005, Oracle. All rights reserved.