Package com.e1c.g5.dt.core.api.naming
Interface INamingServiceProvider
-
public interface INamingServiceProvider
Provider of a naming information for aINamingService
. Business subsystems must implement it to contribute the business-specific naming information to theINamingService
Partial implementation of providing methods is possible in case if the subsystem provides resources/objects with a specific nature
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
INamingServiceProvider.ProviderMatcher<S,D>
Container for naming matchers.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default String
getDependentObjectFqnAsString(org.eclipse.emf.common.util.URI parentObjectUri, org.eclipse.emf.ecore.EClass targetEClass)
Gets dependent object FQN in a form of a string representationdefault INamingServiceProvider.ProviderMatcher<Collection<org.eclipse.emf.ecore.EClass>,BiPredicate<org.eclipse.emf.ecore.EClass,org.eclipse.emf.common.util.URI>>
getDependentObjectNameByUriMatcher()
Matcher for agetDependentObjectFqnAsString(URI, EClass)
operation.default org.eclipse.emf.common.util.URI
getParentObjectUri(String dependentObjectFqn, String projectName)
Gets the parent object URI using the provided matching dependent object URI.default org.eclipse.emf.common.util.URI
getParentObjectUri(org.eclipse.emf.common.util.URI dependentObjectUri)
Gets the parent object URI using the provided matching dependent object URI.default String
getParentObjectUriAsString(org.eclipse.emf.common.util.URI dependentObjectUri)
Gets the parent object URI (in form of string) using the provided matching dependent object URI.default Predicate<org.eclipse.emf.common.util.URI>
getParentObjectUriByDependentUriMatcher()
default Predicate<String>
getParentObjectUriMatcher()
default String
getProjectPath(String sourceUri, boolean includeFragment)
Gets universal relative project path from the provided URI.default String
getProjectPath(org.eclipse.emf.common.util.URI sourceUri, boolean includeFragment)
Gets universal relative project path from the provided URI.default Predicate<String>
getProjectPathFromStringMatcher()
A matcher for agetProjectPath(String, boolean)
operation.default Predicate<org.eclipse.emf.common.util.URI>
getProjectPathFromUriMatcher()
A matcher for agetProjectPath(URI, boolean)
operation.
-
-
-
Method Detail
-
getDependentObjectFqnAsString
default String getDependentObjectFqnAsString(org.eclipse.emf.common.util.URI parentObjectUri, org.eclipse.emf.ecore.EClass targetEClass)
Gets dependent object FQN in a form of a string representation- Parameters:
parentObjectUri
- The parent object URI. May not benull
targetEClass
- TargetEClass
of a required dependent object. May not benull
- Returns:
- The textual representation of an FQN if applocable.
null
otherwise
-
getDependentObjectNameByUriMatcher
default INamingServiceProvider.ProviderMatcher<Collection<org.eclipse.emf.ecore.EClass>,BiPredicate<org.eclipse.emf.ecore.EClass,org.eclipse.emf.common.util.URI>> getDependentObjectNameByUriMatcher()
Matcher for agetDependentObjectFqnAsString(URI, EClass)
operation. Matches bothEClass
of a dependent object and parent objectURI
- Returns:
- The matcher set. May be
null
-
getParentObjectUri
default org.eclipse.emf.common.util.URI getParentObjectUri(String dependentObjectFqn, String projectName)
Gets the parent object URI using the provided matching dependent object URI. The matching should be always one to one (a single dependent object may not have multiple parents)- Parameters:
dependentObjectFQN
- The dependent object FQN. May not benull
projectName
- The name of a target project. May not benull
- Returns:
- The parent object URI if any.
null
otherwise
-
getParentObjectUri
default org.eclipse.emf.common.util.URI getParentObjectUri(org.eclipse.emf.common.util.URI dependentObjectUri)
Gets the parent object URI using the provided matching dependent object URI. The matching should be always one to one (a single dependent object may not have multiple parents)- Parameters:
dependentObjectUri
- Dependent object URI (with project information within the URI). May not benull
- Returns:
- The parent object URI if any.
null
otherwise
-
getParentObjectUriAsString
default String getParentObjectUriAsString(org.eclipse.emf.common.util.URI dependentObjectUri)
Gets the parent object URI (in form of string) using the provided matching dependent object URI. The matching should be always one to one (a single dependent object may not have multiple parents)- Parameters:
dependentObjectUri
- The dependent object URI. May not benull
- Returns:
- The textual representation of a parent object URI. May be
null
-
getParentObjectUriByDependentUriMatcher
default Predicate<org.eclipse.emf.common.util.URI> getParentObjectUriByDependentUriMatcher()
-
getProjectPath
default String getProjectPath(String sourceUri, boolean includeFragment)
Gets universal relative project path from the provided URI. Optionally adds fragment to the result path using '#' delimeter- Parameters:
sourceUri
- Source URI in form of a string. Supports resource, plugin and BM schemes. May not benull
includeFragment
- Include fragment of a given URI into the result- Returns:
- The textual representation of a path. May be
null
-
getProjectPath
default String getProjectPath(org.eclipse.emf.common.util.URI sourceUri, boolean includeFragment)
Gets universal relative project path from the provided URI. Optionally adds fragment to the result path using '#' delimeter- Parameters:
sourceUri
- Source URI. Supports resource, plugin and BM schemes. May not benull
includeFragment
- Include fragment of a given URI into the result- Returns:
- The textual representation of a path. May be
null
-
getProjectPathFromStringMatcher
default Predicate<String> getProjectPathFromStringMatcher()
A matcher for agetProjectPath(String, boolean)
operation. Matches provided URIs- Returns:
- A matcher. May be
null
-
getProjectPathFromUriMatcher
default Predicate<org.eclipse.emf.common.util.URI> getProjectPathFromUriMatcher()
A matcher for agetProjectPath(URI, boolean)
operation. Matches provided URIs- Returns:
- A matcher. May be
null
-
-