Commit 3510ce4d authored by Gianluca Filippone's avatar Gianluca Filippone
Browse files

Added username and password for Synthesis Processor, implemented delete function

parent 78080575
...@@ -611,6 +611,14 @@ we are happy to inform you that the password request was execute successfully fo ...@@ -611,6 +611,14 @@ we are happy to inform you that the password request was execute successfully fo
<PlainSchema id="synthesisProcessorBaseURL" mandatoryCondition="true" <PlainSchema id="synthesisProcessorBaseURL" mandatoryCondition="true"
multivalue="0" readonly="0" type="String" uniqueConstraint="0" anyTypeClass_id="Synthesis Processor"/> multivalue="0" readonly="0" type="String" uniqueConstraint="0" anyTypeClass_id="Synthesis Processor"/>
   
<SyncopeSchema id="synthesisProcessorUsername"/>
<PlainSchema id="synthesisProcessorUsername" mandatoryCondition="false"
multivalue="0" readonly="0" type="String" uniqueConstraint="0" anyTypeClass_id="Synthesis Processor"/>
<SyncopeSchema id="synthesisProcessorPassword"/>
<PlainSchema id="synthesisProcessorPassword" cipherAlgorithm="AES" secretKey="synthesisProcessorPassword" type="Encrypted" mandatoryCondition="false"
multivalue="0" readonly="0" uniqueConstraint="0" anyTypeClass_id="Synthesis Processor"/>
<SyncopeGroup id="0635553c-3f38-4a6d-b555-3c3f382a6ddb" name="ServiceProviderApprover" <SyncopeGroup id="0635553c-3f38-4a6d-b555-3c3f382a6ddb" name="ServiceProviderApprover"
realm_id="ea696a4f-e77a-4ef1-be67-8f8093bc8686" realm_id="ea696a4f-e77a-4ef1-be67-8f8093bc8686"
creator="admin" lastModifier="admin" creator="admin" lastModifier="admin"
...@@ -650,6 +658,14 @@ we are happy to inform you that the password request was execute successfully fo ...@@ -650,6 +658,14 @@ we are happy to inform you that the password request was execute successfully fo
schema_id="synthesisProcessorBaseURL"/> schema_id="synthesisProcessorBaseURL"/>
<APlainAttrValue id="4f802e66-a3ba-49dd-825f-9a1c9cbe88cd" attribute_id="3ca18013-7efd-462f-84a8-c8dfe059e851" <APlainAttrValue id="4f802e66-a3ba-49dd-825f-9a1c9cbe88cd" attribute_id="3ca18013-7efd-462f-84a8-c8dfe059e851"
stringValue="http://localhost:9080/choremocks/rest/synthesis"/> stringValue="http://localhost:9080/choremocks/rest/synthesis"/>
<APlainAttr id="3bd79075-def6-4c34-8002-d02206727320" owner_id="467a4bfb-d9eb-42b1-bbe8-0246e665e47f"
schema_id="synthesisProcessorUsername"/>
<APlainAttrValue id="e560653e-9b01-4eb0-be67-2a1471f8ad7a" attribute_id="3bd79075-def6-4c34-8002-d02206727320"
stringValue="admin"/>
<APlainAttr id="a84d3aa1-fafa-41ea-9f5b-1225af92adc9" owner_id="467a4bfb-d9eb-42b1-bbe8-0246e665e47f"
schema_id="synthesisProcessorPassword"/>
<APlainAttrValue id="42d4059f-ffc7-4a93-8b5f-e78f4f7d397a" attribute_id="a84d3aa1-fafa-41ea-9f5b-1225af92adc9"
stringValue="ODW7yZy5CJjZ3DJGChOing=="/>
<!-- [END] CHOReVOLUTION --> <!-- [END] CHOReVOLUTION -->
   
<!-- [START Choreographies --> <!-- [START Choreographies -->
...@@ -19,11 +19,18 @@ import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal; ...@@ -19,11 +19,18 @@ import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.commons.AnyDataProvider; import org.apache.syncope.client.console.commons.AnyDataProvider;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.EnactmentEngineDataProvider; import org.apache.syncope.client.console.commons.EnactmentEngineDataProvider;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.pages.EnactmentEngineDetailPage; import org.apache.syncope.client.console.pages.EnactmentEngineDetailPage;
import org.apache.syncope.client.console.pages.EnactmentEnginePage; import org.apache.syncope.client.console.pages.EnactmentEnginePage;
import static org.apache.syncope.client.console.panels.DirectoryPanel.LOG;
import org.apache.syncope.client.console.rest.EnactmentEngineRestClient;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal; import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.search.AnyObjectFiqlSearchConditionBuilder; import org.apache.syncope.common.lib.search.AnyObjectFiqlSearchConditionBuilder;
import org.apache.syncope.common.lib.to.AnyObjectTO; import org.apache.syncope.common.lib.to.AnyObjectTO;
import org.apache.syncope.common.lib.types.AnyTypeKind; import org.apache.syncope.common.lib.types.AnyTypeKind;
...@@ -48,9 +55,13 @@ public class EnactmentEngineDirectoryPanel extends AnyObjectDirectoryPanel { ...@@ -48,9 +55,13 @@ public class EnactmentEngineDirectoryPanel extends AnyObjectDirectoryPanel {
private final BaseModal<Serializable> utilityModal = new BaseModal<>("outer"); private final BaseModal<Serializable> utilityModal = new BaseModal<>("outer");
private final EnactmentEngineRestClient enactmentEngineRestClient;
public EnactmentEngineDirectoryPanel(final String id, final PageReference pageRef) { public EnactmentEngineDirectoryPanel(final String id, final PageReference pageRef) {
super(id, new Builder(AnyTypeKind.ANY_OBJECT.name(), pageRef), false); super(id, new Builder(AnyTypeKind.ANY_OBJECT.name(), pageRef), false);
this.enactmentEngineRestClient = new EnactmentEngineRestClient();
utilityModal.addSubmitButton(); utilityModal.addSubmitButton();
utilityModal.size(Modal.Size.Medium); utilityModal.size(Modal.Size.Medium);
addOuterObject(utilityModal); addOuterObject(utilityModal);
...@@ -142,7 +153,16 @@ public class EnactmentEngineDirectoryPanel extends AnyObjectDirectoryPanel { ...@@ -142,7 +153,16 @@ public class EnactmentEngineDirectoryPanel extends AnyObjectDirectoryPanel {
@Override @Override
public void onClick(final AjaxRequestTarget target) { public void onClick(final AjaxRequestTarget target) {
try {
enactmentEngineRestClient.delete(model.getObject().getKey());
SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
target.add(container);
} catch (SyncopeClientException e) {
LOG.error("While deleting object {}", model.getObject().getKey(), e);
SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
? e.getClass().getName() : e.getMessage());
}
((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
} }
}, ChoreographyActionsPanel.ChoreographyActionType.DELETE); }, ChoreographyActionsPanel.ChoreographyActionType.DELETE);
item.add(choreographyActionsPanel); item.add(choreographyActionsPanel);
......
...@@ -42,4 +42,8 @@ public class EnactmentEngineRestClient extends BaseRestClient { ...@@ -42,4 +42,8 @@ public class EnactmentEngineRestClient extends BaseRestClient {
public void update(final EnactmentEngineTO enactmentEngineTO) { public void update(final EnactmentEngineTO enactmentEngineTO) {
getService(EEService.class).update(enactmentEngineTO); getService(EEService.class).update(enactmentEngineTO);
} }
public void delete(final String enactmentEngineKey) {
getService(EEService.class).delete(enactmentEngineKey);
}
} }
...@@ -80,12 +80,6 @@ public class EELogic extends AbstractTransactionalLogic<AbstractBaseBean> { ...@@ -80,12 +80,6 @@ public class EELogic extends AbstractTransactionalLogic<AbstractBaseBean> {
.schema(ENACTMENT_ENGINE_BASE_URL_SCHEMA).value(updatedEEData.getBaseUrl()).build()).build()); .schema(ENACTMENT_ENGINE_BASE_URL_SCHEMA).value(updatedEEData.getBaseUrl()).build()).build());
} }
if (updatedEEData.getUsername() != null && !updatedEEData.getUsername()
.equals(enactmentEngine.getPlainAttrMap().get(ENACTMENT_ENGINE_USERNAME_SCHEMA).getValues().get(0))) {
eePatch.getPlainAttrs().add(new AttrPatch.Builder().attrTO(new AttrTO.Builder()
.schema(ENACTMENT_ENGINE_USERNAME_SCHEMA).value(updatedEEData.getUsername()).build()).build());
}
if (updatedEEData.getPassword() != null && !updatedEEData.getPassword() if (updatedEEData.getPassword() != null && !updatedEEData.getPassword()
.equals(enactmentEngine.getPlainAttrMap().get(ENACTMENT_ENGINE_PASSWORD_SCHEMA).getValues().get(0))) { .equals(enactmentEngine.getPlainAttrMap().get(ENACTMENT_ENGINE_PASSWORD_SCHEMA).getValues().get(0))) {
eePatch.getPlainAttrs().add(new AttrPatch.Builder().attrTO(new AttrTO.Builder() eePatch.getPlainAttrs().add(new AttrPatch.Builder().attrTO(new AttrTO.Builder()
...@@ -95,6 +89,10 @@ public class EELogic extends AbstractTransactionalLogic<AbstractBaseBean> { ...@@ -95,6 +89,10 @@ public class EELogic extends AbstractTransactionalLogic<AbstractBaseBean> {
anyObjectLogic.update(eePatch, false); anyObjectLogic.update(eePatch, false);
} }
public void delete(final String enactmentEngineKey) {
anyObjectLogic.delete(enactmentEngineKey, true);
}
@Override @Override
protected AbstractBaseBean resolveReference(final Method method, final Object... os) protected AbstractBaseBean resolveReference(final Method method, final Object... os)
throws UnresolvedReferenceException { throws UnresolvedReferenceException {
......
...@@ -16,10 +16,13 @@ ...@@ -16,10 +16,13 @@
package org.apache.syncope.common.rest.api.service; package org.apache.syncope.common.rest.api.service;
import eu.chorevolution.idm.common.to.EnactmentEngineTO; import eu.chorevolution.idm.common.to.EnactmentEngineTO;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.POST; import javax.ws.rs.POST;
import javax.ws.rs.PUT; import javax.ws.rs.PUT;
import javax.ws.rs.Path; import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
...@@ -29,13 +32,34 @@ import javax.ws.rs.core.Response; ...@@ -29,13 +32,34 @@ import javax.ws.rs.core.Response;
@Path("enactmentengine") @Path("enactmentengine")
public interface EEService extends JAXRSService { public interface EEService extends JAXRSService {
/**
* Create a new Enactment Engine
*
* @param enactmentEngineTO enactment engine to be created
* @return the id of the created Enactment Engine
*/
@POST @POST
@Path("/create") @Path("/create")
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
Response create(EnactmentEngineTO enactmentEngineTO); Response create(EnactmentEngineTO enactmentEngineTO);
/**
* Update an Enactment Engine
*
* @param enactmentEngineTO enactment engine to be updated
*/
@PUT @PUT
@Path("/update") @Path("/update")
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) @Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
void update(EnactmentEngineTO enactmentEngineTO); void update(EnactmentEngineTO enactmentEngineTO);
/**
* Delete an Enactment Engine
*
* @param key enactment engine key
*/
@DELETE
@Path("{key}")
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
void delete(@NotNull @PathParam("key") String key);
} }
...@@ -41,4 +41,8 @@ public class EEServiceImpl extends AbstractServiceImpl implements EEService { ...@@ -41,4 +41,8 @@ public class EEServiceImpl extends AbstractServiceImpl implements EEService {
logic.update(enactmentEngineTO); logic.update(enactmentEngineTO);
} }
@Override
public void delete(final String enactmentEngineKey) {
logic.delete(enactmentEngineKey);
}
} }
...@@ -17,6 +17,7 @@ package org.apache.syncope.client.console.panels; ...@@ -17,6 +17,7 @@ package org.apache.syncope.client.console.panels;
import java.io.Serializable; import java.io.Serializable;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal; import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxPasswordFieldPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel; import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel; import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
import org.apache.wicket.PageReference; import org.apache.wicket.PageReference;
...@@ -32,8 +33,13 @@ public abstract class AbstractSynthesisProcessorModalPanel extends AbstractModal ...@@ -32,8 +33,13 @@ public abstract class AbstractSynthesisProcessorModalPanel extends AbstractModal
protected final FieldPanel<String> nameInput; protected final FieldPanel<String> nameInput;
protected final FieldPanel<String> usernameInput;
protected final FieldPanel<String> passwordInput;
protected final FieldPanel<String> urlInput; protected final FieldPanel<String> urlInput;
public AbstractSynthesisProcessorModalPanel( public AbstractSynthesisProcessorModalPanel(
final BaseModal<Serializable> modal, final BaseModal<Serializable> modal,
final PageReference pageRef) { final PageReference pageRef) {
...@@ -45,8 +51,8 @@ public abstract class AbstractSynthesisProcessorModalPanel extends AbstractModal ...@@ -45,8 +51,8 @@ public abstract class AbstractSynthesisProcessorModalPanel extends AbstractModal
container.setOutputMarkupId(true); container.setOutputMarkupId(true);
add(container); add(container);
final Form<String> form = new Form<>("AddEEForm"); final Form<String> form = new Form<>("AddSynthesisProcessorForm");
form.setMarkupId("AddEEForm"); form.setMarkupId("AddSynthesisProcessorForm");
form.setOutputMarkupId(true); form.setOutputMarkupId(true);
container.add(form); container.add(form);
...@@ -55,6 +61,16 @@ public abstract class AbstractSynthesisProcessorModalPanel extends AbstractModal ...@@ -55,6 +61,16 @@ public abstract class AbstractSynthesisProcessorModalPanel extends AbstractModal
nameInput.addRequiredLabel(); nameInput.addRequiredLabel();
form.add(nameInput); form.add(nameInput);
this.usernameInput = new AjaxTextFieldPanel("username", "Username", new Model<>(), true);
usernameInput.setRequired(true);
usernameInput.addRequiredLabel();
form.add(usernameInput);
this.passwordInput = new AjaxPasswordFieldPanel("password", "Password", new Model<>(), true);
passwordInput.setRequired(true);
passwordInput.addRequiredLabel();
form.add(passwordInput);
this.urlInput = new AjaxTextFieldPanel("url", "Base URL", new Model<>(), true); this.urlInput = new AjaxTextFieldPanel("url", "Base URL", new Model<>(), true);
urlInput.setRequired(true); urlInput.setRequired(true);
urlInput.addRequiredLabel(); urlInput.addRequiredLabel();
......
...@@ -47,6 +47,8 @@ public class AddSynthesisProcessorModalPanel extends AbstractSynthesisProcessorM ...@@ -47,6 +47,8 @@ public class AddSynthesisProcessorModalPanel extends AbstractSynthesisProcessorM
SynthesisProcessorTO synthesisProcessorTO = new SynthesisProcessorTO(); SynthesisProcessorTO synthesisProcessorTO = new SynthesisProcessorTO();
synthesisProcessorTO.setName(nameInput.getModelObject()); synthesisProcessorTO.setName(nameInput.getModelObject());
synthesisProcessorTO.setBaseUrl(urlInput.getModelObject()); synthesisProcessorTO.setBaseUrl(urlInput.getModelObject());
synthesisProcessorTO.setUsername(usernameInput.getModelObject());
synthesisProcessorTO.setPassword(passwordInput.getModelObject());
restClient.create(synthesisProcessorTO); restClient.create(synthesisProcessorTO);
modal.close(target); modal.close(target);
SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
......
...@@ -49,6 +49,12 @@ public class EditSynthesisProcessorModalPanel extends AbstractSynthesisProcessor ...@@ -49,6 +49,12 @@ public class EditSynthesisProcessorModalPanel extends AbstractSynthesisProcessor
nameInput.setModelObject(synthesisProcessor.getName()); nameInput.setModelObject(synthesisProcessor.getName());
urlInput.setModelObject(synthesisProcessor.getPlainAttrMap() urlInput.setModelObject(synthesisProcessor.getPlainAttrMap()
.get("synthesisProcessorBaseURL").getValues().get(0)); .get("synthesisProcessorBaseURL").getValues().get(0));
usernameInput.setModelObject(synthesisProcessor.getPlainAttrMap()
.get("synthesisProcessorUsername").getValues().get(0));
/*passwordInput.setModelObject(synthesisProcessor.
getPlainAttrMap().get("synthesisProcessorPassword").getValues().get(0));*/
passwordInput.setRequired(false);
passwordInput.setEnabled(false);
} }
@Override @Override
...@@ -58,6 +64,8 @@ public class EditSynthesisProcessorModalPanel extends AbstractSynthesisProcessor ...@@ -58,6 +64,8 @@ public class EditSynthesisProcessorModalPanel extends AbstractSynthesisProcessor
synthesisProcessorTO.setKey((synthesisProcessor.getKey())); synthesisProcessorTO.setKey((synthesisProcessor.getKey()));
synthesisProcessorTO.setName(nameInput.getModelObject()); synthesisProcessorTO.setName(nameInput.getModelObject());
synthesisProcessorTO.setBaseUrl(urlInput.getModelObject()); synthesisProcessorTO.setBaseUrl(urlInput.getModelObject());
synthesisProcessorTO.setUsername(usernameInput.getModelObject());
synthesisProcessorTO.setPassword(passwordInput.getModelObject());
restClient.update(synthesisProcessorTO); restClient.update(synthesisProcessorTO);
modal.close(target); modal.close(target);
SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
......
...@@ -4,11 +4,17 @@ import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal; ...@@ -4,11 +4,17 @@ import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.commons.AnyDataProvider; import org.apache.syncope.client.console.commons.AnyDataProvider;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.commons.SynthesisProcessorDataProvider; import org.apache.syncope.client.console.commons.SynthesisProcessorDataProvider;
import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.pages.SynthesisProcessorDetailPage; import org.apache.syncope.client.console.pages.SynthesisProcessorDetailPage;
import org.apache.syncope.client.console.pages.SynthesisProcessorPage; import org.apache.syncope.client.console.pages.SynthesisProcessorPage;
import org.apache.syncope.client.console.rest.SynthesisProcessorRestClient;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal; import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.search.AnyObjectFiqlSearchConditionBuilder; import org.apache.syncope.common.lib.search.AnyObjectFiqlSearchConditionBuilder;
import org.apache.syncope.common.lib.to.AnyObjectTO; import org.apache.syncope.common.lib.to.AnyObjectTO;
import org.apache.syncope.common.lib.types.AnyTypeKind; import org.apache.syncope.common.lib.types.AnyTypeKind;
...@@ -49,9 +55,13 @@ public class SynthesisProcessorDirectoryPanel extends AnyObjectDirectoryPanel { ...@@ -49,9 +55,13 @@ public class SynthesisProcessorDirectoryPanel extends AnyObjectDirectoryPanel {
private final BaseModal<Serializable> utilityModal = new BaseModal<>("outer"); private final BaseModal<Serializable> utilityModal = new BaseModal<>("outer");
private final SynthesisProcessorRestClient synthesisProcessorRestClient;
public SynthesisProcessorDirectoryPanel(final String id, final PageReference pageRef) { public SynthesisProcessorDirectoryPanel(final String id, final PageReference pageRef) {
super(id, new Builder(AnyTypeKind.ANY_OBJECT.name(), pageRef), false); super(id, new Builder(AnyTypeKind.ANY_OBJECT.name(), pageRef), false);
this.synthesisProcessorRestClient = new SynthesisProcessorRestClient();
utilityModal.addSubmitButton(); utilityModal.addSubmitButton();
utilityModal.size(Modal.Size.Medium); utilityModal.size(Modal.Size.Medium);
addOuterObject(utilityModal); addOuterObject(utilityModal);
...@@ -146,7 +156,16 @@ public class SynthesisProcessorDirectoryPanel extends AnyObjectDirectoryPanel { ...@@ -146,7 +156,16 @@ public class SynthesisProcessorDirectoryPanel extends AnyObjectDirectoryPanel {
@Override @Override
public void onClick(final AjaxRequestTarget target) { public void onClick(final AjaxRequestTarget target) {
try {
synthesisProcessorRestClient.delete(model.getObject().getKey());
SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED));
target.add(container);
} catch (SyncopeClientException e) {
LOG.error("While deleting object {}", model.getObject().getKey(), e);
SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage())
? e.getClass().getName() : e.getMessage());
}
((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target);
} }
}, ChoreographyActionsPanel.ChoreographyActionType.DELETE); }, ChoreographyActionsPanel.ChoreographyActionType.DELETE);
item.add(choreographyActionsPanel); item.add(choreographyActionsPanel);
......
...@@ -29,4 +29,8 @@ public class SynthesisProcessorRestClient extends BaseRestClient { ...@@ -29,4 +29,8 @@ public class SynthesisProcessorRestClient extends BaseRestClient {
public void update(final SynthesisProcessorTO synthesisProcessorTO) { public void update(final SynthesisProcessorTO synthesisProcessorTO) {
getService(SynthesisProcessorService.class).update(synthesisProcessorTO); getService(SynthesisProcessorService.class).update(synthesisProcessorTO);
} }
public void delete(final String synthesisProcessorKey) {
getService(SynthesisProcessorService.class).delete(synthesisProcessorKey);
}
} }
...@@ -18,13 +18,19 @@ limitations under the License. ...@@ -18,13 +18,19 @@ limitations under the License.
<wicket:panel> <wicket:panel>
<span wicket:id="container"> <span wicket:id="container">
<div class="form-group"> <div class="form-group">
<form wicket:id="AddEEForm"> <form wicket:id="AddSynthesisProcessorForm">
<div class="form-group"> <div class="form-group">
<span wicket:id="name"/> <span wicket:id="name"/>
</div> </div>
<div class="form-group"> <div class="form-group">
<span wicket:id="url"/> <span wicket:id="url"/>
</div> </div>
<div class="form-group">
<span wicket:id="username"/>
</div>
<div class="form-group">
<span wicket:id="password"/>
</div>
</form> </form>
</div> </div>
</span> </span>
......
...@@ -25,8 +25,11 @@ public class SynthesisProcessorTO extends AbstractBaseBean { ...@@ -25,8 +25,11 @@ public class SynthesisProcessorTO extends AbstractBaseBean {
private String name; private String name;
private String baseUrl; private String username;
private String password;
private String baseUrl;
public String getKey() { public String getKey() {
return key; return key;
...@@ -44,6 +47,22 @@ public class SynthesisProcessorTO extends AbstractBaseBean { ...@@ -44,6 +47,22 @@ public class SynthesisProcessorTO extends AbstractBaseBean {
this.name = name; this.name = name;
} }
public String getUsername() {
return username;
}
public void setUsername(final String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(final String password) {
this.password = password;
}
public String getBaseUrl() { public String getBaseUrl() {
return baseUrl; return baseUrl;
} }
...@@ -51,5 +70,5 @@ public class SynthesisProcessorTO extends AbstractBaseBean { ...@@ -51,5 +70,5 @@ public class SynthesisProcessorTO extends AbstractBaseBean {
public void setBaseUrl(final String baseUrl) { public void setBaseUrl(final String baseUrl) {
this.baseUrl = baseUrl; this.baseUrl = baseUrl;
} }
} }
...@@ -34,6 +34,10 @@ public class SynthesisProcessorLogic extends AbstractLogic<AbstractBaseBean> { ...@@ -34,6 +34,10 @@ public class SynthesisProcessorLogic extends AbstractLogic<AbstractBaseBean> {
private static final String SYNTHESIS_PROCESSOR_BASE_URL_SCHEMA = "synthesisProcessorBaseURL"; private static final String SYNTHESIS_PROCESSOR_BASE_URL_SCHEMA = "synthesisProcessorBaseURL";
private static final String SYNTHESIS_PROCESSOR_USERNAME_SCHEMA = "synthesisProcessorUsername";
private static final String SYNTHESIS_PROCESSOR_PASSWORD_SCHEMA = "synthesisProcessorPassword";
@Autowired @Autowired
private AnyObjectLogic anyObjectLogic; private AnyObjectLogic anyObjectLogic;
...@@ -46,6 +50,12 @@ public class SynthesisProcessorLogic extends AbstractLogic<AbstractBaseBean> { ...@@ -46,6 +50,12 @@ public class SynthesisProcessorLogic extends AbstractLogic<AbstractBaseBean> {
sp.getPlainAttrs().add(new AttrTO.Builder()