|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.object.LighthouseContextWrapper
An abstract class that may be extended by a class that wishes to implement the LighthouseContext interface, but which proxies most of the methods to another LighthouseContext object. Convenient for classes that extend LighthouseContext to provide additional methods (for example ViewMaster, and TaskContext).
Field Summary | |
LighthouseContext |
_context
The context we wrap. |
Fields inherited from interface com.waveset.object.LighthouseContext |
COMP_ACCESS_POLICY, COMP_AUTH_CACHE, COMP_LOGIN_CONFIG_INFO, COMP_PROVISIONER, COMP_RECONCILER, COMP_REPOSITORY, COMP_SUBJECT_AUTH_CACHE, COMP_TASK_MANAGER, COMP_WORKFLOW, OP_CACHE, OP_CACHE_TIMEOUT, OP_CLEAR_CACHE, OP_NO_RESULT |
Fields inherited from interface com.waveset.object.ObjectSource |
HIGH_VALUES, OP_ALLOW_NOT_FOUND, OP_ATTRIBUTES, OP_BLOCK_SIZE, OP_BUFFERED, OP_CONDITIONS, OP_END_BEFORE, OP_FAST, OP_FILTER, OP_FORCE, OP_KEEP_LOCK, OP_MAX_ROWS, OP_NO_CACHE, OP_NO_RULE_DRIVEN_MEMBERS, OP_ONLY_NAMES, OP_ORDER_BY, OP_START_AFTER, OP_SUBJECT, OP_SUBTYPES, OP_USER |
Constructor Summary | |
LighthouseContextWrapper()
|
|
LighthouseContextWrapper(LighthouseContext context)
|
Method Summary | |
boolean |
breakLock(java.lang.Object type,
java.lang.String id,
java.util.Map options)
Break a lock held on an object. |
java.lang.Object |
callResourceMethod(java.lang.String resourceId,
java.lang.String methodName,
java.util.Map args)
Call a resource adapter specific method. |
WavesetResult |
checkinObject(PersistentObject obj,
java.util.Map options)
Store changes to an object and release the logical lock. |
WavesetResult |
checkinView(GenericObject view,
java.util.Map options)
Checkin a view. |
PersistentObject |
checkoutObject(java.lang.Object type,
java.lang.String id,
java.util.Map options)
Checkout a persistent object for editing. |
GenericObject |
checkoutView(java.lang.String id,
java.util.Map options)
Checkout a view. |
void |
checkPermission(PersistentObject obj,
Right right)
Check permissions for the curent subject against the given object and right. |
void |
checkPermission(Type type,
Right right)
Check permissions for the current subject, against the given type and right. |
void |
checkPermissionToAnyAuthTypeSubType(Type type,
Right right)
Check permissions for the given subject, against the given type or any of its authtype subtypes and right. |
void |
checkReferencePermissions(PersistentObject obj)
Check connect/disconnect permissions to objects referenced by another object. |
void |
clearResourceObjectGetCache(java.util.Map options)
Clear specified resource object lists from the cache |
void |
clearResourceObjectGetCache(java.lang.String subjectName,
java.lang.String objectType,
java.lang.String resourceId)
Clear all resource object lists from the cache for all users including default |
void |
clearResourceObjectListCache(java.util.Map options)
Clear specified resource object lists from the cache |
void |
clearResourceObjectListCache(java.lang.String subjectName,
java.lang.String objectType,
java.lang.String resourceId)
Clear all resource object lists from the cache for all users including default |
WavesetResult |
commitView(GenericObject view,
java.util.Map options)
Commit a view. |
int |
countObjects(java.lang.Object type,
java.util.Map options)
Get a count of objects of a given type. |
GenericObject |
createView(java.lang.String id,
java.util.Map options)
Create a view. |
void |
deleteObject(java.lang.Object type,
java.lang.String id,
java.util.Map options)
Delete an object. |
void |
deleteObjects(java.lang.Object type,
java.util.Map options)
Delete all objects matching certain conditions. |
WavesetResult |
deleteView(java.lang.String id,
java.util.Map options)
Delete the repository objects that are associated with the view id. |
java.lang.Object |
extendedOperation(java.lang.String op,
java.util.Map arguments)
This provides a way to expose arbitrary methods that aren't part of the interface. |
LighthouseContext |
getAuthenticatedContext(IDMXUser user)
Derive a LighthouseContext from this one, that is configured to perform operations on behalf of a user specified with an IDMXUser |
LighthouseContext |
getAuthenticatedContext(java.lang.String user)
Derive a LighthouseContext from this one, that is configured to perform operations on behalf of the named user. |
LighthouseContext |
getAuthenticatedContext(Subject subject)
Derive a LighthouseContext from this one, that is configured to perform operations on behalf of a user specified with a Subject. |
LighthouseContext |
getAuthenticatedContext(WSUser user)
Derive a LighthouseContext from this one, that is configured to perform operations on behalf of a user specified with a WSUser |
ObjectCache |
getCache()
Get a handle to the object cache. |
java.lang.Object |
getComponent(java.lang.String name)
Return a handle to another system component identified by name. |
Form |
getForm(GenericObject view,
java.util.Map options)
Get the form to be used with a view. |
LockInfo |
getLock(java.lang.Object type,
java.lang.String id)
Obtain current lock status. |
PersistentObject |
getObject(java.lang.Object type,
java.lang.String id)
Get a read-only copy of an object. |
PersistentObject |
getObject(java.lang.Object type,
java.lang.String id,
java.util.Map options)
Get a read-only copy of an object. |
PersistentObject |
getObjectIfExists(java.lang.Object type,
java.lang.String id)
Get a read-only object copy of an object, but do not throw an exception if it does not exist. |
PersistentObject |
getObjectIfExists(java.lang.Object type,
java.lang.String id,
java.util.Map options)
Get a read-only object copy of an object, but do not throw an exception if it does not exist. |
QueryResult |
getObjects(java.lang.Object type,
java.util.Map options)
Get a list of objects of a given type. |
GenericObject |
getResourceObject(java.lang.String resourceId,
java.lang.String objectType,
java.lang.String objectId,
java.util.Map options)
Return the requested object given the resource, object type and object id. |
java.util.List |
getResourceObjects(java.lang.String objectType,
java.lang.String resourceId,
java.util.Map options)
Return a List of GenericObjects representing objects in a resource. |
Subject |
getSubject()
Returns the Subject for an authenticated context. |
GenericObject |
getSystemConfiguration()
Obtain the system configuration object. |
ObjectGroup[] |
getTopControlledObjectGroups(Subject subject)
Get Top Controlled Object Groups for a Subject |
java.lang.String |
getUser()
Returns the effective user name for an authenticated context. |
GenericObject |
getView(java.lang.String id,
java.util.Map options)
Get a view. |
QueryResult |
listObjects(java.lang.Object type,
java.util.Map options)
Get a list of summary attributes for objects of a given type. |
java.util.List |
listResourceObjects(java.lang.String objectType,
java.util.List resourceList,
java.util.Map options)
Return a List of object names of a given type and a list of resources |
java.util.List |
listResourceObjects(java.lang.String objectType,
java.lang.String resourceId,
java.util.Map options)
Return a List of object names of a given type on a resource. |
LockInfo |
lockObject(java.lang.Object type,
java.lang.String id,
java.util.Map options)
Acquire a logical lock an object, without retrieving it. |
void |
log(AuditEvent event)
Log an event fully specified with an AuditEvent object. |
void |
logFailure(PersistentObject obj,
java.lang.String action,
java.lang.String reason)
Log a failure event for an object. |
void |
logFailure(java.lang.String objectName,
java.lang.String objType,
java.lang.String action,
java.lang.String reason)
Log a failure event with an object name and type mask. |
void |
logResultErrors(PersistentObject obj,
java.lang.String action,
WavesetResult result)
Log any errors found within a WavesetResult. |
void |
logSuccess(PersistentObject obj,
java.lang.String action)
Log a success event for an object. |
void |
logSuccess(PersistentObject obj,
java.lang.String action,
java.util.Map oldValues,
java.util.Map newValues)
Log a success event for an object, include new and old values that will be stored in the blob of the audit table. |
GenericObject |
refreshView(GenericObject view,
java.util.Map options)
Refresh a view. |
void |
renameObject(java.lang.Object type,
java.lang.String id,
java.lang.String newName,
java.util.Map options)
Rename an object. |
TaskInstance |
runTask(TaskTemplate tt)
Launch a task defined by a task template. |
void |
setContext(LighthouseContext context)
|
void |
setSubject(Subject subject)
Change the effective user for logical locking. |
void |
setUser(java.lang.String name)
Change the effective user for logical locking. |
boolean |
subjectControlsObjectGroup(java.util.List objectgroups)
This method will return true if the current subject controls any one of the organizations in the list; otherwise, returns false. |
boolean |
subjectHasRight(java.lang.String type,
Right right)
This method will return true if the subject has the specified right to the specified type. |
boolean |
subjectHasRightToAnyAuthTypeSubType(java.lang.String type,
Right right)
This method will return true if the subject has the specified right to the specified type or any of its authtype subtypes. |
boolean |
subjectIsAssignedAdminGroups(java.util.List admingroups)
This method will return true if the current subject has the specified capabilities; otherwise, returns false. |
boolean |
testPermission(PersistentObject obj,
Right right)
Test permissions without throwing an exception. |
boolean |
testPermission(Type type,
java.lang.String id,
Right right)
Test permissions without throwing an exception. |
void |
unlockObject(java.lang.Object type,
java.lang.String id,
java.util.Map options)
Unlock a previously locked object. |
void |
unlockView(GenericObject view,
java.util.Map options)
Unlock a view. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public LighthouseContext _context
Constructor Detail |
public LighthouseContextWrapper()
public LighthouseContextWrapper(LighthouseContext context)
Method Detail |
public void setContext(LighthouseContext context)
public GenericObject getSystemConfiguration() throws WavesetException
ObjectSource
getSystemConfiguration
in interface ObjectSource
WavesetException
public ObjectCache getCache()
ObjectSource
getCache
in interface ObjectSource
public PersistentObject getObject(java.lang.Object type, java.lang.String id) throws WavesetException, ItemNotFound
ObjectSource
checkoutObject
method.
getObject
in interface ObjectSource
WavesetException
ItemNotFound
public PersistentObject getObject(java.lang.Object type, java.lang.String id, java.util.Map options) throws WavesetException, ItemNotFound
ObjectSource
getObject
in interface ObjectSource
WavesetException
ItemNotFound
public PersistentObject getObjectIfExists(java.lang.Object type, java.lang.String id) throws WavesetException
ObjectSource
getObjectIfExists
in interface ObjectSource
WavesetException
public PersistentObject getObjectIfExists(java.lang.Object type, java.lang.String id, java.util.Map options) throws WavesetException
ObjectSource
getObjectIfExists
in interface ObjectSource
WavesetException
public LockInfo lockObject(java.lang.Object type, java.lang.String id, java.util.Map options) throws ItemNotFound, LockedByAnother, WavesetException
ObjectSource
The OP_USER
option may be used to specify the
name of the user considered to be acquiring the lock.
lockObject
in interface ObjectSource
ItemNotFound
LockedByAnother
WavesetException
public void unlockObject(java.lang.Object type, java.lang.String id, java.util.Map options) throws ItemNotFound, ItemNotLocked, LockedByAnother, WavesetException
ObjectSource
The OP_USER
option may be used to specify the
name of the user considered to be releasing the lock.
unlockObject
in interface ObjectSource
ItemNotFound
ItemNotLocked
LockedByAnother
WavesetException
public LockInfo getLock(java.lang.Object type, java.lang.String id) throws ItemNotFound, WavesetException
ObjectSource
getLock
in interface ObjectSource
ItemNotFound
WavesetException
public boolean breakLock(java.lang.Object type, java.lang.String id, java.util.Map options) throws ItemNotFound, WavesetException
ObjectSource
There is no guarentee a lock will be broken, you normally must have authority over the user that is currently holding the lock.
The OP_USER
option may be used to specify the
name of the user considered to be breaking the lock.
breakLock
in interface ObjectSource
ItemNotFound
WavesetException
public PersistentObject checkoutObject(java.lang.Object type, java.lang.String id, java.util.Map options) throws ItemNotFound, LockedByAnother, WavesetException
ObjectSource
It is usually more efficient to call checkoutObject
rather
than make individual calls to lockObject
and getObject
The OP_USER
option may be used to specify the
name of the user considered to be checking out the object.
The OP_ALLOW_NOT_FOUND
option may be passed
to return null
if cannot find the specified object.
Otherwise, this method throws ItemNotFound
.
checkoutObject
in interface ObjectSource
ItemNotFound
LockedByAnother
WavesetException
public WavesetResult checkinObject(PersistentObject obj, java.util.Map options) throws ItemNotFound, ItemNotLocked, LockedByAnother, WavesetException
ObjectSource
The OP_USER
option may be used to specify the
name of the user considered to be checkin in the object.
The OP_FORCE
option may be passed to inhibit
any constraint checking that would ordinarilly be done
prior to storage. This is normally
off, but since constraint checking can be expensive, there may
be performance reasons for turning it on if you can ensure that
the object is correct.
The OP_KEEP_LOCK
option may be passed
to preserve the caller's logical lock on the specified object.
Otherwise, this method releases any lock after updating the object.
checkinObject
in interface ObjectSource
ItemNotFound
ItemNotLocked
LockedByAnother
WavesetException
public void deleteObject(java.lang.Object type, java.lang.String id, java.util.Map options) throws ItemNotFound, LockedByAnother, WavesetException
ObjectSource
The OP_FORCE
option may be passed to inhibit
any constraint checking that would ordinarilly be done.
This may be used to delete a WSUser object that has provisioned
resource accounts, normally a WSUser cannot be deleted until
it has been fully deprovisioned.
deleteObject
in interface ObjectSource
ItemNotFound
LockedByAnother
WavesetException
public void deleteObjects(java.lang.Object type, java.util.Map options) throws LockedByAnother, WavesetException
ObjectSource
deleteObjects
in interface ObjectSource
LockedByAnother
WavesetException
public void renameObject(java.lang.Object type, java.lang.String id, java.lang.String newName, java.util.Map options) throws ItemNotFound, LockedByAnother, AlreadyExists, WavesetException
ObjectSource
The object must unlocked, or locked by the current user. It will be implicitly locked to perform the rename.
The OP_USER
option may be used to specify the
name of the user considered to be renaming the object.
renameObject
in interface ObjectSource
ItemNotFound
LockedByAnother
AlreadyExists
WavesetException
public QueryResult listObjects(java.lang.Object type, java.util.Map options) throws WavesetException
ObjectSource
listObjects
in interface ObjectSource
WavesetException
public QueryResult getObjects(java.lang.Object type, java.util.Map options) throws WavesetException
ObjectSource
getObjects
in interface ObjectSource
WavesetException
public int countObjects(java.lang.Object type, java.util.Map options) throws WavesetException
ObjectSource
countObjects
in interface ObjectSource
WavesetException
public LighthouseContext getAuthenticatedContext(java.lang.String user) throws WavesetException
LighthouseContext
getAuthenticatedContext
in interface LighthouseContext
WavesetException
public LighthouseContext getAuthenticatedContext(Subject subject) throws WavesetException
LighthouseContext
getAuthenticatedContext
in interface LighthouseContext
WavesetException
public LighthouseContext getAuthenticatedContext(WSUser user) throws WavesetException
LighthouseContext
getAuthenticatedContext
in interface LighthouseContext
WavesetException
public LighthouseContext getAuthenticatedContext(IDMXUser user) throws WavesetException
LighthouseContext
getAuthenticatedContext
in interface LighthouseContext
WavesetException
public void setUser(java.lang.String name) throws WavesetException
LighthouseContext
setUser
in interface LighthouseContext
WavesetException
public void setSubject(Subject subject) throws WavesetException
LighthouseContext
setSubject
in interface LighthouseContext
WavesetException
public java.lang.String getUser()
LighthouseContext
getUser
in interface LighthouseContext
public Subject getSubject()
LighthouseContext
getSubject
in interface LighthouseContext
public java.lang.Object getComponent(java.lang.String name)
LighthouseContext
getComponent
in interface LighthouseContext
public java.lang.Object extendedOperation(java.lang.String op, java.util.Map arguments) throws WavesetException
LighthouseContext
extendedOperation
in interface LighthouseContext
WavesetException
public void checkPermission(PersistentObject obj, Right right) throws WSAuthorizationException, WavesetException
LighthouseContext
checkPermission
in interface LighthouseContext
WSAuthorizationException
WavesetException
public void checkPermission(Type type, Right right) throws WSAuthorizationException, WavesetException
LighthouseContext
checkPermission
in interface LighthouseContext
WSAuthorizationException
WavesetException
public void checkPermissionToAnyAuthTypeSubType(Type type, Right right) throws WSAuthorizationException, WavesetException
LighthouseContext
checkPermissionToAnyAuthTypeSubType
in interface LighthouseContext
WSAuthorizationException
WavesetException
public boolean testPermission(PersistentObject obj, Right right) throws WSAuthorizationException, WavesetException
LighthouseContext
testPermission
in interface LighthouseContext
WSAuthorizationException
WavesetException
public boolean testPermission(Type type, java.lang.String id, Right right) throws WSAuthorizationException, WavesetException
LighthouseContext
testPermission
in interface LighthouseContext
WSAuthorizationException
WavesetException
public boolean subjectHasRight(java.lang.String type, Right right) throws WavesetException
LighthouseContext
subjectHasRight
in interface LighthouseContext
WavesetException
public boolean subjectHasRightToAnyAuthTypeSubType(java.lang.String type, Right right) throws WavesetException
LighthouseContext
Therefore, this method is primarily used to determine if the subject has the specified right to at least one object of the specified type or any of its authtype subtypes. For example, this method is called by the UI to determine if the current subject should be able to view a given page or not. If the subject has the specified right to the specified type or one of the type's authtype subtypes, then they can view the page.
subjectHasRightToAnyAuthTypeSubType
in interface LighthouseContext
WavesetException
public boolean subjectIsAssignedAdminGroups(java.util.List admingroups) throws WavesetException
LighthouseContext
subjectIsAssignedAdminGroups
in interface LighthouseContext
WavesetException
public boolean subjectControlsObjectGroup(java.util.List objectgroups) throws WavesetException
LighthouseContext
subjectControlsObjectGroup
in interface LighthouseContext
WavesetException
public void checkReferencePermissions(PersistentObject obj) throws WSAuthorizationException, WavesetException
LighthouseContext
We might be able to assume this is done by checkinObject, but then we would want this disabled by default in most of the context implemetations.
checkReferencePermissions
in interface LighthouseContext
WSAuthorizationException
WavesetException
public ObjectGroup[] getTopControlledObjectGroups(Subject subject) throws WavesetException
LighthouseContext
Returns the set of 0 or more object groups controlled by the specified principal, each of which has no object group parent that is also controlled by the principal.
getTopControlledObjectGroups
in interface LighthouseContext
WavesetException
public void log(AuditEvent event) throws WavesetException
LighthouseContext
log
in interface LighthouseContext
WavesetException
public void logFailure(PersistentObject obj, java.lang.String action, java.lang.String reason) throws WavesetException
LighthouseContext
logFailure
in interface LighthouseContext
WavesetException
public void logFailure(java.lang.String objectName, java.lang.String objType, java.lang.String action, java.lang.String reason) throws WavesetException
LighthouseContext
logFailure
in interface LighthouseContext
WavesetException
public void logSuccess(PersistentObject obj, java.lang.String action) throws WavesetException
LighthouseContext
logSuccess
in interface LighthouseContext
WavesetException
public void logSuccess(PersistentObject obj, java.lang.String action, java.util.Map oldValues, java.util.Map newValues) throws WavesetException
LighthouseContext
logSuccess
in interface LighthouseContext
WavesetException
public void logResultErrors(PersistentObject obj, java.lang.String action, WavesetResult result) throws WavesetException
LighthouseContext
logResultErrors
in interface LighthouseContext
WavesetException
public TaskInstance runTask(TaskTemplate tt) throws WavesetException
LighthouseContext
runTask
in interface LighthouseContext
WavesetException
public GenericObject getResourceObject(java.lang.String resourceId, java.lang.String objectType, java.lang.String objectId, java.util.Map options) throws WavesetException
LighthouseContext
getResourceObject
in interface LighthouseContext
WavesetException
public java.util.List listResourceObjects(java.lang.String objectType, java.util.List resourceList, java.util.Map options) throws WavesetException
LighthouseContext
listResourceObjects
in interface LighthouseContext
WavesetException
public java.util.List listResourceObjects(java.lang.String objectType, java.lang.String resourceId, java.util.Map options) throws WavesetException
LighthouseContext
listResourceObjects
in interface LighthouseContext
WavesetException
public java.util.List getResourceObjects(java.lang.String objectType, java.lang.String resourceId, java.util.Map options) throws WavesetException
LighthouseContext
getResourceObjects
in interface LighthouseContext
WavesetException
public void clearResourceObjectListCache(java.lang.String subjectName, java.lang.String objectType, java.lang.String resourceId) throws WavesetException
LighthouseContext
clearResourceObjectListCache
in interface LighthouseContext
WavesetException
public void clearResourceObjectListCache(java.util.Map options) throws WavesetException
LighthouseContext
clearResourceObjectListCache
in interface LighthouseContext
WavesetException
public void clearResourceObjectGetCache(java.lang.String subjectName, java.lang.String objectType, java.lang.String resourceId) throws WavesetException
LighthouseContext
clearResourceObjectGetCache
in interface LighthouseContext
WavesetException
public void clearResourceObjectGetCache(java.util.Map options) throws WavesetException
LighthouseContext
clearResourceObjectGetCache
in interface LighthouseContext
WavesetException
public java.lang.Object callResourceMethod(java.lang.String resourceId, java.lang.String methodName, java.util.Map args) throws WavesetException
LighthouseContext
callResourceMethod
in interface LighthouseContext
WavesetException
public GenericObject getView(java.lang.String id, java.util.Map options) throws WavesetException
ObjectSource
getView
in interface ObjectSource
WavesetException
public Form getForm(GenericObject view, java.util.Map options) throws WavesetException
ObjectSource
getForm
in interface ObjectSource
WavesetException
public GenericObject createView(java.lang.String id, java.util.Map options) throws WavesetException
ObjectSource
createView
in interface ObjectSource
WavesetException
public WavesetResult deleteView(java.lang.String id, java.util.Map options) throws WavesetException
ObjectSource
deleteView
in interface ObjectSource
WavesetException
public GenericObject checkoutView(java.lang.String id, java.util.Map options) throws WavesetException
ObjectSource
checkoutView
in interface ObjectSource
WavesetException
public GenericObject refreshView(GenericObject view, java.util.Map options) throws WavesetException
ObjectSource
refreshView
in interface ObjectSource
WavesetException
public WavesetResult checkinView(GenericObject view, java.util.Map options) throws WavesetException
ObjectSource
checkinView
in interface ObjectSource
WavesetException
public WavesetResult commitView(GenericObject view, java.util.Map options) throws WavesetException
ObjectSource
commitView
in interface ObjectSource
WavesetException
public void unlockView(GenericObject view, java.util.Map options) throws WavesetException
ObjectSource
unlockView
in interface ObjectSource
WavesetException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |