public interface TypeAdminSession extends OsidSession
This session is used to create, update and delete Types
in the registry.
| Modifier and Type | Method and Description |
|---|---|
void |
addBaseType(Type type,
Type baseType)
Adds a base type to a type.
|
void |
addTypeRelation(Type sourceType,
Type destinationType,
Type relationType)
Adds a relation between two types.
|
boolean |
canCreateTypes()
Tests if this user can create
Types. |
boolean |
canDeleteType(Type type)
Tests if this user can delete the specified type.
|
boolean |
canDeleteTypes()
Tests if this user can delete
Types from this
ItemBank. |
boolean |
canUpdateTypes()
Tests if this user can update types.
|
Type |
createType(TypeForm typeForm)
Creates a new
Type. |
void |
deleteType(Type type)
Removes a
Type. |
TypeForm |
getTypeFormForCreate(Type type)
Gets the type form for creating new types.
|
TypeForm |
getTypeFormForUpdate(Type type)
Gets the type form for creating new types.
|
void |
makeEquivalent(Type primaryType,
Type equivalentType)
Makes two
Types equivalent. |
void |
removeBaseType(Type type,
Type baseType)
Removes a base type from a type.
|
void |
removeTypeRelation(Type sourceType,
Type destinationType,
Type relationType)
Renoves a relation between two types.
|
void |
updateType(TypeForm typeForm)
Updates a type.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseboolean canCreateTypes()
Types. A return of true
does not guarantee successful authorization. A return of false
indicates that it is known creating a Type will result
in a PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer create operations to an
unauthorized user. false if Type creation is not
authorized, true otherwisemandatory - This method must be implemented. TypeForm getTypeFormForCreate(Type type) throws OperationFailedException, PermissionDeniedException
type - the Type to be createdNullArgumentException - type is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. Type createType(TypeForm typeForm) throws OperationFailedException, PermissionDeniedException
Type. typeForm - the type form Type IllegalStateException - typeForm already
used in a create transactionInvalidArgumentException - one or more of the arguments
is invalidNullArgumentException - typeForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - typeForm did not
originate from getTypeFormForCreate() mandatory - This method must be implemented. boolean canUpdateTypes()
Type will result in a
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer update operations to an
unauthorized user. false if type modification is not authorized,
true otherwisemandatory - This method must be implemented. TypeForm getTypeFormForUpdate(Type type) throws NotFoundException, OperationFailedException, PermissionDeniedException
type - the Type to be updatedNotFoundException - type not foundNullArgumentException - type is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateType(TypeForm typeForm) throws OperationFailedException, PermissionDeniedException
typeForm - the type formIllegalStateException - typeForm already
used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - typeForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - typeForm did not
originate from getTypeFormForUpdate() mandatory - This method must be implemented. boolean canDeleteTypes()
Types from this
ItemBank. A return of true does not guarantee successful
authorization. A return of false indicates that it is known deleting a
Type will result in a PERMISSION_DENIED.
This is intended as a hint to an application that may opt not to offer
delete operations to an unauthorized user. false if Item deletion is not
authorized, true otherwisemandatory - This method must be implemented. boolean canDeleteType(Type type)
Type will
result in a PERMISSION_DENIED. This is intended as a
hint to an application that may opt not to offer update operations to
an unauthorized user.type - the Type to be deleted false if type deletion is not authorized,
true otherwiseNullArgumentException - type is
null mandatory - This method must be implemented. void deleteType(Type type) throws NotFoundException, OperationFailedException, PermissionDeniedException
Type. type - the Type to removeNotFoundException - type is not foundNullArgumentException - type is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void makeEquivalent(Type primaryType, Type equivalentType) throws NotFoundException, OperationFailedException, PermissionDeniedException
Types equivalent. Calls to
TypeLookupSession.getType(equivalentType) return the
primaryType. primaryType - the primary Type equivalentType - a Type to be made equivalentNotFoundException - primaryType or
equivalentType is not foundNullArgumentException - primaryType or
equivalentType is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void addBaseType(Type type, Type baseType) throws NotFoundException, OperationFailedException, PermissionDeniedException
type - a Type baseType - a base typeNotFoundException - type or
baseType is not foundNullArgumentException - type or
baseType is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void removeBaseType(Type type, Type baseType) throws NotFoundException, OperationFailedException, PermissionDeniedException
type - a Type baseType - a base typeNotFoundException - type or
baseType is not found or baseType is
not a base of type NullArgumentException - type or
baseType is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void addTypeRelation(Type sourceType, Type destinationType, Type relationType) throws NotFoundException, OperationFailedException, PermissionDeniedException
Type
in itself.sourceType - the source typedestinationType - the destination typerelationType - the relation typeNotFoundException - sourceType, destinationType,
or relationType is not foundNullArgumentException - sourceType,
destinationType, or relationType is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void removeTypeRelation(Type sourceType, Type destinationType, Type relationType) throws NotFoundException, OperationFailedException, PermissionDeniedException
sourceType - the source typedestinationType - the destination typerelationType - the relation typeNotFoundException - sourceType, destinationType,
or relationType is not found, or the
relationship does not existNullArgumentException - sourceType,
destinationType, or relationType is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.