com.waveset.task
Class TaskContext

java.lang.Object
  extended bycom.waveset.object.LighthouseContextWrapper
      extended bycom.waveset.task.TaskContext
All Implemented Interfaces:
java.lang.Cloneable, LighthouseContext, ObjectSource

public class TaskContext
extends LighthouseContextWrapper
implements java.lang.Cloneable

An object passed into Executor implementations that provides access to Lighthouse system services.

As of 3.5, we implement the new LighthouseContext interface. Older methods providing direct access to the Repository and ObjectCache still exist, but should no longer be used.

// The context may be used by more than one task thread, so everything // in here needs to be reentrant.


Field Summary
static java.lang.String code_id
           
 
Fields inherited from class com.waveset.object.LighthouseContextWrapper
_context
 
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
TaskContext(LighthouseContext context)
          Build a task context object.
 
Method Summary
 java.lang.Object clone()
           
 com.waveset.security.authz.AccessPolicy getAccessPolicy()
          Deprecated. - since 3.5, use LighthouseContext
 Executor getExecutor()
           
 LighthouseContext getLighthouseContext()
          Return a LighthouseContext object.
 com.waveset.repository.Repository getRepository()
          Deprecated. - since 3.5, use LighthouseContext
 void setExecutor(Executor executor)
           
 void setSubject(Subject subject)
          Change the effective user for logical locking.
 void setUser(java.lang.String name)
          Change the effective user for logical locking.
 
Methods inherited from class com.waveset.object.LighthouseContextWrapper
breakLock, callResourceMethod, checkinObject, checkinView, checkoutObject, checkoutView, checkPermission, checkPermission, checkPermissionToAnyAuthTypeSubType, checkReferencePermissions, clearResourceObjectGetCache, clearResourceObjectGetCache, clearResourceObjectListCache, clearResourceObjectListCache, commitView, countObjects, createView, deleteObject, deleteObjects, deleteView, extendedOperation, getAuthenticatedContext, getAuthenticatedContext, getAuthenticatedContext, getAuthenticatedContext, getCache, getComponent, getForm, getLock, getObject, getObject, getObjectIfExists, getObjectIfExists, getObjects, getResourceObject, getResourceObjects, getSubject, getSystemConfiguration, getTopControlledObjectGroups, getUser, getView, listObjects, listResourceObjects, listResourceObjects, lockObject, log, logFailure, logFailure, logResultErrors, logSuccess, logSuccess, refreshView, renameObject, runTask, setContext, subjectControlsObjectGroup, subjectHasRight, subjectHasRightToAnyAuthTypeSubType, subjectIsAssignedAdminGroups, testPermission, testPermission, unlockObject, unlockView
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

TaskContext

public TaskContext(LighthouseContext context)
Build a task context object.

Method Detail

setExecutor

public void setExecutor(Executor executor)

clone

public java.lang.Object clone()

getExecutor

public Executor getExecutor()

getLighthouseContext

public LighthouseContext getLighthouseContext()
Return a LighthouseContext object. This is unnecessary now that this class implements the LighthouseContext interface.


getRepository

public com.waveset.repository.Repository getRepository()
Deprecated. - since 3.5, use LighthouseContext

Obtain a repository.

Some tasks might need direct access to the repository.


getAccessPolicy

public com.waveset.security.authz.AccessPolicy getAccessPolicy()
Deprecated. - since 3.5, use LighthouseContext

Return an access policy object, used for checking authorization.


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
Overrides:
setUser in class LighthouseContextWrapper
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
Overrides:
setSubject in class LighthouseContextWrapper
Throws:
WavesetException