Class WorkingSetManager
- java.lang.Object
-
- org.guvnor.common.services.workingset.client.WorkingSetManager
-
@ApplicationScoped public class WorkingSetManager extends Object
-
-
Constructor Summary
Constructors Constructor Description WorkingSetManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.guvnor.common.services.workingset.client.model.WorkingSetSettingsgetActiveSettings(org.uberfire.backend.vfs.Path resource)Collection<org.guvnor.common.services.workingset.client.model.WorkingSetConfigData>getActiveWorkingSets(org.uberfire.backend.vfs.Path resource)Returns the active WorkingSets for a package, or null if any.org.guvnor.common.services.workingset.client.factconstraints.customform.CustomFormConfigurationgetCustomFormConfiguration(org.uberfire.backend.vfs.Path resource, String factType, String fieldName)Returns the associated CustomFormConfiguration for a given FactType and FieldName.Set<org.guvnor.common.services.workingset.client.factconstraints.ConstraintConfiguration>getFieldContraints(org.uberfire.backend.vfs.Path resource, String factType, String fieldName)Returns a Set of Constraints for a Fact Type's field.booleanisAutoVerifierEnabled()TODO: We need to store/retrieve this value from repositorybooleanisWorkingSetActive(org.uberfire.backend.vfs.Path resource, org.uberfire.backend.vfs.Path workingSet)Returns whether the given (WorkingSet) RuleSet is active in a project or not.voidonWorkingSetApplied(org.guvnor.common.services.workingset.client.events.OnWorkingSetApplied event)voidonWorkingSetDisabled(org.guvnor.common.services.workingset.client.events.OnWorkingSetDisabled event)voidremoveWorkingSets(org.uberfire.backend.vfs.Path resource)voidsetAutoVerifierEnabled(boolean autoVerifierEnabled)TODO: We need to store/retrieve this value from repository
-
-
-
Method Detail
-
onWorkingSetApplied
public void onWorkingSetApplied(@Observes org.guvnor.common.services.workingset.client.events.OnWorkingSetApplied event)
-
onWorkingSetDisabled
public void onWorkingSetDisabled(@Observes org.guvnor.common.services.workingset.client.events.OnWorkingSetDisabled event)
-
getActiveWorkingSets
public Collection<org.guvnor.common.services.workingset.client.model.WorkingSetConfigData> getActiveWorkingSets(org.uberfire.backend.vfs.Path resource)
Returns the active WorkingSets for a package, or null if any.- Parameters:
resource- the resource - part of a project- Returns:
- the active WorkingSets for a package, or null if any.
-
getActiveSettings
public org.guvnor.common.services.workingset.client.model.WorkingSetSettings getActiveSettings(org.uberfire.backend.vfs.Path resource)
-
removeWorkingSets
public void removeWorkingSets(org.uberfire.backend.vfs.Path resource)
-
isWorkingSetActive
public boolean isWorkingSetActive(org.uberfire.backend.vfs.Path resource, org.uberfire.backend.vfs.Path workingSet)Returns whether the given (WorkingSet) RuleSet is active in a project or not.- Parameters:
resource- the resource.workingSet- the (WorkingSet) RuleSet- Returns:
- whether the given (WorkingSet) RuleSet is active in a project or not.
-
getFieldContraints
public Set<org.guvnor.common.services.workingset.client.factconstraints.ConstraintConfiguration> getFieldContraints(org.uberfire.backend.vfs.Path resource, String factType, String fieldName)
Returns a Set of Constraints for a Fact Type's field. This method uses the active Working Sets of the project in order to get the Constraints.- Parameters:
resource- the resource.factType- the Fact Type (Short class name)fieldName- the field name- Returns:
- a Set of Constraints for a Fact Type's field.
-
isAutoVerifierEnabled
public boolean isAutoVerifierEnabled()
TODO: We need to store/retrieve this value from repository- Returns:
-
setAutoVerifierEnabled
public void setAutoVerifierEnabled(boolean autoVerifierEnabled)
TODO: We need to store/retrieve this value from repository
-
getCustomFormConfiguration
public org.guvnor.common.services.workingset.client.factconstraints.customform.CustomFormConfiguration getCustomFormConfiguration(org.uberfire.backend.vfs.Path resource, String factType, String fieldName)Returns the associated CustomFormConfiguration for a given FactType and FieldName. Because CustomFormConfiguration is stored inside a WorkingSet, the packageName attribute is used to retrieve all the active WorkingSets. If more than one active WorkingSet contain a CustomFormConfiguration for the given FactType and FieldName the first to be found (in any specific nor deterministic order) will be returned.- Parameters:
resource- the resource (part of of a project). Used to get the active working sets of the active resource projectfactType- The short class name of the Fact TypefieldName- The field name- Returns:
- the associated CustomFormConfiguration for the given FactType and FieldName in the active working sets or null if any.
-
-