public class DefinitionsServiceImpl extends Object implements DefinitionsService, org.osgi.framework.SynchronousBundleListener
Constructor and Description |
---|
DefinitionsServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
bundleChanged(org.osgi.framework.BundleEvent event) |
Condition |
extractConditionBySystemTag(Condition rootCondition,
String systemTag)
Retrieves a condition matching the specified system tag identifier from the specified root condition.
|
Condition |
extractConditionByTag(Condition rootCondition,
String tag)
Deprecated.
As of version 1.2.0-incubating, use
extractConditionBySystemTag(Condition, String) instead |
Set<Condition> |
extractConditionsByType(Condition rootCondition,
String typeId)
Retrieves all conditions of the specified type from the specified root condition.
|
ActionType |
getActionType(String id)
Retrieves the action type associated with the specified identifier.
|
Set<ActionType> |
getActionTypeBySystemTag(String tag)
Retrieves the set of action types with the specified system tag.
|
Set<ActionType> |
getActionTypeByTag(String tag)
Retrieves the set of action types with the specified tag.
|
Collection<ActionType> |
getAllActionTypes()
Retrieves all known action types.
|
Collection<ConditionType> |
getAllConditionTypes()
Retrieves all condition types.
|
Collection<ValueType> |
getAllValueTypes()
Retrieves all known value types.
|
ConditionType |
getConditionType(String id)
Retrieves the condition type associated with the specified identifier.
|
Set<ConditionType> |
getConditionTypesBySystemTag(String tag)
Retrieves the set of condition types with the specified system tag.
|
Set<ConditionType> |
getConditionTypesByTag(String tag)
Retrieves the set of condition types with the specified tag.
|
PropertyMergeStrategyType |
getPropertyMergeStrategyType(String id)
Retrieves the property merge strategy type associated with the specified identifier.
|
Map<Long,List<PluginType>> |
getTypesByPlugin()
Retrieves a Map of plugin identifier to a list of plugin types defined by that particular plugin.
|
ValueType |
getValueType(String id)
Retrieves the value type associated with the specified identifier.
|
Set<ValueType> |
getValueTypeByTag(String tag)
Retrieves the set of value types with the specified tag.
|
void |
postConstruct() |
void |
preDestroy() |
void |
refresh()
Forces a refresh of the definitions from the persistence service.
|
void |
reloadTypes(boolean refresh) |
void |
removeActionType(String id)
Remove the action type
|
void |
removeConditionType(String id)
Remove the condition type
|
boolean |
resolveConditionType(Condition rootCondition)
Resolves (if possible) the
ConditionType s for the specified condition and its sub-conditions (if any) from the type identifiers existing on the specified condition
TODO: remove from API and move to a different class? |
void |
setActionType(ActionType actionType)
Stores the action type
|
void |
setBundleContext(org.osgi.framework.BundleContext bundleContext) |
void |
setConditionType(ConditionType conditionType)
Stores the condition type
|
void |
setDefinitionsRefreshInterval(long definitionsRefreshInterval) |
void |
setPersistenceService(PersistenceService persistenceService) |
void |
setSchedulerService(SchedulerService schedulerService) |
public void setBundleContext(org.osgi.framework.BundleContext bundleContext)
public void setPersistenceService(PersistenceService persistenceService)
public void setSchedulerService(SchedulerService schedulerService)
public void setDefinitionsRefreshInterval(long definitionsRefreshInterval)
public void postConstruct()
public void reloadTypes(boolean refresh)
public void preDestroy()
public Map<Long,List<PluginType>> getTypesByPlugin()
DefinitionsService
getTypesByPlugin
in interface DefinitionsService
public Collection<ConditionType> getAllConditionTypes()
DefinitionsService
getAllConditionTypes
in interface DefinitionsService
public Set<ConditionType> getConditionTypesByTag(String tag)
DefinitionsService
getConditionTypesByTag
in interface DefinitionsService
tag
- the tag marking the condition types we want to retrievepublic Set<ConditionType> getConditionTypesBySystemTag(String tag)
DefinitionsService
getConditionTypesBySystemTag
in interface DefinitionsService
tag
- the system tag marking the condition types we want to retrievepublic ConditionType getConditionType(String id)
DefinitionsService
getConditionType
in interface DefinitionsService
id
- the identifier of the condition type to retrievenull
if no such condition type existspublic void removeConditionType(String id)
DefinitionsService
removeConditionType
in interface DefinitionsService
id
- the condition type to removepublic void setConditionType(ConditionType conditionType)
DefinitionsService
setConditionType
in interface DefinitionsService
conditionType
- the condition type to storepublic Collection<ActionType> getAllActionTypes()
DefinitionsService
getAllActionTypes
in interface DefinitionsService
public Set<ActionType> getActionTypeByTag(String tag)
DefinitionsService
getActionTypeByTag
in interface DefinitionsService
tag
- the tag marking the action types we want to retrievepublic Set<ActionType> getActionTypeBySystemTag(String tag)
DefinitionsService
getActionTypeBySystemTag
in interface DefinitionsService
tag
- the system tag marking the action types we want to retrievepublic ActionType getActionType(String id)
DefinitionsService
getActionType
in interface DefinitionsService
id
- the identifier of the action type to retrievenull
if no such action type existspublic void removeActionType(String id)
DefinitionsService
removeActionType
in interface DefinitionsService
id
- the action type to removepublic void setActionType(ActionType actionType)
DefinitionsService
setActionType
in interface DefinitionsService
actionType
- the action type to storepublic Collection<ValueType> getAllValueTypes()
DefinitionsService
getAllValueTypes
in interface DefinitionsService
public Set<ValueType> getValueTypeByTag(String tag)
DefinitionsService
getValueTypeByTag
in interface DefinitionsService
tag
- the tag marking the value types we want to retrievepublic ValueType getValueType(String id)
DefinitionsService
getValueType
in interface DefinitionsService
id
- the identifier of the value type to retrievenull
if no such value type existspublic void bundleChanged(org.osgi.framework.BundleEvent event)
bundleChanged
in interface org.osgi.framework.BundleListener
public PropertyMergeStrategyType getPropertyMergeStrategyType(String id)
DefinitionsService
getPropertyMergeStrategyType
in interface DefinitionsService
id
- the identifier of the property merge strategy type to retrievenull
if no such property merge strategy type existspublic Set<Condition> extractConditionsByType(Condition rootCondition, String typeId)
DefinitionsService
extractConditionsByType
in interface DefinitionsService
rootCondition
- the condition from which we want to extract all conditions with the specified typetypeId
- the identifier of the condition type we want conditions to extract to match@Deprecated public Condition extractConditionByTag(Condition rootCondition, String tag)
extractConditionBySystemTag(Condition, String)
insteadDefinitionsService
extractConditionByTag
in interface DefinitionsService
rootCondition
- the root condition where to start the extraction by classtag
- the tag to use to extract the conditionpublic Condition extractConditionBySystemTag(Condition rootCondition, String systemTag)
DefinitionsService
extractConditionBySystemTag
in interface DefinitionsService
rootCondition
- the root condition where to start the extraction by classsystemTag
- the tag to use to extract the conditionpublic boolean resolveConditionType(Condition rootCondition)
DefinitionsService
ConditionType
s for the specified condition and its sub-conditions (if any) from the type identifiers existing on the specified condition
TODO: remove from API and move to a different class?resolveConditionType
in interface DefinitionsService
rootCondition
- the condition for which we want to resolve the condition types from the existing condition type identifierstrue
public void refresh()
DefinitionsService
refresh
in interface DefinitionsService
Copyright © 2014–2023 Apache Software Foundation. All rights reserved.