Interface DeedCampusAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Deeds to
Campuses . A Deed may map to multiple Campuses and
removing the last reference to a Deed 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 Deed to another Campus is not
a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignDeedToCampus(Id deedId, Id campusId) Adds an existingDeedto aCampus.booleanTests if this user can alter deed/campus mappings.booleancanAssignDeedsToCampus(Id campusId) Tests if this user can alter deed/campus mappings.getAssignableCampusIds(Id campusId) Gets a list of campuses including and under the given campus node in which any deed can be assigned.getAssignableCampusIdsForDeed(Id campusId, Id deedId) Gets a list of campuses including and under the given campus node in which a specific deed can be assigned.voidreassignDeedToCampus(Id deedId, Id fromCampusId, Id toCampusId) Moves aDeedfrom oneCampusto another.voidunassignDeedFromCampus(Id deedId, Id campusId) Removes aDeedfrom aCampus.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignDeeds
boolean canAssignDeeds()Tests if this user can alter deed/campus mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignDeedsToCampus
Tests if this user can alter deed/campus mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Parameters:
campusId- theIdof theCampus- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-campusIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableCampusIds
Gets a list of campuses including and under the given campus node in which any deed can be assigned.- Parameters:
campusId- theIdof theCampus- Returns:
- list of assignable campus
Ids - Throws:
NullArgumentException-campusIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableCampusIdsForDeed
Gets a list of campuses including and under the given campus node in which a specific deed can be assigned.- Parameters:
campusId- theIdof theCampusdeedId- theIdof theDeed- Returns:
- list of assignable campus
Ids - Throws:
NullArgumentException-campusIdordeedIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignDeedToCampus
void assignDeedToCampus(Id deedId, Id campusId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingDeedto aCampus.- Parameters:
deedId- theIdof theDeedcampusId- theIdof theCampus- Throws:
AlreadyExistsException-deedIdis already assigned tocampusIdNotFoundException-deedIdorcampusIdnot foundNullArgumentException-deedIdorcampusIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignDeedFromCampus
void unassignDeedFromCampus(Id deedId, Id campusId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aDeedfrom aCampus.- Parameters:
deedId- theIdof theDeedcampusId- theIdof theCampus- Throws:
NotFoundException-deedIdorcampusIdnot found ordeedIdnot assigned tocampusIdNullArgumentException-deedIdorcampusIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignDeedToCampus
void reassignDeedToCampus(Id deedId, Id fromCampusId, Id toCampusId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aDeedfrom oneCampusto another. Mappings to otherCampusesare unaffected.- Parameters:
deedId- theIdof theDeedfromCampusId- theIdof the currentCampustoCampusId- theIdof the destinationCampus- Throws:
AlreadyExistsException-deedIdalready assigned totoCampusIdNotFoundException-deedId, fromCampusId, ortoCampusIdnot found ordeedIdnot mapped tofromCampusIdNullArgumentException-deedId, fromCampusId, ortoCampusIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-