Interface ParameterPressAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Parameter to
Press mappings. A Parameter may appear in multiple Press
objects and removing the last reference to a Parameter is the
equivalent of deleting it. Each Press may have its own
authorizations governing who is allowed to operate on it.
Adding a reference of a Parameter to another Press is
not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignParameterToPress(Id parameterId, Id pressId) Adds an existingParameterto aPress.booleanTests if this user can alter parameter/press mappings.booleancanAssignParametersToPress(Id pressId) Tests if this user can alter parameter/press mappings.getAssignablePressIds(Id pressId) Gets a list of presses including and under the given press node in which any parameter can be assigned.getAssignablePressIdsForParameter(Id pressId, Id parameterId) Gets a list of presses including and under the given press node in which a specific parameter can be assigned.voidreassignParameterToPress(Id parameterId, Id fromPressId, Id toPressId) Moves aParameterfrom onePressto another.voidunassignParameterFromPress(Id parameterId, Id pressId) Removes aParameterfrom aPress.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
-
canAssignParameters
boolean canAssignParameters()Tests if this user can alter parameter/press mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an press that may opt not to offer assignment operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignParametersToPress
Tests if this user can alter parameter/press mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an press that may opt not to offer assignment operations to unauthorized users.- Parameters:
pressId- theIdof thePress- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-pressIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignablePressIds
Gets a list of presses including and under the given press node in which any parameter can be assigned.- Parameters:
pressId- theIdof thePress- Returns:
- list of assignable press
Ids - Throws:
NullArgumentException-pressIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignablePressIdsForParameter
IdList getAssignablePressIdsForParameter(Id pressId, Id parameterId) throws OperationFailedException Gets a list of presses including and under the given press node in which a specific parameter can be assigned.- Parameters:
pressId- theIdof thePressparameterId- theIdof theParameter- Returns:
- list of assignable press
Ids - Throws:
NullArgumentException-pressIdorparameterIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignParameterToPress
void assignParameterToPress(Id parameterId, Id pressId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingParameterto aPress.- Parameters:
parameterId- theIdof theParameterpressId- theIdof thePress- Throws:
AlreadyExistsException-parameterIdis already assigned topressIdNotFoundException-parameterIdorpressIdnot foundNullArgumentException-parameterIdorpressIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignParameterFromPress
void unassignParameterFromPress(Id parameterId, Id pressId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aParameterfrom aPress.- Parameters:
parameterId- theIdof theParameterpressId- theIdof thePress- Throws:
NotFoundException-parameterIdorpressIdnot found orparameterIdnot assigned topressIdNullArgumentException-parameterIdorpressIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignParameterToPress
void reassignParameterToPress(Id parameterId, Id fromPressId, Id toPressId) throws NotFoundException, OperationFailedException, PermissionDeniedException Moves aParameterfrom onePressto another. Mappings to otherPressesare unaffected.- Parameters:
parameterId- theIdof theParameterfromPressId- theIdof the currentPresstoPressId- theIdof the destinationPress- Throws:
NotFoundException-parameterId, fromPressId, ortoPressIdnot found orparameterIdnot mapped tofromPressIdNullArgumentException-parameterId, fromPressId, ortoPressIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-