wt.ownership
Class OwnershipServiceFwd

java.lang.Object
  extended bywt.ownership.OwnershipServiceFwd
All Implemented Interfaces:
OwnershipService, RemoteAccess, Serializable

public class OwnershipServiceFwd
extends Object
implements RemoteAccess, OwnershipService, Serializable

The OwnershipService provides access to the server functionality of handling object ownership. The methods provide a means assign, change and clear the ownership of an Ownable object. The operations are performed if permission is granted via access control. Also, the object is updated in the database via these methods. Access to these methods is done via the OwnershipHelper class and it's static variable service.

Supported API: false

Extendable: false

See Also:
OwnershipHelper, Ownable, Serialized Form

Field Summary
private static String CLASSNAME
           
private static String FC_RESOURCE
           
(package private) static boolean SERVER
           
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Constructor Summary
OwnershipServiceFwd()
           
 
Method Summary
 Ownable assignOwnership(Ownable obj, WTPrincipal principal)
          Assign the ownership of an object to a specific principal (user or group).
 WTCollection assignOwnership(WTCollection objs, WTPrincipal principal)
          Assign the ownership of objects to a specific principal (user or group).
private static Manager getManager()
           
 Ownable releaseOwnership(Ownable obj)
          Release the ownership of an Ownable object.
 WTCollection releaseOwnership(WTCollection objs)
          Release the ownership of Ownable objects.
 Ownable takeOwnership(Ownable obj)
          Take over the ownership of an Ownable object.
 WTCollection takeOwnership(WTCollection objs)
          Take over the ownership of Ownable objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER

static final boolean SERVER

FC_RESOURCE

private static final String FC_RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Constructor Detail

OwnershipServiceFwd

public OwnershipServiceFwd()
Method Detail

getManager

private static Manager getManager()
                           throws WTException
Returns:
Manager
Throws:
WTException

assignOwnership

public Ownable assignOwnership(Ownable obj,
                               WTPrincipal principal)
                        throws WTException
Assign the ownership of an object to a specific principal (user or group). Ownership may only be assigned for an object that is not currently owned. Returns the now owned object. This operation is for use on objects that have already been persisted in the database. To assign the owner to an object prior to it being stored in the database, use the OwnershipHelper.setOwner() method. You can only assign the ownership of an object if you have administrative rights to the object.

Supported API: false

Specified by:
assignOwnership in interface OwnershipService
Parameters:
obj -
principal -
Returns:
Ownable
Throws:
WTException
See Also:
OwnershipHelper

takeOwnership

public Ownable takeOwnership(Ownable obj)
                      throws WTException
Take over the ownership of an Ownable object. This is equivalent to an assignOwnership, but with specifying the current session principal. Ownership may only be taken for an object that is not currently owned. Returns the now owned object. This operation is for use on objects that have already been persisted in the database. To take ownership of an object prior to it being stored in the database, use the OwnershipHelper.setOwner() method. You can only take the ownership of an object if you have administrative rights to the object.

Supported API: false

Specified by:
takeOwnership in interface OwnershipService
Parameters:
obj -
Returns:
Ownable
Throws:
WTException
See Also:
OwnershipHelper, SessionMgr

releaseOwnership

public Ownable releaseOwnership(Ownable obj)
                         throws WTException
Release the ownership of an Ownable object. This disassociates the Ownable object with it's current owner, making the object unowned. Returns the now un-owned object. This operation is for use on objects that have already been persisted in the database. To release ownership of an object prior to it being stored in the database, use the OwnershipHelper.setOwner() method. You can only release the ownership of an object you own or if you have administrative rights to the object.

Supported API: false

Specified by:
releaseOwnership in interface OwnershipService
Parameters:
obj -
Returns:
Ownable
Throws:
WTException
See Also:
OwnershipHelper

assignOwnership

public WTCollection assignOwnership(WTCollection objs,
                                    WTPrincipal principal)
                             throws WTException
Assign the ownership of objects to a specific principal (user or group). Ownership may only be assigned for objects that are not currently owned. Returns the now owned objects. This operation is for use on objects that have already been persisted in the database. To assign the owner to an object prior to it being stored in the database, use the OwnershipHelper.setOwner() method. You can only assign the ownership of an object if you have administrative rights to the object.

Supported API: false

Specified by:
assignOwnership in interface OwnershipService
Parameters:
objs -
principal -
Returns:
WTCollection
Throws:
WTException
See Also:
OwnershipHelper

takeOwnership

public WTCollection takeOwnership(WTCollection objs)
                           throws WTException
Take over the ownership of Ownable objects. This is equiavlent to an assignOwnership, but with specifying the current session principal. Ownership may only be taken for objects that are not currently owned. Returns the now owned objects. This operation is for use on objects that have already been persisted in the database. To take ownership of an object prior to it being stored in the database, use the OwnershipHelper.setOwner() method. You can only take the ownership of an object if you have administrative rights to the object.

Supported API: false

Specified by:
takeOwnership in interface OwnershipService
Parameters:
objs -
Returns:
WTCollection
Throws:
WTException
See Also:
OwnershipHelper, SessionMgr

releaseOwnership

public WTCollection releaseOwnership(WTCollection objs)
                              throws WTException
Release the ownership of Ownable objects. This disassociates the Ownable objects with their current owner, making the objects unowned. Returns the now un-owned objects. This operation is for use on objects that have already been persisted in the database. To release ownership of an object prior to it being stored in the database, use the OwnershipHelper.setOwner() method. You can only release the ownership of an object you own or if you have administrative rights to the object.

Supported API: false

Specified by:
releaseOwnership in interface OwnershipService
Parameters:
objs -
Returns:
WTCollection
Throws:
WTException
See Also:
OwnershipHelper