public interface CampusAdminSession extends OsidSession
This session creates and removes campuses. The data for create and update is provided by the consumer via the form object.
Modifier and Type | Method and Description |
---|---|
void |
aliasCampus(Id campusId,
Id aliasId)
Adds an
Id to a Campus for the purpose
of creating compatibility. |
boolean |
canCreateCampuses()
Tests if this user can create
Campuses. |
boolean |
canCreateCampusWithRecordTypes(Type[] campusRecordTypes)
Tests if this user can create a single
Campus using the
desired record interface types. |
boolean |
canDeleteCampuses()
Tests if this user can delete
Campuses A return of true
does not guarantee successful authorization. |
boolean |
canManageCampusAliases()
Tests if this user can manage
Id aliases for
Campuses. |
boolean |
canUpdateCampuses()
Tests if this user can update
Campuses. |
Campus |
createCampus(CampusForm campusForm)
Creates a new
Campus. |
void |
deleteCampus(Id campusId)
Deletes a
Campus. |
CampusForm |
getCampusFormForCreate(Type[] campusRecordTypes)
Gets the campus form for creating new campuses.
|
CampusForm |
getCampusFormForUpdate(Id campusId)
Gets the campus form for updating an existing campus.
|
void |
updateCampus(CampusForm campusForm)
Updates an existing campus.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canCreateCampuses()
Campuses.
A return of
true does not guarantee successful authorization. A return of false
indicates that it is known creating a Campus
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 Campus
creation is not
authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateCampusWithRecordTypes(Type[] campusRecordTypes)
Campus
using the
desired record interface types. While
RoomManager.getCampusRecordTypes()
can be used to examine
which record interfaces are supported, this method tests which
record(s) are required for creating a specific Campus.
Providing an empty array tests if a Campus
can be
created with no records.campusRecordTypes
- array of campus record types true
if Campus
creation using
the specified record Types
is supported,
false
otherwiseNullArgumentException
- campusRecordTypes
is null
mandatory
- This method must be implemented. CampusForm getCampusFormForCreate(Type[] campusRecordTypes) throws OperationFailedException, PermissionDeniedException
campusRecordTypes
- array of campus record typesNullArgumentException
- campusRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get foem for requested
record typesmandatory
- This method must be implemented. Campus createCampus(CampusForm campusForm) throws OperationFailedException, PermissionDeniedException
Campus.
campusForm
- the form for this Campus
Campus
IllegalStateException
- campusForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- campusForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- campusForm
did
not originate from getCampusFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateCampuses()
Campuses.
A return of
true does not guarantee successful authorization. A return of false
indicates that it is known updating a Campus
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 Campus
modification is
not authorized, true
otherwisemandatory
- This method must be implemented. CampusForm getCampusFormForUpdate(Id campusId) throws NotFoundException, OperationFailedException, PermissionDeniedException
campusId
- the Id
of the Campus
NotFoundException
- campusId
is not
foundNullArgumentException
- campusId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateCampus(CampusForm campusForm) throws OperationFailedException, PermissionDeniedException
campusForm
- the form containing the elements to be updatedIllegalStateException
- campusForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- campusForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- campusForm
did
not originate from getCampusFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteCampuses()
Campuses
A return of true
does not guarantee successful authorization. A return of false
indicates that it is known deleting a Campus
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 Campus
deletion is not
authorized, true
otherwisemandatory
- This method must be implemented. void deleteCampus(Id campusId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Campus.
campusId
- the Id
of the Campus
to
removeNotFoundException
- campusId
not foundNullArgumentException
- campusId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageCampusAliases()
Id
aliases for
Campuses.
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 Campus
aliasing is not
authorized, true
otherwisemandatory
- This method must be implemented. void aliasCampus(Id campusId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a Campus
for the purpose
of creating compatibility. The primary Id
of the
Campus
is determined by the provider. The new Id
performs as an alias to the primary Id.
If the
alias is a pointer to another campus, it is reassigned to the given
campus Id.
campusId
- the Id
of a Campus
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- campusId
not foundNullArgumentException
- campusId
or
aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.