Interface FloorAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
- All Known Subinterfaces:
FloorBatchAdminSession
This session creates, updates, and deletes Floors . The data
for create and update is provided by the consumer via the form.
OsidForms are requested for each create or update and may not be reused.
Create and update operations differ in their usage. To create a
Floor , a FloorForm is requested using
getFloorFormForCreate() specifying the desired building and record
Types or none if no record Types are needed. The returned
FloorForm will indicate that it is to be used with a create operation and
can be used to examine metdata or validate data prior to creation. Once
the FloorForm is submiited to a create operation, it cannot be
reused with another create operation unless the first operation was
unsuccessful. Each FloorForm corresponds to an attempted
transaction.
For updates, FloorForms are requested to the Floor
Id that is to be updated using getFloorFormForUpdate() .
Similarly, the FloorForm has metadata about the data that can be
updated and it can perform validation before submitting the update. The
FloorForm can only be used once for a successful update and cannot
be reused.
The delete operations delete Floors . To unmap a Floor
from the current Campus , the FloorCampusAssignmentSession
should be used. These delete operations attempt to remove the
Floor itself thus removing it from all known Campus catalogs.
This session includes an Id aliasing mechanism to assign an
external Id to an internally assigned Id.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasFloor(Id floorId, Id aliasId) Adds anIdto aFloorfor the purpose of creating compatibility.booleanTests if this user can createFloors.booleancanCreateFloorWithRecordTypes(Type[] floorRecordTypes) Tests if this user can create a singleFloorusing the desired record interface types.booleanTests if this user can deleteFloorsA return of true does not guarantee successful authorization.booleanTests if this user can manageIdaliases forFloors.booleanTests if this user can updateFloors.createFloor(FloorForm floorForm) Creates a newFloor.voiddeleteFloor(Id floorId) Deletes aFloor.Gets theCampusassociated with this session.Gets theCampusIdassociated with this session.getFloorFormForCreate(Id buildingId, Type[] floorRecordTypes) Gets the floor form for creating new floors.getFloorFormForUpdate(Id floorId) Gets the floor form for updating an existing floor.voidupdateFloor(FloorForm floorForm) Updates an existing floor.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
-
getCampusId
Id getCampusId()Gets theCampusIdassociated with this session.- Returns:
- the
Campus Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCampus
Gets theCampusassociated with this session.- Returns:
- the campus
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateFloors
boolean canCreateFloors()Tests if this user can createFloors. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aFloorwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer create operations to unauthorized users.- Returns:
falseifFloorcreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateFloorWithRecordTypes
Tests if this user can create a singleFloorusing the desired record interface types. WhileRoomManager.getFloorRecordTypes()can be used to examine which record interfaces are supported, this method tests which record(s) are required for creating a specificFloor. Providing an empty array tests if aFloorcan be created with no records.- Parameters:
floorRecordTypes- array of floor record types- Returns:
trueifFloorcreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-floorRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getFloorFormForCreate
FloorForm getFloorFormForCreate(Id buildingId, Type[] floorRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the floor form for creating new floors. A new form should be requested for each create transaction.- Parameters:
buildingId- a buildingIdfloorRecordTypes- array of floor record types- Returns:
- the floor form
- Throws:
NotFoundException-buildingIdis not foundNullArgumentException-buildingIdorfloorRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get from for requested record types- Compliance:
mandatory- This method must be implemented.
-
createFloor
Creates a newFloor.- Parameters:
floorForm- the form for thisFloor- Returns:
- the new
Floor - Throws:
IllegalStateException-floorFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-floorFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-floorFormdid not originate fromgetFloorFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateFloors
boolean canUpdateFloors()Tests if this user can updateFloors. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aFloorwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer update operations to unauthorized users.- Returns:
falseifFloormodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getFloorFormForUpdate
FloorForm getFloorFormForUpdate(Id floorId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the floor form for updating an existing floor. A new floor form should be requested for each update transaction.- Parameters:
floorId- theIdof theFloor- Returns:
- the floor form
- Throws:
NotFoundException-floorIdis not foundNullArgumentException-floorIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateFloor
Updates an existing floor.- Parameters:
floorForm- the form containing the elements to be updated- Throws:
IllegalStateException-floorFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-floorFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-floorFormdid not originate fromgetFloorFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteFloors
boolean canDeleteFloors()Tests if this user can deleteFloorsA return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aFloorwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer delete operations to unauthorized users.- Returns:
falseifFloordeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteFloor
void deleteFloor(Id floorId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aFloor.- Parameters:
floorId- theIdof theFloorto remove- Throws:
NotFoundException-floorIdnot foundNullArgumentException-floorIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageFloorAliases
boolean canManageFloorAliases()Tests if this user can manageIdaliases forFloors. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifFlooraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasFloor
void aliasFloor(Id floorId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aFloorfor the purpose of creating compatibility. The primaryIdof theFlooris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another floor, it is reassigned to the given floorId.- Parameters:
floorId- theIdof aFlooraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-floorIdnot foundNullArgumentException-floorIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-