use of com.liferay.ide.kaleo.core.op.AssignableOp in project liferay-ide by liferay.
the class RoleNamePossibleValuesMetaService method initIfNecessary.
protected void initIfNecessary(Object object) {
if (object instanceof WorkflowDefinition) {
for (WorkflowNode node : ((WorkflowDefinition) object).getDiagramNodes()) {
Assignable assignable = node.nearest(Assignable.class);
if (assignable != null) {
for (Role role : assignable.getRoles()) {
Value<String> roleName = role.getName();
String name = roleName.content(false);
if (!CoreUtil.isNullOrEmpty(name)) {
_originalRoleNames.add(name);
}
}
}
}
} else if (object instanceof AssignableOp) {
ElementList<RoleName> roleNames = ((AssignableOp) object).getRoleNames();
for (RoleName roleName : roleNames) {
Value<String> nameValue = roleName.getName();
String name = nameValue.content(false);
if (!CoreUtil.isNullOrEmpty(name)) {
_originalRoleNames.add(name);
}
}
}
}
use of com.liferay.ide.kaleo.core.op.AssignableOp in project liferay-ide by liferay.
the class RoleNamePossibleValuesService method _initMetaServiceIfNecessary.
private void _initMetaServiceIfNecessary() {
WorkflowDefinition definition = _op().nearest(WorkflowDefinition.class);
if (definition != null) {
_metaService.initIfNecessary(definition);
}
AssignableOp assignableOp = _op().nearest(AssignableOp.class);
if (assignableOp != null) {
_metaService.initIfNecessary(assignableOp);
}
}
Aggregations