public interface BuildingCampusAssignmentSession extends OsidSession
This session provides methods to re-assign Buildings
to
Campuses.
A Building
may map to multiple
Campuses
and removing the last reference to a
Building
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 Building
to another
Campus
is not a copy operation (eg: does not change its Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignBuildingToCampus(Id buildingId,
Id campusId)
Adds an existing
Building to a Campus. |
boolean |
canAssignBuildings()
Tests if this user can alter building/campus mappings.
|
boolean |
canAssignBuildingsToCampus(Id campusId)
Tests if this user can alter building/campus mappings.
|
IdList |
getAssignableCampusIds(Id campusId)
Gets a list of campuses including and under the given campus node in
which any building can be assigned.
|
IdList |
getAssignableCampusIdsForBuilding(Id campusId,
Id buildingId)
Gets a list of campuses including and under the given campus node in
which a specific building can be assigned.
|
void |
unassignBuildingFromCampus(Id buildingId,
Id campusId)
Removes a
Building from a Campus. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignBuildings()
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 canAssignBuildingsToCampus(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 getAssignableCampusIdsForBuilding(Id campusId, Id buildingId) throws OperationFailedException
campusId
- the Id
of the Campus
buildingId
- the Id
of the Building
Ids
NullArgumentException
- campusId
or
buildingId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignBuildingToCampus(Id buildingId, Id campusId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Building
to a Campus.
buildingId
- the Id
of the Building
campusId
- the Id
of the Campus
AlreadyExistsException
- buildingId
is
already assigned to campusId
NotFoundException
- buildingId
or
campusId
not foundNullArgumentException
- buildingId
or
campusId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignBuildingFromCampus(Id buildingId, Id campusId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Building
from a Campus.
buildingId
- the Id
of the Building
campusId
- the Id
of the Campus
NotFoundException
- buildingId
or
campusId
not found or buildingId
not
assigned to campusId
NullArgumentException
- buildingId
or
campusId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.