Class ProcessSchemePolicyStore
- java.lang.Object
-
- com.sodius.oslc.server.process.scheme.ProcessSchemePolicyStore
-
public abstract class ProcessSchemePolicyStore extends Object
Manages access to process scheme policies.- Since:
- 3.5.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProcessSchemePolicyStore.PolicyKey
Represents a composite key for policy settings, for a given friend (may benull)
, resource type (may benull)
and link type (may benull)
.
-
Constructor Summary
Constructors Constructor Description ProcessSchemePolicyStore()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ProcessSchemePolicyStore
getInstance()
Returns the current store instance.Collection<NativeLinkType>
getNativeLinkTypes()
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 void
removePolicies(String schemeIdentifier)
Removes all policies for the given scheme.static void
setInstance(ProcessSchemePolicyStore store)
Replaces the current store instance with the given one.abstract void
updatePolicies(String schemeIdentifier, Collection<ProcessSchemePolicyStore.PolicyKey> policiesToRemove, Map<ProcessSchemePolicyStore.PolicyKey,String> policiesToAdd)
Updates policies of the given scheme.
-
-
-
Method Detail
-
getInstance
public static ProcessSchemePolicyStore getInstance()
Returns the current store instance.- Returns:
- the current instance.
- See Also:
setInstance(ProcessSchemePolicyStore)
-
setInstance
public static void setInstance(ProcessSchemePolicyStore store)
Replaces the current store instance with the given one.- Parameters:
store
- the new store.
-
getNativeLinkTypes
public Collection<NativeLinkType> getNativeLinkTypes() throws ProcessSchemeStoreException
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 ProcessSchemeStoreException
Updates 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
public abstract void removePolicies(String schemeIdentifier) throws ProcessSchemeStoreException
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.
-
-