Interface IdiomPressAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Idioms to
Press mappings. An Idiom may appear in multiple Press
objects and removing the last reference to an Idiom 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 an Idiom to another Press is not
a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignIdiomToPress(Id idiomId, Id pressId) Adds an existingIdiomto aPress.booleanTests if this user can alter idiom/press mappings.booleancanAssignIdiomsToPress(Id pressId) Tests if this user can alter idiom/press mappings.getAssignablePressIds(Id pressId) Gets a list of presses including and under the given press node in which any idiom can be assigned.getAssignablePressIdsForIdiom(Id pressId, Id idiomId) Gets a list of presses including and under the given press node in which a specific idiom can be assigned.voidreassignIdiomToPress(Id idiomId, Id fromPressId, Id toPressId) Moves anIdiomfrom onePressto another.voidunassignIdiomFromPress(Id idiomId, Id pressId) Removes anIdiomfrom 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
-
canAssignIdioms
boolean canAssignIdioms()Tests if this user can alter idiom/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 idiom assignment is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignIdiomsToPress
Tests if this user can alter idiom/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 idiom assignment 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 idiom 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.
-
getAssignablePressIdsForIdiom
Gets a list of presses including and under the given press node in which a specific idiom can be assigned.- Parameters:
pressId- theIdof thePressidiomId- theIdof theIdiom- Returns:
- list of assignable press
Ids - Throws:
NullArgumentException-pressIdoridiomIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignIdiomToPress
void assignIdiomToPress(Id idiomId, Id pressId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingIdiomto aPress.- Parameters:
idiomId- theIdof theIdiompressId- theIdof thePress- Throws:
AlreadyExistsException-idiomIdis already assigned topressIdNotFoundException-idiomIdorpressIdnot foundNullArgumentException-idiomIdorpressIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignIdiomFromPress
void unassignIdiomFromPress(Id idiomId, Id pressId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes anIdiomfrom aPress.- Parameters:
idiomId- theIdof theIdiompressId- theIdof thePress- Throws:
NotFoundException-idiomIdorpressIdnot found oridiomIdnot assigned topressIdNullArgumentException-idiomIdorpressIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignIdiomToPress
void reassignIdiomToPress(Id idiomId, Id fromPressId, Id toPressId) throws NotFoundException, OperationFailedException, PermissionDeniedException Moves anIdiomfrom onePressto another. Mappings to otherPressesare unaffected.- Parameters:
idiomId- theIdof theIdiomfromPressId- theIdof the currentPresstoPressId- theIdof the destinationPress- Throws:
NotFoundException-idiomId, fromPressId, ortoPressIdnot found oridiomIdnot mapped tofromPressIdNullArgumentException-idiomId, fromPressId, ortoPressIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-