wt.ownership
Interface OwnershipService
- All Known Implementing Classes:
- OwnershipServiceFwd, StandardOwnershipService
- public interface OwnershipService
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
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
- 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
- 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
- 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
- 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
- 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
- Parameters:
objs
-
- Returns:
- WTCollection
- Throws:
WTException
- See Also:
OwnershipHelper