public interface LeaseCampusAssignmentSession extends OsidSession
This session provides methods to re-assign Leases
to
Campuses.
A Lease
may map to multiple
Campuses
and removing the last reference to a Lease
is the equivalent of deleting it. Each Campus
may have its
own authorizations governing who is allowed to operate on it.
Adding a reference of a Lease
to another Campus
is not a copy operation (eg: does not change its Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignLeaseToCampus(Id leaseId,
Id campusId)
Adds an existing
Lease to a Campus. |
boolean |
canAssignLeases()
Tests if this user can alter lease/campus mappings.
|
boolean |
canAssignLeasesToCampus(Id campusId)
Tests if this user can alter lease/campus mappings.
|
IdList |
getAssignableCampusIds(Id campusId)
Gets a list of campuses including and under the given campus node in
which any lease can be assigned.
|
IdList |
getAssignableCampusIdsForLease(Id campusId,
Id leaseId)
Gets a list of campuses including and under the given campus node in
which a specific lease can be assigned.
|
void |
unassignLeaseFromCampus(Id leaseId,
Id campusId)
Removes a
Lease from a Campus. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignLeases()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignLeasesToCampus(Id campusId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.campusId
- the Id
of the Campus
false
if mapping is not authorized, true
otherwiseNullArgumentException
- campusId
is
null
mandatory
- This method must be implemented. IdList getAssignableCampusIds(Id campusId) throws OperationFailedException
campusId
- the Id
of the Campus
Ids
NullArgumentException
- campusId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableCampusIdsForLease(Id campusId, Id leaseId) throws OperationFailedException
campusId
- the Id
of the Campus
leaseId
- the Id
of the Lease
Ids
NullArgumentException
- campusId
or
leaseId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignLeaseToCampus(Id leaseId, Id campusId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Lease
to a Campus.
leaseId
- the Id
of the Lease
campusId
- the Id
of the Campus
AlreadyExistsException
- leaseId
is
already assigned to campusId
NotFoundException
- leaseId
or
campusId
not foundNullArgumentException
- leaseId
or
campusId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignLeaseFromCampus(Id leaseId, Id campusId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Lease
from a Campus.
leaseId
- the Id
of the Lease
campusId
- the Id
of the Campus
NotFoundException
- leaseId
or
campusId
not found or leaseId
not
assigned to campusId
NullArgumentException
- leaseId
or
campusId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.