Class ProcessSchemePolicyStore
java.lang.Object
com.sodius.oslc.server.process.scheme.ProcessSchemePolicyStore
Manages access to process scheme policies.
- Since:
- 3.5.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRepresents a composite key for policy settings, for a given friend (may benull), resource type (may benull)and link type (may benull). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProcessSchemePolicyStoreReturns the current store instance.Gets the application set of native link types, if any.abstract Map<ProcessSchemePolicyStore.PolicyKey, String> getPolicies(String schemeIdentifier) Resolves the registered policies for the given scheme.abstract voidremovePolicies(String schemeIdentifier) Removes all policies for the given scheme.static voidReplaces the current store instance with the given one.abstract voidupdatePolicies(String schemeIdentifier, Collection<ProcessSchemePolicyStore.PolicyKey> policiesToRemove, Map<ProcessSchemePolicyStore.PolicyKey, String> policiesToAdd) Updates policies of the given scheme.
-
Constructor Details
-
ProcessSchemePolicyStore
public ProcessSchemePolicyStore()
-
-
Method Details
-
getInstance
Returns the current store instance.- Returns:
- the current instance.
- See Also:
-
setInstance
Replaces the current store instance with the given one.- Parameters:
store- the new store.
-
getNativeLinkTypes
Gets the application set of native link types, if any.Applications supporting native link types mapping must override this method, which returns an empty collection by default.
- Returns:
- the available application native link types.
- Throws:
ProcessSchemeStoreException- if an error prevents store from retrieving native links.- Since:
- 3.9.0
-
getPolicies
public abstract Map<ProcessSchemePolicyStore.PolicyKey,String> getPolicies(String schemeIdentifier) throws ProcessSchemeStoreException Resolves the registered policies for the given scheme.- Parameters:
schemeIdentifier- the identifier of the scheme- Returns:
- the registered policies for the given scheme.
- Throws:
ProcessSchemeStoreException- if an error prevents policies from being retrieved.
-
updatePolicies
public abstract void updatePolicies(String schemeIdentifier, Collection<ProcessSchemePolicyStore.PolicyKey> policiesToRemove, Map<ProcessSchemePolicyStore.PolicyKey, String> policiesToAdd) throws ProcessSchemeStoreExceptionUpdates policies of the given scheme.- Parameters:
schemeIdentifier- the identifier of the schemepoliciesToRemove- the obsolete policies to remove from the store.policiesToAdd- the new policies to add in the store.- Throws:
ProcessSchemeStoreException- if an error prevents policies from being added.
-
removePolicies
Removes all policies for the given scheme. This method is typically called when deleting a scheme.- Parameters:
schemeIdentifier- the identifier of the scheme- Throws:
ProcessSchemeStoreException- if an error prevents policies from being removed.
-