com.waveset.session
Class RemoteSession

java.lang.Object
  extended bycom.waveset.session.AbstractSession
      extended bycom.waveset.session.RemoteSession
All Implemented Interfaces:
CacheConsistencyNumberLoader, com.sun.idm.idmx.api.IDMXConstants, com.sun.idm.idmx.api.IDMXContext, LighthouseContext, ObjectLoader, ObjectSource, RuleExecutor, Session

public class RemoteSession
extends AbstractSession


Nested Class Summary
 
Nested classes inherited from class com.waveset.session.Session
Session.Scope
 
Field Summary
static java.lang.String code_id
           
static java.lang.String DEFAULT_HOST
          Default host.
static java.lang.String DEFAULT_PORT
          Defualt port.
static java.lang.String DEFAULT_SERVLET
          Default servlet URL.
 
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
 
Fields inherited from interface com.sun.idm.idmx.api.IDMXConstants
COMP_AUTHENTICATOR, COMP_CHANGE_NOTIFIER, COMP_PERSISTENT_TRANSACTION_STORE, COMP_TRANSACTION_MANAGER, CONFIGURATION_ID, LOCAL_HOST, OP_ATTRS_TO_GET, OP_AUDIT, OP_NO_TRANSACTIONS, PRE_AUTHENTICATED_USER_LOGIN_TYPE, SPE_LOGIN_USER_INTERFACE, USER_LOGIN_TYPE
 
Constructor Summary
RemoteSession()
           
RemoteSession(java.lang.String user, EncryptedData pass)
          Build a remote session to the local host.
RemoteSession(java.lang.String host, java.lang.String user, EncryptedData pass)
          Build a session given a host name.
RemoteSession(java.net.URL url, java.lang.String user, EncryptedData pass)
          Build a session with a fully specified URL.
 
Method Summary
 void breakLock(Type type, java.lang.String id)
          Forcibly remove the lock on an object.
 WavesetResult checkinObject(PersistentObject object, 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 clearCache()
          Clears the cache managed by this session.
 void clearSubject()
          Removes the subject from this session.
 java.lang.String consoleCommand(java.lang.String command)
          Run a consolea command and return the result.
 void createObject(PersistentObject object)
          Creates a new object in the repository.
 GenericObject createView(java.lang.String id, java.util.Map options)
          Create a view.
 void deleteObject(java.lang.Object typeid, java.lang.String id, java.util.Map options)
          Delete an object.
 void deleteObject(Type type, java.lang.String id, boolean force)
          Permanently remove an object from the repository.
 WavesetResult deleteView(java.lang.String id, java.util.Map options)
          Delete the repository objects that are associated with the view id.
protected  java.lang.Object deserialize(org.w3c.dom.Element element)
           
 java.lang.String getApplicationName()
           
 java.lang.String getApplicationType()
           
 ObjectCache getCache()
          Returns the cache being maintained for this session.
 long getCacheConsistencyNumber(Type t)
          Return a Cache Consistency Number.
 Form getForm(GenericObject view, java.util.Map options)
          Get the form to be used with a view.
 java.lang.String getHost()
          Make this public so the console knows where we're going.
 java.util.Locale getLocale()
          Get the locale
 LockInfo getLockInfo(Type type, java.lang.String id)
          Retrieve information about a lock held on the object.
 LoginConfig getLoginConfig()
           
 WavesetResult getLoginResult()
          Returns the login result messages, if any.
 PersistentObject getObjectIfExists(java.lang.Object typeid, 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 typeid, java.util.Map options)
          Get a list of objects of a given type.
 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.
 java.lang.String getSessionToken()
           
 Subject getSubject()
          Returns the subject that is authenticated for this session.
 GenericObject getSystemConfiguration()
          Obtain the system configuration object.
 java.lang.String getUser()
          Get the name of the administrator or end-user that has authenticated to this session.
 GenericObject getView(java.lang.String id, java.util.Map options)
          Get a view.
 Form getViewForm(GenericObject view, java.lang.String formId, java.util.Map options)
          Get an alternate view form.
 java.lang.String[] listControlledApprovers()
          Like listApprovers, below - this lists all approvers in groups that the current administrator controls.
 QueryResult listObjects(java.lang.Object type, java.util.Map options)
          This is the cannonical implementation, the AbstractSession interface of all the others funnel through here.
 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
 PersistentObject loadObject(Type type, java.lang.String id, boolean tolerateMissing, boolean tolerateAuthzFailure, java.util.Map options)
          Load an object from the storage manager.
 java.util.ArrayList loadObjects(Type type, AttributeCondition[] attrConds)
          Load all objects of a given type.
 LockInfo lockObject(java.lang.Object typeid, java.lang.String id, java.util.Map options)
          Acquire a logical lock an object, without retrieving it.
 void login()
          Perform authentication of the subject (user or administrator) that was specified using the the LoginInfo object given to the Session constructor.
 void logout()
          Remove authentication credentials from this session, and release resources held by the session.
static void println(java.lang.String msg)
           
 GenericObject refreshView(GenericObject view, java.util.Map options)
          Refresh a view.
 void renameObject(Type type, java.lang.String id, java.lang.String newName)
          Changes the name of an existing object.
protected  void serialize(java.lang.StringBuffer buf, int indent, java.lang.Object obj)
           
 void setApplicationName(java.lang.String applicationName)
           
 void setApplicationType(java.lang.String appType)
           
 void setCache(PersistentObject obj)
          Connects an object to the session's object cache.
 void setLocale(java.util.Locale locale)
          Set the locale
 void setSubjectOptions(java.util.Map map)
          Sets the subject.
 void setURL(java.lang.String url)
           
 void setURL(java.net.URL url)
           
 void unlockObject(java.lang.Object typeid, 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 com.waveset.session.AbstractSession
approveWorkItem, breakLock, callResourceMethod, callRule, changeAdminPassword, changePassword, checkinObject, checkoutObject, checkPermission, checkPermission, checkPermissionToAnyAuthTypeSubType, checkReferencePermissions, clearListCache, clearResourceObjectGetCache, clearResourceObjectGetCache, clearResourceObjectListCache, clearResourceObjectListCache, clearServerCache, commitView, countObjects, countObjects, deleteAccount, deleteObject, deleteObjects, deleteObjects, deleteObjects, deleteTask, deProvision, deProvision, dump, exportObjects, exportObjects, exportObjects, exportObjects, exportObjects, exportObjects, extendedOperation, getAdminApprovalForwardRef, getAdministrators, getAdmins, getAppName, getAuthenticatedContext, getAuthenticatedContext, getAuthenticatedContext, getAuthenticatedContext, getComponent, getDebugCommands, getDeleteDestroyInterval, getEffectivePermission, getEffectivePermission, getEffectiveTypeRights, getEffectiveTypeRights, getEffectiveTypeRights, getEffectiveTypeRights, getEffectiveTypes, getEffectiveTypes, getLock, getLoginExceptions, getLoginInfo, getLoginModuleIndex, getLoginPasswordExpired, getLoginSucceeded, getModificationCounter, getObject, getObject, getObjectGroupHandle, getObjectIfExists, getObjectNamesInObjectGroup, getObjects, getObjects, getObjects, getObjects, getPolicyTypes, getResourceIdentity, getResourceObject, getResourceObjects, getResourceTypeNames, getResourceTypes, getStatus, getTaskDefinition, getTaskDefinitions, getTaskExtendedResult, getTaskExtendedResult, getTaskInstances, getTopControlledObjectGroups, getTopControlledObjectGroups, getTopControlledObjectGroups, getType, getWorkItem, getWorkItems, getWorkItems, hasTypeRight, importObjects, importObjects, importXml, listAdmins, listApprovers, listObjects, listObjects, listObjects, listObjects, listObjects, listResourceObjects, listResourceObjects, listResourceObjects, listSimilarApprovers, listTaskExtendedResult, listUsers, listWorkItems, load, lockObject, log, logFailure, logFailure, login, loginConfigContainsAppLoginModule, logResultErrors, logSuccess, logSuccess, nextBlock, obfuscateLoginErrors, previousBlock, provision, rejectWorkItem, renameObject, reProvision, reProvision, reProvision, resetOptions, resolveName, resourceAuthenticate, resumeTask, runScheduler, runTask, runTask, runTask, setCurrentTime, setDeleteDestroyInterval, setLoginExceptions, setLoginInfo, setLoginInProgress, setLoginModuleIndex, setLoginPasswordExpired, setLoginResult, setLoginSucceeded, setObfuscateLoginErrors, setOption, setSchedulerCycleTime, setSubject, setUser, startScheduler, stopScheduler, subjectControlsObjectGroup, subjectHasRight, subjectHasRight, subjectHasRightToAnyAuthTypeSubType, subjectIsAssignedAdminGroups, suspendTask, terminateTask, testPermission, testPermission, unlockObject
 
Methods inherited from class java.lang.Object
clone, 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

DEFAULT_HOST

public static final java.lang.String DEFAULT_HOST
Default host.

See Also:
Constant Field Values

DEFAULT_PORT

public static final java.lang.String DEFAULT_PORT
Defualt port. This is used if a session is created with just a host name rather than a fully specified url.

See Also:
Constant Field Values

DEFAULT_SERVLET

public static final java.lang.String DEFAULT_SERVLET
Default servlet URL. Assume its ok to use our pseudo-SOAP router.

See Also:
Constant Field Values
Constructor Detail

RemoteSession

public RemoteSession()
              throws WavesetException

RemoteSession

public RemoteSession(java.lang.String user,
                     EncryptedData pass)
              throws WavesetException
Build a remote session to the local host. You normally call setURL immediately after this, but it could be used during test.g


RemoteSession

public RemoteSession(java.lang.String host,
                     java.lang.String user,
                     EncryptedData pass)
              throws WavesetException
Build a session given a host name. This is the easiest way to get one, you don't have to worry about the format of the URL, but you will have to live with the defualts. Host may use host:port syntax.


RemoteSession

public RemoteSession(java.net.URL url,
                     java.lang.String user,
                     EncryptedData pass)
              throws WavesetException
Build a session with a fully specified URL.

Method Detail

setURL

public void setURL(java.net.URL url)

setURL

public void setURL(java.lang.String url)
            throws WavesetException
Throws:
WavesetException

getHost

public java.lang.String getHost()
Make this public so the console knows where we're going.


getCache

public ObjectCache getCache()
Description copied from interface: Session
Returns the cache being maintained for this session.

Specified by:
getCache in interface Session
Overrides:
getCache in class AbstractSession

clearCache

public void clearCache()
                throws WavesetException
Description copied from interface: Session
Clears the cache managed by this session.

This is intended for testing. Applications may want to clear the cache periodically as part of a "refresh" operation to ensure that the displayed data is up to date.

Specified by:
clearCache in interface Session
Overrides:
clearCache in class AbstractSession
Throws:
WavesetException

setCache

public void setCache(PersistentObject obj)
              throws WavesetException
Description copied from interface: Session
Connects an object to the session's object cache.

This method is no longer necessary. You may use getCache to obtain the session's cache then use Persistentobject.setCache to assign it.

There is a subtle difference between adding an object to a cache, and setting the cache. ObjectCache.addObject will store a reference to the object in the cache, thereby making it visible to getObject method. The setCache method will store a reference to the cache in the object, but will not put a reference to the object in the cache. This will allow the object to perform auto-resolution, but the object will be invisible to the cache. The latter behavior is what you normally want when manipulating temporary objects that are in the process of being created.

Specified by:
setCache in interface Session
Overrides:
setCache in class AbstractSession
Throws:
WavesetException

getCacheConsistencyNumber

public long getCacheConsistencyNumber(Type t)
                               throws WavesetException
Description copied from interface: CacheConsistencyNumberLoader
Return a Cache Consistency Number. This will be called by the ObjectCache prior to any operation that wants to keep the cache up to date. The number returned will be stored in the cache, when it changes, the cache will be flushed.

The loader typically runs a database query after some number of calls to this method, and returns the current CCN. The loader typically does NOT query the database on every call to this method. While that would ensure that the cache is always up to date, it would slow things down, defeating some of the purpose of the cache. The loader should maintain a timestamp of the last database query, and reissue the query after a configurable number of seconds has passed. This behavior is put into the loader rather than the cache so we have fewer objects to update in case the CCN "polling interval" changes.

Specified by:
getCacheConsistencyNumber in interface CacheConsistencyNumberLoader
Overrides:
getCacheConsistencyNumber in class AbstractSession
Throws:
WavesetException

loadObjects

public java.util.ArrayList loadObjects(Type type,
                                       AttributeCondition[] attrConds)
                                throws WavesetException
Description copied from interface: ObjectLoader
Load all objects of a given type. If the optional attribute list is specified, only those objects with matching "query" attributes is returned.

Specified by:
loadObjects in interface ObjectLoader
Overrides:
loadObjects in class AbstractSession
Throws:
WavesetException

loadObject

public PersistentObject loadObject(Type type,
                                   java.lang.String id,
                                   boolean tolerateMissing,
                                   boolean tolerateAuthzFailure,
                                   java.util.Map options)
                            throws WavesetException
Description copied from interface: ObjectLoader
Load an object from the storage manager. If tolerateMissing is true, silently return null if the object did not exist. If tolerateAuthzFailure is true, silently return null if the requesting admin doesn't have access to the requested object

Specified by:
loadObject in interface ObjectLoader
Overrides:
loadObject in class AbstractSession
Throws:
WavesetException

login

public void login()
           throws WSLoginException,
                  WavesetException
Description copied from interface: Session
Perform authentication of the subject (user or administrator) that was specified using the the LoginInfo object given to the Session constructor.

When using the SessionFactory, the login call happens automatically, there is no need for the application to explicitly call login.

Specified by:
login in interface Session
Overrides:
login in class AbstractSession
Throws:
WSLoginException
WavesetException

logout

public void logout()
            throws WavesetException
Description copied from interface: Session
Remove authentication credentials from this session, and release resources held by the session.

After a logout call, the session object may no longer be used. It is important that an application call logout() when they know that the user's session has completed. For web applications, the servlet or JSP may call SessionFactory.poolSession to keep the authenticated session alive for some period of time. But the application should also support the concept of an explicit logout, and call the logout method.

Specified by:
logout in interface Session
Overrides:
logout in class AbstractSession
Throws:
WavesetException

getSubject

public Subject getSubject()
Description copied from interface: Session
Returns the subject that is authenticated for this session.

This will be either an Administrator or a WSUser object. Applications will have to use the Java operator instanceof to perform the appropriate downcast.

If the goal is to obtain the name of the administrator or end-user that has authenticated to this session, you may use the convenience method getUser instead.

Specified by:
getSubject in interface Session
Overrides:
getSubject in class AbstractSession

setSubjectOptions

public void setSubjectOptions(java.util.Map map)
Description copied from interface: Session
Sets the subject.

Specified by:
setSubjectOptions in interface Session
Overrides:
setSubjectOptions in class AbstractSession

getUser

public java.lang.String getUser()
Description copied from interface: Session
Get the name of the administrator or end-user that has authenticated to this session.

This can be used as an alternative to getSubject if all you need is the name.

Specified by:
getUser in interface Session
Overrides:
getUser in class AbstractSession

clearSubject

public void clearSubject()
                  throws WavesetException
Description copied from interface: Session
Removes the subject from this session.

This should be called only by the SessionFactory as part of the operation of session pooling.

jsl - Should this be protected?

Specified by:
clearSubject in interface Session
Overrides:
clearSubject in class AbstractSession
Throws:
WavesetException

getLoginResult

public WavesetResult getLoginResult()
Description copied from interface: Session
Returns the login result messages, if any.

Null if no messages. Otherwise contains message (e.g. Password will expire in 'n' day(s).

Specified by:
getLoginResult in interface Session
Overrides:
getLoginResult in class AbstractSession

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
Overrides:
getSystemConfiguration in class AbstractSession
Throws:
WavesetException

getSessionToken

public java.lang.String getSessionToken()

getObjectIfExists

public PersistentObject getObjectIfExists(java.lang.Object typeid,
                                          java.lang.String id,
                                          java.util.Map options)
                                   throws WSAuthorizationException,
                                          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
Overrides:
getObjectIfExists in class AbstractSession
Throws:
WSAuthorizationException
WavesetException

lockObject

public LockInfo lockObject(java.lang.Object typeid,
                           java.lang.String id,
                           java.util.Map options)
                    throws WSAuthorizationException,
                           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
Overrides:
lockObject in class AbstractSession
Throws:
WSAuthorizationException
ItemNotFound
LockedByAnother
WavesetException

getLockInfo

public LockInfo getLockInfo(Type type,
                            java.lang.String id)
                     throws WSAuthorizationException,
                            ItemNotFound,
                            WavesetException
Description copied from interface: Session
Retrieve information about a lock held on the object.

A lock may be placed on an object through either the lockObject or checkoutObject methods. This mehtod may be used to determine whether or not such a lock exists.

Specified by:
getLockInfo in interface Session
Overrides:
getLockInfo in class AbstractSession
Throws:
WSAuthorizationException
ItemNotFound
WavesetException

createObject

public void createObject(PersistentObject object)
                  throws WSAuthorizationException,
                         AlreadyExists,
                         ValidationFailed,
                         WavesetException
Description copied from interface: Session
Creates a new object in the repository.

Objects are created by first instantiating a subclass of PersistentObject, then calling appropriate accessor methods to specify the object's attributes, and finally calling the createObject method to store the object in the repository.

The new object must be given a name that is unique within the repository. If an object with this name already exist, an exception is thrown.

Other type specific validation may also be performed before the object is stored in the repository. If any of these validation tests fail, a ValidationFailed exception will be thrown describing the nature of the failure.

After the method returns, the supplied object will be in the session's cache, but the server will not retain any references to this object.

Specified by:
createObject in interface Session
Overrides:
createObject in class AbstractSession
Throws:
WSAuthorizationException
AlreadyExists
ValidationFailed
WavesetException

checkoutObject

public PersistentObject checkoutObject(java.lang.Object type,
                                       java.lang.String id,
                                       java.util.Map options)
                                throws WSAuthorizationException,
                                       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
Overrides:
checkoutObject in class AbstractSession
Throws:
WSAuthorizationException
ItemNotFound
LockedByAnother
WavesetException

checkinObject

public WavesetResult checkinObject(PersistentObject object,
                                   java.util.Map options)
                            throws WSAuthorizationException,
                                   ItemNotFound,
                                   ItemNotLocked,
                                   LockedByAnother,
                                   AlreadyExists,
                                   ValidationFailed,
                                   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
Overrides:
checkinObject in class AbstractSession
Throws:
WSAuthorizationException
ItemNotFound
ItemNotLocked
LockedByAnother
AlreadyExists
ValidationFailed
WavesetException

unlockObject

public void unlockObject(java.lang.Object typeid,
                         java.lang.String id,
                         java.util.Map options)
                  throws WSAuthorizationException,
                         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
Overrides:
unlockObject in class AbstractSession
Throws:
WSAuthorizationException
ItemNotFound
ItemNotLocked
LockedByAnother
WavesetException

breakLock

public void breakLock(Type type,
                      java.lang.String id)
               throws WSAuthorizationException,
                      ItemNotFound,
                      ItemNotLocked,
                      LockedByAnother,
                      WavesetException
Description copied from interface: Session
Forcibly remove the lock on an object.

This was originally added for the unit tests, which would sometimes crash and leave locks behind. It can also be useful to allow administrators to steal each others locks in case someone goes to lunch.

The user must have authorization to modify the object in order to break a lock. If no lock is held on the object, the method has no effect.

Specified by:
breakLock in interface Session
Overrides:
breakLock in class AbstractSession
Throws:
WSAuthorizationException
ItemNotFound
ItemNotLocked
LockedByAnother
WavesetException

renameObject

public void renameObject(Type type,
                         java.lang.String id,
                         java.lang.String newName)
                  throws WSAuthorizationException,
                         ItemNotFound,
                         LockedByAnother,
                         WavesetException
Description copied from interface: Session
Changes the name of an existing object.

The object must either be unlocked, or locked by the current user. References to this object will still exist after the name change, references are made using the object's generated system identifier which does not change when the name changes.

Specified by:
renameObject in interface Session
Overrides:
renameObject in class AbstractSession
Throws:
WSAuthorizationException
ItemNotFound
LockedByAnother
WavesetException

deleteObject

public void deleteObject(Type type,
                         java.lang.String id,
                         boolean force)
                  throws WSAuthorizationException,
                         ItemNotFound,
                         LockedByAnother,
                         ObjectInUse,
                         ObjectProtected,
                         WavesetException
Description copied from interface: Session
Permanently remove an object from the repository.

This is the same as deleteObject, except that we will allow the object to be deleted even if there are references to it from another object. This is the signature we should move to, the other can be deprecated.

Specified by:
deleteObject in interface Session
Overrides:
deleteObject in class AbstractSession
Throws:
WSAuthorizationException
ItemNotFound
LockedByAnother
ObjectInUse
ObjectProtected
WavesetException

deleteObject

public void deleteObject(java.lang.Object typeid,
                         java.lang.String id,
                         java.util.Map options)
                  throws WSAuthorizationException,
                         ItemNotFound,
                         LockedByAnother,
                         ObjectInUse,
                         ObjectProtected,
                         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
Overrides:
deleteObject in class AbstractSession
Throws:
WSAuthorizationException
ItemNotFound
LockedByAnother
ObjectInUse
ObjectProtected
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
Overrides:
getResourceObjects in class AbstractSession
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
Overrides:
listResourceObjects in class AbstractSession
Throws:
WavesetException

getObjects

public QueryResult getObjects(java.lang.Object typeid,
                              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
Overrides:
getObjects in class AbstractSession
Throws:
WavesetException

listObjects

public QueryResult listObjects(java.lang.Object type,
                               java.util.Map options)
                        throws WavesetException
This is the cannonical implementation, the AbstractSession interface of all the others funnel through here.

Specified by:
listObjects in interface ObjectSource
Overrides:
listObjects in class AbstractSession
Throws:
WavesetException

getLoginConfig

public LoginConfig getLoginConfig()
                           throws WavesetException
Specified by:
getLoginConfig in interface Session
Overrides:
getLoginConfig in class AbstractSession
Throws:
WavesetException

listControlledApprovers

public java.lang.String[] listControlledApprovers()
                                           throws WavesetException
Description copied from interface: Session
Like listApprovers, below - this lists all approvers in groups that the current administrator controls.

Specified by:
listControlledApprovers in interface Session
Overrides:
listControlledApprovers in class AbstractSession
Throws:
WavesetException
See Also:
AbstractSession.getAdministrators(Map)

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
Overrides:
createView in class AbstractSession
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.

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
Overrides:
getView in class AbstractSession
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
Overrides:
getForm in class AbstractSession
Throws:
WavesetException

getViewForm

public Form getViewForm(GenericObject view,
                        java.lang.String formId,
                        java.util.Map options)
                 throws WavesetException
Description copied from interface: Session
Get an alternate view form.

Specified by:
getViewForm in interface Session
Overrides:
getViewForm in class AbstractSession
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
Overrides:
checkoutView in class AbstractSession
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
Overrides:
checkinView in class AbstractSession
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
Overrides:
unlockView in class AbstractSession
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
Overrides:
refreshView in class AbstractSession
Throws:
WavesetException

consoleCommand

public java.lang.String consoleCommand(java.lang.String command)
                                throws WavesetException
Run a consolea command and return the result.

Throws:
WavesetException

println

public static void println(java.lang.String msg)

getLocale

public java.util.Locale getLocale()
Get the locale

Specified by:
getLocale in interface Session
Overrides:
getLocale in class AbstractSession

setLocale

public void setLocale(java.util.Locale locale)
Set the locale

Specified by:
setLocale in interface Session
Overrides:
setLocale in class AbstractSession

getApplicationName

public java.lang.String getApplicationName()

setApplicationName

public void setApplicationName(java.lang.String applicationName)

getApplicationType

public java.lang.String getApplicationType()

setApplicationType

public void setApplicationType(java.lang.String appType)

serialize

protected void serialize(java.lang.StringBuffer buf,
                         int indent,
                         java.lang.Object obj)

deserialize

protected java.lang.Object deserialize(org.w3c.dom.Element element)
                                throws WavesetException
Throws:
WavesetException