Interface ParameterConfigurationAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Parameters to
Configurations . A Parameter may appear in multiple
Configurations and removing the last reference to a Parameter is
the equivalent of deleting it which may or may not be permitted. Each
Configuration may have its own authorizations as to who is allowed
to operate on it.
Moving or adding a reference of a Parameter to another
Configuration is not a copy operation (eg: does not change its Id
).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignParameterToConfiguration(Id parameterId, Id configurationId) Adds an existingParameterto aConfiguration.booleanTests if this user can change parameter configuration mappings.booleancanAssignParametersToConfiguration(Id configurationId) Tests if this user can alter parameter/configuration parameters.getAssignableConfigurationIds(Id configurationId) Gets a list of configurations including and under the given configuration node in which any parameter can be assigned.getAssignableConfigurationIdsForParameter(Id configurationId, Id parameterId) Gets a list of configurations including and under the given configuration node in which a specific parameter can be assigned.voidreassignParameterToConfiguration(Id parameterId, Id fromConfigurationId, Id toConfigurationId) Moves aParameterfrom oneConfigurationto another.voidunassignParameterFromConfiguration(Id parameterId, Id configurationId) Removes aParameterfrom aConfiguration.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
-
canAssignParameterConfigurations
boolean canAssignParameterConfigurations()Tests if this user can change parameter configuration mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may not wish to offer assignment operations.- Returns:
falseif parameter configuration assignment is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignParametersToConfiguration
Tests if this user can alter parameter/configuration parameters. A return of true does not guarantee successful authorization. A return of false indicates that it is known parameter methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Parameters:
configurationId- theIdof theConfiguration- Returns:
falseif configuration is not authorized,trueotherwise- Throws:
NullArgumentException-configurationIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableConfigurationIds
Gets a list of configurations including and under the given configuration node in which any parameter can be assigned.- Parameters:
configurationId- theIdof theConfiguration- Returns:
- list of assignable configuration
Ids - Throws:
NullArgumentException-configurationIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableConfigurationIdsForParameter
IdList getAssignableConfigurationIdsForParameter(Id configurationId, Id parameterId) throws OperationFailedException Gets a list of configurations including and under the given configuration node in which a specific parameter can be assigned.- Parameters:
configurationId- theIdof theConfigurationparameterId- theIdof theParameter- Returns:
- list of assignable configuration
Ids - Throws:
NullArgumentException-configurationIdorparameterIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignParameterToConfiguration
void assignParameterToConfiguration(Id parameterId, Id configurationId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingParameterto aConfiguration.- Parameters:
parameterId- theIdof theParameterconfigurationId- theIdof theConfiguration- Throws:
AlreadyExistsException-parameterIdandconfigurationIdalready mappedNotFoundException-parameterIdorconfigurationIdnot foundNullArgumentException-parameterIdorconfigurationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignParameterFromConfiguration
void unassignParameterFromConfiguration(Id parameterId, Id configurationId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aParameterfrom aConfiguration.- Parameters:
parameterId- the Id of theParameterconfigurationId- the Id of theConfiguration- Throws:
NotFoundException-parameterIdorconfigurationIdnot found or is not mappedNullArgumentException-parameterIdorconfigurationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignParameterToConfiguration
void reassignParameterToConfiguration(Id parameterId, Id fromConfigurationId, Id toConfigurationId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aParameterfrom oneConfigurationto another. Mappings to otherConfigurationsare unaffected.- Parameters:
parameterId- theIdof theParameterfromConfigurationId- theIdof the currentConfigurationtoConfigurationId- theIdof the destinationConfiguration- Throws:
AlreadyExistsException-parameterIdalready assigned totoConfigurationIdNotFoundException-parameterId fromConfigurationId, ortoConfigurationIdnot found orcreditIdnot mapped tofromConfigurationIdNullArgumentException-parameterId, fromConfigurationId, ortoConfigurationIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-