Interface RelevancyEnablerOntologyAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign RelevancyEnabler to
Ontology mappings. A RelevancyEnabler may appear in
multiple Ontology objects and removing the last reference to a
RelevancyEnabler is the equivalent of deleting it. Each
Ontology may have its own authorizations governing who is allowed to
operate on it.
Adding a reference of a RelevancyEnabler to another
Ontology is not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignRelevancyEnablerToOntology(Id relevancyEnablerId, Id ontologyId) Adds an existingRelevancyEnablerto anOntology.booleanTests if this user can alter relevancy enabler/ontology mappings.booleancanAssignRelevancyEnablersToOntology(Id ontologyId) Tests if this user can alter relevancy enabler/ontology mappings.getAssignableOntologyIds(Id ontologyId) Gets a list of ontologies including and under the given ontology node in which any relevancy enabler can be assigned.getAssignableOntologyIdsForRelevancyEnabler(Id ontologyId, Id relevancyEnablerId) Gets a list of ontologies including and under the given ontology node in which a specific relevancy enabler can be assigned.voidreassignRelevancyEnablerToOntology(Id relevancyEnablerId, Id fromOntologyId, Id toOntologyId) Moves aRelevancyEnablerfrom oneOntologyto another.voidunassignRelevancyEnablerFromOntology(Id relevancyEnablerId, Id ontologyId) Removes aRelevancyEnablerfrom anOntology.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
-
canAssignRelevancyEnablers
boolean canAssignRelevancyEnablers()Tests if this user can alter relevancy enabler/ontology 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 lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignRelevancyEnablersToOntology
Tests if this user can alter relevancy enabler/ontology 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 lookup operations to unauthorized users.- Parameters:
ontologyId- theIdof theOntology- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-ontologyIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableOntologyIds
Gets a list of ontologies including and under the given ontology node in which any relevancy enabler can be assigned.- Parameters:
ontologyId- theIdof theOntology- Returns:
- list of assignable ontology
Ids - Throws:
NullArgumentException-ontologyIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableOntologyIdsForRelevancyEnabler
IdList getAssignableOntologyIdsForRelevancyEnabler(Id ontologyId, Id relevancyEnablerId) throws OperationFailedException Gets a list of ontologies including and under the given ontology node in which a specific relevancy enabler can be assigned.- Parameters:
ontologyId- theIdof theOntologyrelevancyEnablerId- theIdof theRelevancyEnabler- Returns:
- list of assignable ontology
Ids - Throws:
NullArgumentException-ontologyIdorrelevancyEnablerIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignRelevancyEnablerToOntology
void assignRelevancyEnablerToOntology(Id relevancyEnablerId, Id ontologyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingRelevancyEnablerto anOntology.- Parameters:
relevancyEnablerId- theIdof theRelevancyEnablerontologyId- theIdof theOntology- Throws:
AlreadyExistsException-relevancyEnablerIdis already assigned toontologyIdNotFoundException-relevancyEnablerIdorontologyIdnot foundNullArgumentException-relevancyEnablerIdorontologyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignRelevancyEnablerFromOntology
void unassignRelevancyEnablerFromOntology(Id relevancyEnablerId, Id ontologyId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aRelevancyEnablerfrom anOntology.- Parameters:
relevancyEnablerId- theIdof theRelevancyEnablerontologyId- theIdof theOntology- Throws:
NotFoundException-relevancyEnablerIdorontologyIdnot found orrelevancyEnablerIdnot assigned toontologyIdNullArgumentException-relevancyEnablerIdorontologyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignRelevancyEnablerToOntology
void reassignRelevancyEnablerToOntology(Id relevancyEnablerId, Id fromOntologyId, Id toOntologyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aRelevancyEnablerfrom oneOntologyto another. Mappings to otherOntologiesare unaffected.- Parameters:
relevancyEnablerId- theIdof theRelevancyEnablerfromOntologyId- theIdof the currentOntologytoOntologyId- theIdof the destinationOntology- Throws:
AlreadyExistsException-relevancyEnablerIdalready assigned totoOntologyIdNotFoundException-relevancyEnablerId, fromOntologyId, ortoOntologyIdnot found orrelevancyEnablerIdnot mapped tofromOntologyIdNullArgumentException-relevancyEnablerId, fromOntologyId, ortoOntologyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-