Class NativeLinks
java.lang.Object
com.sodius.oslc.server.process.scheme.NativeLinks
Helper class to
set the configured native link types, of a scheme, on given resources.- Since:
- 3.9.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<NativeLinkTypeChange> getChanges(ProcessSchemePolicy oldPolicy, ProcessSchemePolicy newPolicy) Convenient method to pull thenative link type changesout of two given policies.static List<NativeLinkTypeChange> getChanges(ProcessSchemePolicyChangeSet schemeChanges) Convenient method to pull thenative link type changesout ofprocess scheme policy changes.Gets the native link type mappings.static NativeLinksConstructs an instance for a given resources container.voidset(Function<String, Collection<Link>> nativeLinks, IExtendedResource resource) Sets a given set of native link on a target resource.
-
Method Details
-
getChanges
public static List<NativeLinkTypeChange> getChanges(ProcessSchemePolicy oldPolicy, ProcessSchemePolicy newPolicy) Convenient method to pull thenative link type changesout of two given policies.- Parameters:
oldPolicy- the old policy.newPolicy- the new policy.- Returns:
- the contained native link type changes.
-
getChanges
Convenient method to pull thenative link type changesout ofprocess scheme policy changes.- Parameters:
schemeChanges- the process scheme policy changes.- Returns:
- the contained native link type changes.
-
of
Constructs an instance for a given resources container.- Parameters:
container- the given resources container, typically a project identifier.- Returns:
- the corresponding instance.
- Throws:
OslcWebApplicationException- if scheme policies are not available.
-
getTypeMappings
Gets the native link type mappings.- Returns:
- the native link type mappings.
-
set
public void set(Function<String, Collection<Link>> nativeLinks, IExtendedResource resource) throws LinkingTypesStoreExceptionSets a given set of native link on a target resource.- Parameters:
nativeLinks- a function to resolve the native links for a given native link type.resource- the target resource.- Throws:
LinkingTypesStoreException- if an error prevents link types from being retrieved - added in 3.13.0.- Since:
- 3.13.0
-