Interface EdgeEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes edge enablers. The data for create and
update is provided via the EdgeEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasEdgeEnabler(Id edgeEnablerId, Id aliasId) Adds anIdto anEdgeEnablerfor the purpose of creating compatibility.booleanTests if this user can create edge enablers.booleancanCreateEdgeEnablerWithRecordTypes(Type[] edgeEnablerRecordTypes) Tests if this user can create a singleEdgeEnablerusing the desired record types.booleanTests if this user can delete edge enablers.booleanTests if this user can manageIdaliases for edge enablers.booleanTests if this user can update edge enablers.createEdgeEnabler(EdgeEnablerForm edgeEnablerForm) Creates a newEdgeEnabler.voiddeleteEdgeEnabler(Id edgeEnablerId) Deletes anEdgeEnabler.getEdgeEnablerFormForCreate(Type[] edgeEnablerRecordTypes) Gets the edge enabler form for creating new edge enablers.getEdgeEnablerFormForUpdate(Id edgeEnablerId) Gets the edge enabler form for updating an existing edge enabler.getGraph()Gets theGraphassociated with this session.Gets theGraphIdassociated with this session.voidupdateEdgeEnabler(EdgeEnablerForm edgeEnablerForm) Updates an existing edge 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
-
getGraphId
Id getGraphId()Gets theGraphIdassociated with this session.- Returns:
- the
Graph Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getGraph
Gets theGraphassociated with this session.- Returns:
- the graph
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateEdgeEnabler
boolean canCreateEdgeEnabler()Tests if this user can create edge enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anEdgeEnablerwill 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:
falseifEdgeEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateEdgeEnablerWithRecordTypes
Tests if this user can create a singleEdgeEnablerusing the desired record types. WhileTopologyRulesManager.getEdgeEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificEdgeEnabler. Providing an empty array tests if anEdgeEnablercan be created with no records.- Parameters:
edgeEnablerRecordTypes- array of edge enabler types- Returns:
trueifEdgeEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-edgeEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getEdgeEnablerFormForCreate
EdgeEnablerForm getEdgeEnablerFormForCreate(Type[] edgeEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the edge enabler form for creating new edge enablers. A new form should be requested for each create transaction.- Parameters:
edgeEnablerRecordTypes- array of edge enabler types- Returns:
- the edge enabler form
- Throws:
NullArgumentException-edgeEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createEdgeEnabler
EdgeEnabler createEdgeEnabler(EdgeEnablerForm edgeEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newEdgeEnabler.- Parameters:
edgeEnablerForm- the form for thisEdgeEnabler- Returns:
- the new
EdgeEnabler - Throws:
IllegalStateException-edgeEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-edgeEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-edgeEnablerFormdid not originate fromgetEdgeEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateEdgeEnablers
boolean canUpdateEdgeEnablers()Tests if this user can update edge enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anEdgeEnablerwill 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:
falseifEdgeEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getEdgeEnablerFormForUpdate
EdgeEnablerForm getEdgeEnablerFormForUpdate(Id edgeEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the edge enabler form for updating an existing edge enabler. A new edge enabler form should be requested for each update transaction.- Parameters:
edgeEnablerId- theIdof theEdgeEnabler- Returns:
- the edge enabler form
- Throws:
NotFoundException-edgeEnablerIdis not foundNullArgumentException-edgeEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateEdgeEnabler
void updateEdgeEnabler(EdgeEnablerForm edgeEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing edge enabler.- Parameters:
edgeEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-edgeEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-edgeEnablerIdoredgeEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-edgeEnablerFormdid not originate fromgetEdgeEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteEdgeEnablers
boolean canDeleteEdgeEnablers()Tests if this user can delete edge enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anEdgeEnablerwill 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:
falseifEdgeEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteEdgeEnabler
void deleteEdgeEnabler(Id edgeEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anEdgeEnabler.- Parameters:
edgeEnablerId- theIdof theEdgeEnablerto remove- Throws:
NotFoundException-edgeEnablerIdnot foundNullArgumentException-edgeEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageEdgeEnablerAliases
boolean canManageEdgeEnablerAliases()Tests if this user can manageIdaliases for edge 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:
falseifEdgeEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasEdgeEnabler
void aliasEdgeEnabler(Id edgeEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anEdgeEnablerfor the purpose of creating compatibility. The primaryIdof theEdgeEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another edge enabler. it is reassigned to the given edge enablerId.- Parameters:
edgeEnablerId- theIdof anEdgeEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-edgeEnablerIdnot foundNullArgumentException-edgeEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-