public interface ParameterAdminSession extends OsidSession
This session creates, updates, and deletes Parameters.
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
Parameter, a ParameterForm is requested using
getParameterFormForCreate() specifying the desired
relationship peers and record Types or none if no record
Types are needed. The returned ParameterForm
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
ParameterForm is submiited to a create operation, it cannot
be reused with another create operation unless the first operation was
unsuccessful. Each ParameterForm corresponds to an
attempted transaction.
For updates, ParameterForms are requested to the
Parameter Id that is to be updated using
getParameterFormForUpdate(). Similarly, the ParameterForm
has metadata about the data that can be updated and it can perform
validation before submitting the update. The ParameterForm
can only be used once for a successful update and cannot be reused.
The delete operations delete Parameters. To unmap a
Parameter from the current Configuration,
the ParameterConfigurationAssignmentSession should be used.
These delete operations attempt to remove the Parameter
itself thus removing it from all known Configuration
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 |
aliasParameter(Id parameterId,
Id aliasId)
Adds an
Id to a Parameter for the
purpose of creating compatibility. |
boolean |
canCreateParameters()
Tests if this user can create
Parameters. |
boolean |
canCreateParameterWithRecordTypes(Type[] parameterRecordTypes)
Tests if this user can create a single
Parameter using
the desired record types. |
boolean |
canDeleteParameters()
Tests if this user can delete
Parameters. |
boolean |
canManageParameterAliases()
Tests if this user can manage
Id aliases for
Parameters. |
boolean |
canUpdateParameters()
Tests if this user can update
Parameters. |
Parameter |
createParameter(ParameterForm parameterForm)
Creates a new
Parameter. |
void |
deleteParameter(Id parameterId)
Deletes a
Parameter. |
Configuration |
getConfiguration()
Gets the
Configuration associated with this session. |
Id |
getConfigurationId()
Gets the
Configuration Id associated
with this session. |
ParameterForm |
getParameterFormForCreate(Type[] parameterRecordTypes)
Gets the paramater form for creating new parameters.
|
ParameterForm |
getParameterFormForUpdate(Id parameterId)
Gets the parameter form for updating an existing parameters.
|
void |
updateParameter(ParameterForm parameterForm)
Updates an existing parameter.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getConfigurationId()
Configuration Id associated
with this session. Configuration Id associated with this
sessionmandatory - This method must be implemented. Configuration getConfiguration() throws OperationFailedException, PermissionDeniedException
Configuration associated with this session. Configuration associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateParameters()
Parameters. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known creating a Parameter 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 Parameter creation is
not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateParameterWithRecordTypes(Type[] parameterRecordTypes)
Parameter using
the desired record types. While
ConfigurationManager.getParameterRecordTypes() can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific Parameter.
Providing an empty array tests if a Parameter can be
created with no records.parameterRecordTypes - array of parameter record types true if Parameter creation using
the specified record Types is supported,
false otherwiseNullArgumentException - parameterRecordTypes
is null mandatory - This method must be implemented. ParameterForm getParameterFormForCreate(Type[] parameterRecordTypes) throws OperationFailedException, PermissionDeniedException
parameterRecordTypes - array of parameter record typesNullArgumentException - configurationRecordTypes
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. Parameter createParameter(ParameterForm parameterForm) throws OperationFailedException, PermissionDeniedException
Parameter. parameterForm - the form for this Parameter Parameter IllegalStateException - parameterForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - parameterForm is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - parameterForm did
not originate from getParameterFormForCreate() mandatory - This method must be implemented. boolean canUpdateParameters()
Parameters. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known updating a Parameter 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 Parameter modification
is not authorized, true otherwisemandatory - This method must be implemented. ParameterForm getParameterFormForUpdate(Id parameterId) throws NotFoundException, OperationFailedException, PermissionDeniedException
parameterId - the Id of the Parameter
NotFoundException - parameterId is not
foundNullArgumentException - parameterId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateParameter(ParameterForm parameterForm) throws OperationFailedException, PermissionDeniedException
parameterForm - the form containing the elements to be updatedIllegalStateException - parameterForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - parameterId or
parameterForm is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - parameterForm did
not originate from getParameterFormForUpdate() mandatory - This method must be implemented. boolean canDeleteParameters()
Parameters. A return of
true does not guarantee successful authorization. A return of false
indicates that it is known deleting a Parameter 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 Parameter deletion is
not authorized, true otherwisemandatory - This method must be implemented. void deleteParameter(Id parameterId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Parameter. parameterId - the Id of the Parameter
to removeNotFoundException - parameterId not
foundNullArgumentException - parameterId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageParameterAliases()
Id aliases for
Parameters. 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 Parameter aliasing is
not authorized, true otherwisemandatory - This method must be implemented. void aliasParameter(Id parameterId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a Parameter for the
purpose of creating compatibility. The primary Id of
the Parameter is determined by the provider. The new
Id performs as an alias to the primary Id.
If the alias is a pointer to another parameter it is
reassigned to the given parameter Id. parameterId - the Id of a Parameter
aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - parameterId not
foundNullArgumentException - parameterId or
aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.