public interface RelevancyOntologyAssignmentSession extends OsidSession
This session provides methods to re-assign Relevancies
to Ontologies.
A Relevancy
may map to
multiple Ontologies
and removing the last reference to a
Relevancy
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 Relevancy
to another
Ontology
is not a copy operation (eg: does not change its
Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignRelevancyToOntology(Id relevancyId,
Id ontologyId)
Adds an existing
Relevancy to an Ontology. |
boolean |
canAssignRelevancies()
Tests if this user can alter relevancy/ontology mappings.
|
boolean |
canAssignRelevanciesToOntology(Id ontologyId)
Tests if this user can alter relevancy/ontology mappings.
|
IdList |
getAssignableOntologyIds(Id ontologyId)
Gets a list of ontologies including and under the given ontology node
in which any relevancy can be assigned.
|
IdList |
getAssignableOntologyIdsForRelevancy(Id ontologyId,
Id relevancyId)
Gets a list of ontologies including and under the given ontology node
in which a specific relevancy can be assigned.
|
void |
reassignRelevancyToOntology(Id relevancyId,
Id fromOntologyId,
Id toOntologyId)
Moves a
Relevancy from one Ontology to
another. |
void |
unassignRelevancyFromOntology(Id relevancyId,
Id ontologyId)
Removes a
Relevancy from an Ontology. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignRelevancies()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignRelevanciesToOntology(Id ontologyId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.ontologyId
- the Id
of the Ontology
false
if mapping is not authorized, true
otherwiseNullArgumentException
- ontologyId
is
null
mandatory
- This method must be implemented. IdList getAssignableOntologyIds(Id ontologyId) throws OperationFailedException
ontologyId
- the Id
of the Ontology
Ids
NullArgumentException
- ontologyId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableOntologyIdsForRelevancy(Id ontologyId, Id relevancyId) throws OperationFailedException
ontologyId
- the Id
of the Ontology
relevancyId
- the Id
of the Relevancy
Ids
NullArgumentException
- ontologyId
or
relevancyId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignRelevancyToOntology(Id relevancyId, Id ontologyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Relevancy
to an Ontology.
relevancyId
- the Id
of the Relevancy
ontologyId
- the Id
of the Ontology
AlreadyExistsException
- relevancyId
is
already assigned to ontologyId
NotFoundException
- relevancyId
or
ontologyId
not foundNullArgumentException
- relevancyId
or
ontologyId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignRelevancyFromOntology(Id relevancyId, Id ontologyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Relevancy
from an Ontology.
relevancyId
- the Id
of the Relevancy
ontologyId
- the Id
of the Ontology
NotFoundException
- relevancyId
or
ontologyId
not found or relevancyId
not assigned to ontologyId
NullArgumentException
- relevancyId
or
ontologyId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignRelevancyToOntology(Id relevancyId, Id fromOntologyId, Id toOntologyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Relevancy
from one Ontology
to
another. Mappings to other Ontologies
are unaffected.relevancyId
- the Id
of the Relevancy
fromOntologyId
- the Id
of the current
Ontology
toOntologyId
- the Id
of the destination
Ontology
NotFoundException
- relevancyId, fromOntologyId,
or toOntologyId
not found or
relevancyId
not mapped to fromOntologyId
NullArgumentException
- relevancyId,
fromOntologyId,
or toOntologyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.