Interface RelevancyEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes relevancy enablers. The data for
create and update is provided via the RelevancyEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasRelevancyEnabler(Id relevancyEnablerId, Id aliasId) Adds anIdto aRelevancyEnablerfor the purpose of creating compatibility.booleanTests if this user can create relevancy enablers.booleancanCreateRelevancyEnablerWithRecordTypes(Type[] relevancyEnablerRecordTypes) Tests if this user can create a singleRelevancyEnablerusing the desired record types.booleanTests if this user can delete relevancy enablers.booleanTests if this user can manageIdaliases for relevancy enablers.booleanTests if this user can update relevancy enablers.createRelevancyEnabler(RelevancyEnablerForm relevancyEnablerForm) Creates a newRelevancyEnabler.voiddeleteRelevancyEnabler(Id relevancyEnablerId) Deletes aRelevancyEnabler.Gets theOntologyassociated with this session.Gets theOntologyIdassociated with this session.getRelevancyEnablerFormForCreate(Type[] relevancyEnablerRecordTypes) Gets the relevancy enabler form for creating new relevancy enablers.getRelevancyEnablerFormForUpdate(Id relevancyEnablerId) Gets the relevancy enabler form for updating an existing relevancy enabler.voidupdateRelevancyEnabler(RelevancyEnablerForm relevancyEnablerForm) Updates an existing relevancy enabler.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
-
getOntologyId
Id getOntologyId()Gets theOntologyIdassociated with this session.- Returns:
- the
Ontology Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getOntology
Gets theOntologyassociated with this session.- Returns:
- the ontology
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateRelevancyEnabler
boolean canCreateRelevancyEnabler()Tests if this user can create relevancy enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aRelevancyEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseifRelevancyEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateRelevancyEnablerWithRecordTypes
Tests if this user can create a singleRelevancyEnablerusing the desired record types. WhileOntologyRulesManager.getRelevancyEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificRelevancyEnabler. Providing an empty array tests if aRelevancyEnablercan be created with no records.- Parameters:
relevancyEnablerRecordTypes- array of relevancy enabler record types- Returns:
trueifRelevancyEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-relevancyEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getRelevancyEnablerFormForCreate
RelevancyEnablerForm getRelevancyEnablerFormForCreate(Type[] relevancyEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the relevancy enabler form for creating new relevancy enablers. A new form should be requested for each create transaction.- Parameters:
relevancyEnablerRecordTypes- array of relevancy enabler record types- Returns:
- the relevancy enabler form
- Throws:
NullArgumentException-relevancyEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createRelevancyEnabler
RelevancyEnabler createRelevancyEnabler(RelevancyEnablerForm relevancyEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newRelevancyEnabler.- Parameters:
relevancyEnablerForm- the form for thisRelevancyEnabler- Returns:
- the new
RelevancyEnabler - Throws:
IllegalStateException-relevancyEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-relevancyEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-relevancyEnablerFormdid not originate fromgetRelevancyEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateRelevancyEnablers
boolean canUpdateRelevancyEnablers()Tests if this user can update relevancy enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aRelevancyEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseifRelevancyEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getRelevancyEnablerFormForUpdate
RelevancyEnablerForm getRelevancyEnablerFormForUpdate(Id relevancyEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the relevancy enabler form for updating an existing relevancy enabler. A new relevancy enabler form should be requested for each update transaction.- Parameters:
relevancyEnablerId- theIdof theRelevancyEnabler- Returns:
- the relevancy enabler form
- Throws:
NotFoundException-relevancyEnablerIdis not foundNullArgumentException-relevancyEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateRelevancyEnabler
void updateRelevancyEnabler(RelevancyEnablerForm relevancyEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing relevancy enabler.- Parameters:
relevancyEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-relevancyEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-relevancyEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-relevancyEnablerFormdid not originate fromgetRelevancyEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteRelevancyEnablers
boolean canDeleteRelevancyEnablers()Tests if this user can delete relevancy enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aRelevancyEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseifRelevancyEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteRelevancyEnabler
void deleteRelevancyEnabler(Id relevancyEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aRelevancyEnabler.- Parameters:
relevancyEnablerId- theIdof theRelevancyEnablerto remove- Throws:
NotFoundException-relevancyEnablerIdnot foundNullArgumentException-relevancyEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageRelevancyEnablerAliases
boolean canManageRelevancyEnablerAliases()Tests if this user can manageIdaliases for relevancy enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifRelevancyEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasRelevancyEnabler
void aliasRelevancyEnabler(Id relevancyEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto aRelevancyEnablerfor the purpose of creating compatibility. The primaryIdof theRelevancyEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another relevancy enabler. it is reassigned to the given relevancy enablerId.- Parameters:
relevancyEnablerId- theIdof aRelevancyEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-relevancyEnablerIdnot foundNullArgumentException-relevancyEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-