Add support for regions

- Add region id to RepositoryState and hook it
  via RepositoryStateMachineModelFactory.
- Relates to #262
This commit is contained in:
Janne Valkealahti
2016-10-09 21:22:05 +01:00
parent a6d7040199
commit d06d45580a
5 changed files with 107 additions and 1 deletions

View File

@@ -48,6 +48,13 @@ public abstract class RepositoryState extends BaseRepositoryEntity {
*/
public abstract String getState();
/**
* Gets the region.
*
* @return the region
*/
public abstract String getRegion();
/**
* Checks if is initial.
*

View File

@@ -135,7 +135,8 @@ public class RepositoryStateMachineModelFactory extends AbstractStateMachineMode
}
RepositoryState parentState = s.getParentState();
StateData<String, String> stateData = new StateData<String, String>(parentState != null ? parentState.getState() : null, null,
Object region = s.getRegion();
StateData<String, String> stateData = new StateData<String, String>(parentState != null ? parentState.getState() : null, region,
s.getState(), s.isInitial());
stateData.setStateActions(stateActions);
stateData.setEntryActions(entryActions);