public interface RenovationAdminSession extends OsidSession
This session creates, updates, and deletes Renovations.
The data for create and update is provided by the consumer via the form
object. OsidForms are requested for each create or update
and may not be reused.
Create and update operations differ in their usage. To create a
Renovation, a RenovationForm is requested using
getRenovationFormForCreate() specifying the desired peers
and record Types or none if no record Types
are needed. The returned RenovationForm 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 RenovationForm
is submiited to a create operation, it cannot be reused with
another create operation unless the first operation was unsuccessful. Each
RenovationForm corresponds to an attempted transaction.
For updates, RenovationForms are requested to the
Renovation Id that is to be updated using
getRenovationFormForUpdate(). Similarly, the
RenovationForm has metadata about the data that can be updated and
it can perform validation before submitting the update. The
RenovationForm can only be used once for a successful update and
cannot be reused.
The delete operations delete Renovations. To unmap a
Renovation from the current Campus, the
RenovationCampusAssignmentSession should be used. These
delete operations attempt to remove the Renovation 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.
| Modifier and Type | Method and Description |
|---|---|
void |
aliasRenovation(Id renovationId,
Id aliasId)
Adds an
Id to a Renovation for the
purpose of creating compatibility. |
boolean |
canCreateRenovations()
Tests if this user can create
Renovations. |
boolean |
canCreateRenovationWithRecordTypes(Type[] renovationRecordTypes)
Tests if this user can create a single
Renovation using
the desired record interface types. |
boolean |
canDeleteRenovations()
Tests if this user can delete
Renovations A return of
true does not guarantee successful authorization. |
boolean |
canManageRenovationAliases()
Tests if this user can manage
Id aliases for
Renovations. |
boolean |
canUpdateRenovations()
Tests if this user can update
Renovations. |
Renovation |
createRenovation(RenovationForm renovationForm)
Creates a new
Renovation. |
void |
deleteRenovation(Id renovationId)
Deletes a
Renovation. |
Campus |
getCampus()
Gets the
Campus associated with this session. |
Id |
getCampusId()
Gets the
Campus Id associated with this
session. |
RenovationForm |
getRenovationFormForCreate(Type[] renovationRecordTypes)
Gets the renovation form for creating new renovations.
|
RenovationForm |
getRenovationFormForUpdate(Id renovationId)
Gets the renovation form for updating an existing renovation.
|
void |
updateRenovation(RenovationForm renovationForm)
Updates an existing renovation.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getCampusId()
Campus Id associated with this
session. Campus Id associated with this sessionmandatory - This method must be implemented. Campus getCampus() throws OperationFailedException, PermissionDeniedException
Campus associated with this session.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateRenovations()
Renovations. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known creating a Renovation will
result in a PERMISSION_DENIED. This is intended as a
hint to an application that may not wish to offer create operations to
unauthorized users. false if Renovation creation is
not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateRenovationWithRecordTypes(Type[] renovationRecordTypes)
Renovation using
the desired record interface types. While
RoomConstructionManager.getRenovationRecordTypes() can be used
to examine which record interfaces are supported, this method tests
which record(s) are required for creating a specific
Renovation. Providing an empty array tests if a
Renovation can be created with no records.renovationRecordTypes - array of renovation record types true if Renovation creation
using the specified record Types is supported,
false otherwiseNullArgumentException - renovationRecordTypes
is null mandatory - This method must be implemented. RenovationForm getRenovationFormForCreate(Type[] renovationRecordTypes) throws OperationFailedException, PermissionDeniedException
renovationRecordTypes - array of renovation record typesNullArgumentException - renovationRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get from for requested
record typesmandatory - This method must be implemented. Renovation createRenovation(RenovationForm renovationForm) throws OperationFailedException, PermissionDeniedException
Renovation. renovationForm - the form for this Renovation Renovation IllegalStateException - renovationForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - renovationForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - renovationForm
did not originate from getRenovationFormForCreate()
mandatory - This method must be implemented. boolean canUpdateRenovations()
Renovations. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known updating a Renovation will
result in a PERMISSION_DENIED. This is intended as a
hint to an application that may not wish to offer update operations to
unauthorized users. false if Renovation modification
is not authorized, true otherwisemandatory - This method must be implemented. RenovationForm getRenovationFormForUpdate(Id renovationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
renovationId - the Id of the Renovation
NotFoundException - renovationId is not
foundNullArgumentException - renovationId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateRenovation(RenovationForm renovationForm) throws OperationFailedException, PermissionDeniedException
renovationForm - the form containing the elements to be updatedIllegalStateException - renovationForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - renovationForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - renovationForm
did not originate from getRenovationFormForUpdate()
mandatory - This method must be implemented. boolean canDeleteRenovations()
Renovations A return of
true does not guarantee successful authorization. A return of false
indicates that it is known deleting a Renovation will
result in a PERMISSION_DENIED. This is intended as a
hint to an application that may not wish to offer delete operations to
unauthorized users. false if Renovation deletion is
not authorized, true otherwisemandatory - This method must be implemented. void deleteRenovation(Id renovationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Renovation. renovationId - the Id of the Renovation
to removeNotFoundException - renovationId not
foundNullArgumentException - renovationId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageRenovationAliases()
Id aliases for
Renovations. A return of true does not guarantee successful
authorization. A return of false indicates that it is known changing
an alias will result in a PERMISSION_DENIED. This is
intended as a hint to an application that may opt not to offer alias
operations to an unauthorized user. false if Renovation aliasing is
not authorized, true otherwisemandatory - This method must be implemented. void aliasRenovation(Id renovationId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a Renovation for the
purpose of creating compatibility. The primary Id of
the Renovation is determined by the provider. The new
Id performs as an alias to the primary Id.
If the alias is a pointer to another renovation, it is
reassigned to the given renovation Id. renovationId - the Id of a Renovation
aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - renovationId not
foundNullArgumentException - renovationId or
aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.