Commit a893bf31 authored by Gianluca Filippone's avatar Gianluca Filippone
Browse files

Refactoring ChoreographyTO class

parent 9e9c08a5
......@@ -46,8 +46,6 @@ public class ChoreographyDetailPage extends BaseExtPage {
private final String choreographyId;
private final String choreographyKey;
private final ChoreographyTO choreography;
public ChoreographyDetailPage(final PageParameters parameters) {
......@@ -55,7 +53,6 @@ public class ChoreographyDetailPage extends BaseExtPage {
restClient = new ChoreographyRestClient();
choreographyId = parameters.get("chorId").toString();
choreographyKey = parameters.get("key").toString();
choreography = restClient.getChoreography(choreographyId);
......@@ -104,7 +101,7 @@ public class ChoreographyDetailPage extends BaseExtPage {
tabs.add(new AbstractTab(new ResourceModel("services")) {
@Override
public WebMarkupContainer getPanel(final String panelId) {
return new ChoreographyServiceDirectoryPanel(panelId, getPageReference(), choreographyKey);
return new ChoreographyServiceDirectoryPanel(panelId, getPageReference(), choreography);
}
});
......
......@@ -134,7 +134,6 @@ public class ChoreographyDirectoryPanel extends GroupDirectoryPanel {
PageParameters param = new PageParameters();
param.add("chorId",
model.getObject().getPlainAttrMap().get("id").getValues().iterator().next());
param.add("key", model.getObject().getKey());
setResponsePage(ChoreographyDetailPage.class, param);
}
}, ChoreographyActionsPanel.ChoreographyActionType.SHOW);
......
......@@ -15,6 +15,7 @@
*/
package org.apache.syncope.client.console.panels;
import eu.chorevolution.idm.common.to.ChoreographyTO;
import java.util.ArrayList;
import java.util.List;
import org.apache.syncope.client.console.pages.ChoreographyPage;
......@@ -28,11 +29,15 @@ public class ChoreographyServiceDirectoryPanel extends AnyObjectDirectoryPanel {
private static final long serialVersionUID = 7303610381539502741L;
private final ChoreographyTO choreography;
public ChoreographyServiceDirectoryPanel(final String id,
final PageReference pageRef,
final String choreographyKey) {
final ChoreographyTO choreography) {
super(id, new Builder(AnyTypeKind.ANY_OBJECT.name(), pageRef), false);
this.fiql = new AnyObjectFiqlSearchConditionBuilder("ENACTMENT ENGINE").inGroups(choreographyKey).query();
this.choreography = choreography;
this.fiql = new AnyObjectFiqlSearchConditionBuilder("ENACTMENT ENGINE")
.inGroups(choreography.getGroupKey()).query();
dataProvider.setFIQL(fiql);
}
......
......@@ -27,6 +27,8 @@ public class ChoreographyTO extends AbstractBaseBean {
private String id;
private String groupKey;
private String name;
private String description;
......@@ -45,6 +47,14 @@ public class ChoreographyTO extends AbstractBaseBean {
this.id = id;
}
public String getGroupKey() {
return groupKey;
}
public void setGroupKey(final String groupKey) {
this.groupKey = groupKey;
}
public String getName() {
return name;
}
......
......@@ -61,6 +61,7 @@ public class MonitorLogic extends AbstractTransactionalLogic<AbstractBaseBean> {
private ChoreographyTO getChoreographyTO(final Group choreography, final boolean details) {
ChoreographyTO choreographyTO = new ChoreographyTO();
choreographyTO.setGroupKey(choreography.getKey());
choreographyTO.setName(choreography.getName());
GPlainAttr id = choreography.getPlainAttr("id");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment