com.waveset.object
Class LighthouseContextWrapper

java.lang.Object
  extended bycom.waveset.object.LighthouseContextWrapper
All Implemented Interfaces:
LighthouseContext, ObjectSource
Direct Known Subclasses:
TaskContext, ViewMaster

public abstract class LighthouseContextWrapper
extends java.lang.Object
implements LighthouseContext

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

_context

public LighthouseContext _context
The context we wrap.

Constructor Detail

LighthouseContextWrapper

public LighthouseContextWrapper()

LighthouseContextWrapper

public LighthouseContextWrapper(LighthouseContext context)
Method Detail

setContext

public void setContext(LighthouseContext context)

getSystemConfiguration

public GenericObject getSystemConfiguration()
                                     throws WavesetException
Description copied from interface: ObjectSource
Obtain the system configuration object. It is read-only. // This could also be done with getObject, but that would require // we publish a constant object id, and assume everyone knows // what Type to use. Since this is becomming a common place to // store component options, a more direct interface is warranted, // similar to WavesetProperties.

Specified by:
getSystemConfiguration in interface ObjectSource
Throws:
WavesetException

getCache

public ObjectCache getCache()
Description copied from interface: ObjectSource
Get a handle to the object cache. This is an older and even more constrained interface for object access. Whan an application has a ObjectSource, it usually just calls the object access methods defined on it. But occasionally it is necessary to pass an ObjectCache to another component, in which case you may obtain one here.

Specified by:
getCache in interface ObjectSource

getObject

public PersistentObject getObject(java.lang.Object type,
                                  java.lang.String id)
                           throws WavesetException,
                                  ItemNotFound
Description copied from interface: ObjectSource
Get a read-only copy of an object. If you wish to obtain an object for editing, use the checkoutObject method.

Specified by:
getObject in interface ObjectSource
Throws:
WavesetException
ItemNotFound

getObject

public PersistentObject getObject(java.lang.Object type,
                                  java.lang.String id,
                                  java.util.Map options)
                           throws WavesetException,
                                  ItemNotFound
Description copied from interface: ObjectSource
Get a read-only copy of an object. Options may may be used to specify the OP_NO_CACHE or OP_SUBTYPES option.

Specified by:
getObject in interface ObjectSource
Throws:
WavesetException
ItemNotFound

getObjectIfExists

public PersistentObject getObjectIfExists(java.lang.Object type,
                                          java.lang.String id)
                                   throws WavesetException
Description copied from interface: ObjectSource
Get a read-only object copy of an object, but do not throw an exception if it does not exist.

Specified by:
getObjectIfExists in interface ObjectSource
Throws:
WavesetException

getObjectIfExists

public PersistentObject getObjectIfExists(java.lang.Object type,
                                          java.lang.String id,
                                          java.util.Map options)
                                   throws WavesetException
Description copied from interface: ObjectSource
Get a read-only object copy of an object, but do not throw an exception if it does not exist. Options may may be used to specify the OP_NO_CACHE or OP_SUBTYPES option.

Specified by:
getObjectIfExists in interface ObjectSource
Throws:
WavesetException

lockObject

public LockInfo lockObject(java.lang.Object type,
                           java.lang.String id,
                           java.util.Map options)
                    throws ItemNotFound,
                           LockedByAnother,
                           WavesetException
Description copied from interface: ObjectSource
Acquire a logical lock an object, without retrieving it.

The OP_USER option may be used to specify the name of the user considered to be acquiring the lock.

Specified by:
lockObject in interface ObjectSource
Throws:
ItemNotFound
LockedByAnother
WavesetException

unlockObject

public void unlockObject(java.lang.Object type,
                         java.lang.String id,
                         java.util.Map options)
                  throws ItemNotFound,
                         ItemNotLocked,
                         LockedByAnother,
                         WavesetException
Description copied from interface: ObjectSource
Unlock a previously locked object. The object must already be locked by the current user.

The OP_USER option may be used to specify the name of the user considered to be releasing the lock.

Specified by:
unlockObject in interface ObjectSource
Throws:
ItemNotFound
ItemNotLocked
LockedByAnother
WavesetException

getLock

public LockInfo getLock(java.lang.Object type,
                        java.lang.String id)
                 throws ItemNotFound,
                        WavesetException
Description copied from interface: ObjectSource
Obtain current lock status.

Specified by:
getLock in interface ObjectSource
Throws:
ItemNotFound
WavesetException

breakLock

public boolean breakLock(java.lang.Object type,
                         java.lang.String id,
                         java.util.Map options)
                  throws ItemNotFound,
                         WavesetException
Description copied from interface: ObjectSource
Break a lock held on an object.

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.

Specified by:
breakLock in interface ObjectSource
Throws:
ItemNotFound
WavesetException

checkoutObject

public PersistentObject checkoutObject(java.lang.Object type,
                                       java.lang.String id,
                                       java.util.Map options)
                                throws ItemNotFound,
                                       LockedByAnother,
                                       WavesetException
Description copied from interface: ObjectSource
Checkout a persistent object for editing. This typically reads the object from the persistent store, acquires a logical lock, and adds the object to a cache.

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.

Specified by:
checkoutObject in interface ObjectSource
Throws:
ItemNotFound
LockedByAnother
WavesetException

checkinObject

public WavesetResult checkinObject(PersistentObject obj,
                                   java.util.Map options)
                            throws ItemNotFound,
                                   ItemNotLocked,
                                   LockedByAnother,
                                   WavesetException
Description copied from interface: ObjectSource
Store changes to an object and release the logical lock. If the object did not exist it will be created. If the object does exist, the persistent store may require that a lock be held.

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.

Specified by:
checkinObject in interface ObjectSource
Throws:
ItemNotFound
ItemNotLocked
LockedByAnother
WavesetException

deleteObject

public void deleteObject(java.lang.Object type,
                         java.lang.String id,
                         java.util.Map options)
                  throws ItemNotFound,
                         LockedByAnother,
                         WavesetException
Description copied from interface: ObjectSource
Delete an object.

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.

Specified by:
deleteObject in interface ObjectSource
Throws:
ItemNotFound
LockedByAnother
WavesetException

deleteObjects

public void deleteObjects(java.lang.Object type,
                          java.util.Map options)
                   throws LockedByAnother,
                          WavesetException
Description copied from interface: ObjectSource
Delete all objects matching certain conditions. Used only by Scheduler, options map has the same structure as that for the listObjects and getObjects methods, and is typically passed as a QueryOptions object.

Specified by:
deleteObjects in interface ObjectSource
Throws:
LockedByAnother
WavesetException

renameObject

public void renameObject(java.lang.Object type,
                         java.lang.String id,
                         java.lang.String newName,
                         java.util.Map options)
                  throws ItemNotFound,
                         LockedByAnother,
                         AlreadyExists,
                         WavesetException
Description copied from interface: ObjectSource
Rename an object.

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.

Specified by:
renameObject in interface ObjectSource
Throws:
ItemNotFound
LockedByAnother
AlreadyExists
WavesetException

listObjects

public QueryResult listObjects(java.lang.Object type,
                               java.util.Map options)
                        throws WavesetException
Description copied from interface: ObjectSource
Get a list of summary attributes for objects of a given type. Query options may be passed are passed in a Map, which will normally be a QueryOptions object. See QueryOptions for more information on the structure of the map.

Specified by:
listObjects in interface ObjectSource
Throws:
WavesetException

getObjects

public QueryResult getObjects(java.lang.Object type,
                              java.util.Map options)
                       throws WavesetException
Description copied from interface: ObjectSource
Get a list of objects of a given type. Query options may be passed are passed in a Map, which will normally be a QueryOptions object. See QueryOptions for more information on the structure of the map.

Specified by:
getObjects in interface ObjectSource
Throws:
WavesetException

countObjects

public int countObjects(java.lang.Object type,
                        java.util.Map options)
                 throws WavesetException
Description copied from interface: ObjectSource
Get a count of objects of a given type. Query options may be passed are passed in a Map, which will normally be a QueryOptions object. See QueryOptions for more information on the structure of the map.

Specified by:
countObjects in interface ObjectSource
Throws:
WavesetException

getAuthenticatedContext

public LighthouseContext getAuthenticatedContext(java.lang.String user)
                                          throws WavesetException
Description copied from interface: LighthouseContext
Derive a LighthouseContext from this one, that is configured to perform operations on behalf of the named user. An authenticated context does not need to pass the OP_USER option to methods such as checkinObject.

Specified by:
getAuthenticatedContext in interface LighthouseContext
Throws:
WavesetException

getAuthenticatedContext

public LighthouseContext getAuthenticatedContext(Subject subject)
                                          throws WavesetException
Description copied from interface: LighthouseContext
Derive a LighthouseContext from this one, that is configured to perform operations on behalf of a user specified with a Subject.

Specified by:
getAuthenticatedContext in interface LighthouseContext
Throws:
WavesetException

getAuthenticatedContext

public LighthouseContext getAuthenticatedContext(WSUser user)
                                          throws WavesetException
Description copied from interface: LighthouseContext
Derive a LighthouseContext from this one, that is configured to perform operations on behalf of a user specified with a WSUser

Specified by:
getAuthenticatedContext in interface LighthouseContext
Throws:
WavesetException

getAuthenticatedContext

public LighthouseContext getAuthenticatedContext(IDMXUser user)
                                          throws WavesetException
Description copied from interface: LighthouseContext
Derive a LighthouseContext from this one, that is configured to perform operations on behalf of a user specified with an IDMXUser

Specified by:
getAuthenticatedContext in interface LighthouseContext
Throws:
WavesetException

setUser

public void setUser(java.lang.String name)
             throws WavesetException
Description copied from interface: LighthouseContext
Change the effective user for logical locking. This should only be called if you know this is a private context that won't be shared by another thread. Here the user is specified by name.

Specified by:
setUser in interface LighthouseContext
Throws:
WavesetException

setSubject

public void setSubject(Subject subject)
                throws WavesetException
Description copied from interface: LighthouseContext
Change the effective user for logical locking. This should only be called if you know this is a private context that won't be shared by another thread. Here the user is specified by Subject.

Specified by:
setSubject in interface LighthouseContext
Throws:
WavesetException

getUser

public java.lang.String getUser()
Description copied from interface: LighthouseContext
Returns the effective user name for an authenticated context. Returns null for an anonymous context.

Specified by:
getUser in interface LighthouseContext

getSubject

public Subject getSubject()
Description copied from interface: LighthouseContext
Returns the Subject for an authenticated context. Returns null for an anonymous context, or if the context was created with only the user name rather than a full subject.

Specified by:
getSubject in interface LighthouseContext

getComponent

public java.lang.Object getComponent(java.lang.String name)
Description copied from interface: LighthouseContext
Return a handle to another system component identified by name. The context is not required to provide every component. The purpose of this method is primarily to eliminate compile time dependencies on internal server components so this interface may be used in many contexts.

Specified by:
getComponent in interface LighthouseContext

extendedOperation

public java.lang.Object extendedOperation(java.lang.String op,
                                          java.util.Map arguments)
                                   throws WavesetException
Description copied from interface: LighthouseContext
This provides a way to expose arbitrary methods that aren't part of the interface. It is intended primarily to assist the migration of older code to use the LighthouseContext interface where it may need to call things that aren't in the interface, and we don't yet know the best way to expose them. // // This should be avoided if at all possible. As soon as you find // something that needs to be exposed here, call a meeting to figure // out why this is is necessary, if there's another way, and if not // how to cleanly expose it through this interface.

Specified by:
extendedOperation in interface LighthouseContext
Throws:
WavesetException

checkPermission

public void checkPermission(PersistentObject obj,
                            Right right)
                     throws WSAuthorizationException,
                            WavesetException
Description copied from interface: LighthouseContext
Check permissions for the curent subject against the given object and right.

Specified by:
checkPermission in interface LighthouseContext
Throws:
WSAuthorizationException
WavesetException

checkPermission

public void checkPermission(Type type,
                            Right right)
                     throws WSAuthorizationException,
                            WavesetException
Description copied from interface: LighthouseContext
Check permissions for the current subject, against the given type and right.

Specified by:
checkPermission in interface LighthouseContext
Throws:
WSAuthorizationException
WavesetException

checkPermissionToAnyAuthTypeSubType

public void checkPermissionToAnyAuthTypeSubType(Type type,
                                                Right right)
                                         throws WSAuthorizationException,
                                                WavesetException
Description copied from interface: LighthouseContext
Check permissions for the given subject, against the given type or any of its authtype subtypes and right.

Specified by:
checkPermissionToAnyAuthTypeSubType in interface LighthouseContext
Throws:
WSAuthorizationException
WavesetException

testPermission

public boolean testPermission(PersistentObject obj,
                              Right right)
                       throws WSAuthorizationException,
                              WavesetException
Description copied from interface: LighthouseContext
Test permissions without throwing an exception.

Specified by:
testPermission in interface LighthouseContext
Throws:
WSAuthorizationException
WavesetException

testPermission

public boolean testPermission(Type type,
                              java.lang.String id,
                              Right right)
                       throws WSAuthorizationException,
                              WavesetException
Description copied from interface: LighthouseContext
Test permissions without throwing an exception.

Specified by:
testPermission in interface LighthouseContext
Throws:
WSAuthorizationException
WavesetException

subjectHasRight

public boolean subjectHasRight(java.lang.String type,
                               Right right)
                        throws WavesetException
Description copied from interface: LighthouseContext
This method will return true if the subject has the specified right to the specified type. It does not imply that the subject has the specified right to all objects of the specified type, since a given object may or may not be in the subject's scope of control or if it is the subject may not have the specified right to the object in that scope. Therefore, this method is primarily used to determine if the subject has the specified right to at least one object of the specified type.

Specified by:
subjectHasRight in interface LighthouseContext
Throws:
WavesetException

subjectHasRightToAnyAuthTypeSubType

public boolean subjectHasRightToAnyAuthTypeSubType(java.lang.String type,
                                                   Right right)
                                            throws WavesetException
Description copied from interface: LighthouseContext
This method will return true if the subject has the specified right to the specified type or any of its authtype subtypes. It does not imply that the subject has the specified right to all objects of the specified type or any of its authtype subtypes, since a given object may or may not be in the subject's scope of control or if it is the subject may not have the specified right to the object in that scope.

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.

Specified by:
subjectHasRightToAnyAuthTypeSubType in interface LighthouseContext
Throws:
WavesetException

subjectIsAssignedAdminGroups

public boolean subjectIsAssignedAdminGroups(java.util.List admingroups)
                                     throws WavesetException
Description copied from interface: LighthouseContext
This method will return true if the current subject has the specified capabilities; otherwise, returns false. The supported list of capabilities include those returned by listing all objects of type AdminGroup (e.g. "Account Administrator")

Specified by:
subjectIsAssignedAdminGroups in interface LighthouseContext
Throws:
WavesetException

subjectControlsObjectGroup

public boolean subjectControlsObjectGroup(java.util.List objectgroups)
                                   throws WavesetException
Description copied from interface: LighthouseContext
This method will return true if the current subject controls any one of the organizations in the list; otherwise, returns false. The supported list of organizations include those returned by listing all objects of type ObjectGroup

Specified by:
subjectControlsObjectGroup in interface LighthouseContext
Throws:
WavesetException

checkReferencePermissions

public void checkReferencePermissions(PersistentObject obj)
                               throws WSAuthorizationException,
                                      WavesetException
Description copied from interface: LighthouseContext
Check connect/disconnect permissions to objects referenced by another object.

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.

Specified by:
checkReferencePermissions in interface LighthouseContext
Throws:
WSAuthorizationException
WavesetException

getTopControlledObjectGroups

public ObjectGroup[] getTopControlledObjectGroups(Subject subject)
                                           throws WavesetException
Description copied from interface: LighthouseContext
Get Top Controlled Object Groups for a Subject

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.

Specified by:
getTopControlledObjectGroups in interface LighthouseContext
Throws:
WavesetException

log

public void log(AuditEvent event)
         throws WavesetException
Description copied from interface: LighthouseContext
Log an event fully specified with an AuditEvent object.

Specified by:
log in interface LighthouseContext
Throws:
WavesetException

logFailure

public void logFailure(PersistentObject obj,
                       java.lang.String action,
                       java.lang.String reason)
                throws WavesetException
Description copied from interface: LighthouseContext
Log a failure event for an object.

Specified by:
logFailure in interface LighthouseContext
Throws:
WavesetException

logFailure

public void logFailure(java.lang.String objectName,
                       java.lang.String objType,
                       java.lang.String action,
                       java.lang.String reason)
                throws WavesetException
Description copied from interface: LighthouseContext
Log a failure event with an object name and type mask.

Specified by:
logFailure in interface LighthouseContext
Throws:
WavesetException

logSuccess

public void logSuccess(PersistentObject obj,
                       java.lang.String action)
                throws WavesetException
Description copied from interface: LighthouseContext
Log a success event for an object.

Specified by:
logSuccess in interface LighthouseContext
Throws:
WavesetException

logSuccess

public void logSuccess(PersistentObject obj,
                       java.lang.String action,
                       java.util.Map oldValues,
                       java.util.Map newValues)
                throws WavesetException
Description copied from interface: LighthouseContext
Log a success event for an object, include new and old values that will be stored in the blob of the audit table.

Specified by:
logSuccess in interface LighthouseContext
Throws:
WavesetException

logResultErrors

public void logResultErrors(PersistentObject obj,
                            java.lang.String action,
                            WavesetResult result)
                     throws WavesetException
Description copied from interface: LighthouseContext
Log any errors found within a WavesetResult.

Specified by:
logResultErrors in interface LighthouseContext
Throws:
WavesetException

runTask

public TaskInstance runTask(TaskTemplate tt)
                     throws WavesetException
Description copied from interface: LighthouseContext
Launch a task defined by a task template.

Specified by:
runTask in interface LighthouseContext
Throws:
WavesetException

getResourceObject

public GenericObject getResourceObject(java.lang.String resourceId,
                                       java.lang.String objectType,
                                       java.lang.String objectId,
                                       java.util.Map options)
                                throws WavesetException
Description copied from interface: LighthouseContext
Return the requested object given the resource, object type and object id.

Specified by:
getResourceObject in interface LighthouseContext
Throws:
WavesetException

listResourceObjects

public java.util.List listResourceObjects(java.lang.String objectType,
                                          java.util.List resourceList,
                                          java.util.Map options)
                                   throws WavesetException
Description copied from interface: LighthouseContext
Return a List of object names of a given type and a list of resources

Specified by:
listResourceObjects in interface LighthouseContext
Throws:
WavesetException

listResourceObjects

public java.util.List listResourceObjects(java.lang.String objectType,
                                          java.lang.String resourceId,
                                          java.util.Map options)
                                   throws WavesetException
Description copied from interface: LighthouseContext
Return a List of object names of a given type on a resource.

Specified by:
listResourceObjects in interface LighthouseContext
Throws:
WavesetException

getResourceObjects

public java.util.List getResourceObjects(java.lang.String objectType,
                                         java.lang.String resourceId,
                                         java.util.Map options)
                                  throws WavesetException
Description copied from interface: LighthouseContext
Return a List of GenericObjects representing objects in a resource.

Specified by:
getResourceObjects in interface LighthouseContext
Throws:
WavesetException

clearResourceObjectListCache

public void clearResourceObjectListCache(java.lang.String subjectName,
                                         java.lang.String objectType,
                                         java.lang.String resourceId)
                                  throws WavesetException
Description copied from interface: LighthouseContext
Clear all resource object lists from the cache for all users including default

Specified by:
clearResourceObjectListCache in interface LighthouseContext
Throws:
WavesetException

clearResourceObjectListCache

public void clearResourceObjectListCache(java.util.Map options)
                                  throws WavesetException
Description copied from interface: LighthouseContext
Clear specified resource object lists from the cache

Specified by:
clearResourceObjectListCache in interface LighthouseContext
Throws:
WavesetException

clearResourceObjectGetCache

public void clearResourceObjectGetCache(java.lang.String subjectName,
                                        java.lang.String objectType,
                                        java.lang.String resourceId)
                                 throws WavesetException
Description copied from interface: LighthouseContext
Clear all resource object lists from the cache for all users including default

Specified by:
clearResourceObjectGetCache in interface LighthouseContext
Throws:
WavesetException

clearResourceObjectGetCache

public void clearResourceObjectGetCache(java.util.Map options)
                                 throws WavesetException
Description copied from interface: LighthouseContext
Clear specified resource object lists from the cache

Specified by:
clearResourceObjectGetCache in interface LighthouseContext
Throws:
WavesetException

callResourceMethod

public java.lang.Object callResourceMethod(java.lang.String resourceId,
                                           java.lang.String methodName,
                                           java.util.Map args)
                                    throws WavesetException
Description copied from interface: LighthouseContext
Call a resource adapter specific method. The method names, arguments, and return values are all resource specific.

Specified by:
callResourceMethod in interface LighthouseContext
Throws:
WavesetException

getView

public GenericObject getView(java.lang.String id,
                             java.util.Map options)
                      throws WavesetException
Description copied from interface: ObjectSource
Get a view.

Specified by:
getView in interface ObjectSource
Throws:
WavesetException

getForm

public Form getForm(GenericObject view,
                    java.util.Map options)
             throws WavesetException
Description copied from interface: ObjectSource
Get the form to be used with a view.

Specified by:
getForm in interface ObjectSource
Throws:
WavesetException

createView

public GenericObject createView(java.lang.String id,
                                java.util.Map options)
                         throws WavesetException
Description copied from interface: ObjectSource
Create a view.

Specified by:
createView in interface ObjectSource
Throws:
WavesetException

deleteView

public WavesetResult deleteView(java.lang.String id,
                                java.util.Map options)
                         throws WavesetException
Description copied from interface: ObjectSource
Delete the repository objects that are associated with the view id. This usually doesn't do much more than the deleteObject method, but some objects need to perform special processing when they are deleted, such as launching a workflow. Since workflows are hooked into the create, modify, and update operations through the view handlers, it makes sense to encapsulate delete behavior here too, even though there isn't a view object being exchanged.

Specified by:
deleteView in interface ObjectSource
Throws:
WavesetException

checkoutView

public GenericObject checkoutView(java.lang.String id,
                                  java.util.Map options)
                           throws WavesetException
Description copied from interface: ObjectSource
Checkout a view.

Specified by:
checkoutView in interface ObjectSource
Throws:
WavesetException

refreshView

public GenericObject refreshView(GenericObject view,
                                 java.util.Map options)
                          throws WavesetException
Description copied from interface: ObjectSource
Refresh a view.

Specified by:
refreshView in interface ObjectSource
Throws:
WavesetException

checkinView

public WavesetResult checkinView(GenericObject view,
                                 java.util.Map options)
                          throws WavesetException
Description copied from interface: ObjectSource
Checkin a view.

Specified by:
checkinView in interface ObjectSource
Throws:
WavesetException

commitView

public WavesetResult commitView(GenericObject view,
                                java.util.Map options)
                         throws WavesetException
Description copied from interface: ObjectSource
Commit a view.

Specified by:
commitView in interface ObjectSource
Throws:
WavesetException

unlockView

public void unlockView(GenericObject view,
                       java.util.Map options)
                throws WavesetException
Description copied from interface: ObjectSource
Unlock a view.

Specified by:
unlockView in interface ObjectSource
Throws:
WavesetException