public interface DependencyProvider
DependencyProvider establishes the context for
SystemDataConsumers and provides dependency-related information
about them. This allows to implement editors (like the
StaffAssignmentRuleDialogue) for
SystemDataConsumers
in a generic way, without having to know any details about which kinds of
dependency types exist, what contextual arguments they have or what would be
a suitable label text.| Modifier and Type | Method and Description |
|---|---|
Pair<ProcessConstants.AdeptDataType,java.lang.String> |
getCompleteDataTypeOf(java.lang.String parameterName)
Returns the data type (including the UDT name if appropriate) of the
parameter with the specified name or
null if the parameter does not
exist. |
Dependency |
getDependencyOf(java.lang.String parameterName)
Returns dependency-related information about the parameter with the
specified name or
null if the parameter has currently no dependency
bound to it or the parameter does not exist. |
java.util.Map<Dependency,java.lang.String> |
getDependencyTypeArguments(java.lang.Object dependencyType,
ProcessConstants.AdeptDataType dataType,
java.lang.String udtName)
The same as
#getDependencyTypeArguments(Object, AdeptDataType, UUID) but
restricting based on the designated UDT name instead of the identifier ID. |
java.util.Map<Dependency,java.lang.String> |
getDependencyTypeArguments(java.lang.Object dependencyType,
ProcessConstants.AdeptDataType dataType,
java.util.UUID identifierID)
Returns all available dependencies for the specified dependency type in a map.
|
java.util.Map<java.lang.Object,java.lang.String> |
getDependencyTypes(ProcessConstants.AdeptDataType dataType,
java.util.UUID identifierID)
Returns all available dependency types in a map.
|
java.lang.String |
getLabelForArgument(Dependency dependency)
Returns a label text for argument of the designated dependency.
|
java.lang.String |
getLabelForType(java.lang.Object dependencyType)
Returns a label text for the given dependency type.
|
java.lang.String |
getLabelForTypeAndArgument(Dependency dependency)
Returns a label text for the designated dependency.
|
ParameterRef[] |
getParameters()
Returns all already existing parameters.
|
ParameterRef |
getPreferredParameter(Dependency dependency)
Returns the preferred parameter name and type for the specified dependency.
|
boolean |
parameterExists(java.lang.String parameterName)
Returns whether a parameter with the specified name already exists.
|
ParameterRef[] getParameters()
getDependencyOf(String) to retrieve dependency information about
each parameter.boolean parameterExists(java.lang.String parameterName)
parameterName - name of the parameter to be looked forDependency getDependencyOf(java.lang.String parameterName)
null if the parameter has currently no dependency
bound to it or the parameter does not exist.parameterName - the name of the parameter for which to return
dependency-related informationPair<ProcessConstants.AdeptDataType,java.lang.String> getCompleteDataTypeOf(java.lang.String parameterName)
null if the parameter does not
exist.parameterName - the name of the parameter for which to return
dependency-related informationnull will be
returned. If the designated parameter is not
ProcessConstants.AdeptDataType.USERDEFINED, the second element of the pair
will be null.java.util.Map<java.lang.Object,java.lang.String> getDependencyTypes(ProcessConstants.AdeptDataType dataType, java.util.UUID identifierID)
data type and (also optionally} an identifier ID.
The dependency types are represented by objects and used as keys in the
maps. The value is a label text created by getLabelForType(Object).
The map should have a specific, consistent order (-> e.g.
LinkedHashMap).
dataType - data type to limit the number of returned dependency types;
may be null for no restrictionidentifierID - identifier ID to further limit the number of returned
dependency types; may be null for no restrictionjava.util.Map<Dependency,java.lang.String> getDependencyTypeArguments(java.lang.Object dependencyType, ProcessConstants.AdeptDataType dataType, java.util.UUID identifierID)
getLabelForType(Object).
If the dependency type does not need any arguments a singleton map with
null as key is returned. If the returned map is empty this means
that there are no valid arguments which basically renders the dependency
type unusable in the current context.
The map should have a specific, consistent order (-> e.g.
LinkedHashMap).
dependencyType - the dependency type for which to return available
argumentsdataType - data type to limit the number of returned dependency type
argumentsidentifierID - identifier ID to further limit the number of returned
dependency type arguments; may be null for no restrictionjava.util.Map<Dependency,java.lang.String> getDependencyTypeArguments(java.lang.Object dependencyType, ProcessConstants.AdeptDataType dataType, java.lang.String udtName)
#getDependencyTypeArguments(Object, AdeptDataType, UUID) but
restricting based on the designated UDT name instead of the identifier ID.dependencyType - The dependency type for which to return available
arguments.dataType - The data type to limit the number of returned dependency
type arguments.udtName - The name of the UDT (in case of a UDT) to limit the number
of returned dependency type arguments. This may be
null.java.lang.String getLabelForType(java.lang.Object dependencyType)
dependencyType - dependency type for which to return a labeljava.lang.String getLabelForArgument(Dependency dependency)
dependency - The dependency of which to receive a label of the argument.java.lang.String getLabelForTypeAndArgument(Dependency dependency)
dependency - the dependency for which to return a labelParameterRef getPreferredParameter(Dependency dependency)
dependency - the dependency for which to return the preferred
parameter name