Interface EntryDictionaryAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign enrties to dictionaries. An
Entry may map to multiple Dictionaries and removing the
last reference to an Entry is the equivalent of deleting it. Each
Dictionary may have its own authorizations governing who is
allowed to operate on it.
Moving or adding a reference of an Entry to another
Dictionary is not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignEntryToDictionary(Id entryId, Id dictionaryId) Adds an existingEntryto aDictionary.booleanTests if this user can alter entry/dictionary mappings.booleancanAssignEntriesToDictionary(Id dictionaryId) Tests if this user can alter entry/dictionary mappings.getAssignableDictionaryIds(Id dictionaryId) Gets a list of dictionaries including and under the given dictionary node in which any entry can be assigned.getAssignableDictionaryIdsForEntry(Id dictionaryId, Id entryId) Gets a list of dictionaries including and under the given dictionary node in which a specific entry can be assigned.voidreassignEntryToDictionary(Id entryId, Id fromDictionaryId, Id toDictionaryId) Moves anEntryfrom oneDictionaryto another.voidunassignEntryFromDictionary(Id entryId, Id dictionaryId) Removes anEntryfrom aDictionary.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
-
canAssignEntries
boolean canAssignEntries()Tests if this user can alter entry/dictionary 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 application 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.
-
canAssignEntriesToDictionary
Tests if this user can alter entry/dictionary 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 application that may opt not to offer assignment operations to unauthorized users.- Parameters:
dictionaryId- theIdof theDictionary- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-dictionaryIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableDictionaryIds
Gets a list of dictionaries including and under the given dictionary node in which any entry can be assigned.- Parameters:
dictionaryId- theIdof theDictionary- Returns:
- list of assignable dictionary
Ids - Throws:
NullArgumentException-dictionaryIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableDictionaryIdsForEntry
IdList getAssignableDictionaryIdsForEntry(Id dictionaryId, Id entryId) throws OperationFailedException Gets a list of dictionaries including and under the given dictionary node in which a specific entry can be assigned.- Parameters:
dictionaryId- theIdof theDictionaryentryId- theIdof theEntry- Returns:
- list of assignable dictionary
Ids - Throws:
NullArgumentException-dictionaryIdorentryIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignEntryToDictionary
void assignEntryToDictionary(Id entryId, Id dictionaryId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingEntryto aDictionary.- Parameters:
entryId- theIdof theEntrydictionaryId- theIdof theDictionary- Throws:
AlreadyExistsException-entryIdis already assigned todictionaryIdNotFoundException-entryIdordictionaryIdnot foundNullArgumentException-entryIdordictionaryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignEntryFromDictionary
void unassignEntryFromDictionary(Id entryId, Id dictionaryId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes anEntryfrom aDictionary.- Parameters:
entryId- theIdof theEntrydictionaryId- theIdof theDictionary- Throws:
NotFoundException-entryIdordictionaryIdnot found orentryIdnot assigned todictionaryIdNullArgumentException-entryIdordictionaryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignEntryToDictionary
void reassignEntryToDictionary(Id entryId, Id fromDictionaryId, Id toDictionaryId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves anEntryfrom oneDictionaryto another. Mappings to otherDictionariesare unaffected.- Parameters:
entryId- theIdof theEntryfromDictionaryId- theIdof the currentDictionarytoDictionaryId- theIdof the destinationDictionary- Throws:
AlreadyExistsException-entryIdalready assigned totoDictionaryIdNotFoundException-entryId, fromDictionaryId, ortoDictionaryIdnot found orentryIdnot mapped tofromDictionaryIdNullArgumentException-entryId fromDictionaryId, ortoDictionaryIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-