[SYNCOPE-156] improve topology performance + basic provisioning implementation aspects
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/310b34af Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/310b34af Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/310b34af Branch: refs/heads/SYNCOPE-156 Commit: 310b34afef103156a49e7a94b862f9f780522f08 Parents: 8fe3c7c Author: fmartelli <[email protected]> Authored: Tue Aug 18 18:24:27 2015 +0200 Committer: fmartelli <[email protected]> Committed: Tue Aug 18 18:24:27 2015 +0200 ---------------------------------------------------------------------- .../client/console/panels/ListViewPanel.java | 68 ++++-- .../console/panels/NotificationPanel.java | 19 +- .../console/panels/ResourceDetailsPanel.java | 2 +- .../console/panels/ResourceMappingPanel.java | 48 ---- .../client/console/panels/ResourceModal.java | 25 ++- .../client/console/rest/AnyTypeRestClient.java | 46 ++++ .../client/console/topology/Topology.java | 169 ++++++++++++-- .../markup/html/form/AjaxCheckBoxPanel.java | 7 +- .../html/form/AjaxDropDownChoicePanel.java | 7 +- .../markup/html/form/AjaxTextFieldPanel.java | 7 +- .../wicket/markup/html/form/FieldPanel.java | 8 +- .../client/console/wizards/AjaxWizard.java | 79 +++++-- .../console/wizards/AjaxWizardBuilder.java | 96 ++++++++ .../console/wizards/AjaxWizardButtonBar.java | 28 ++- .../client/console/wizards/ProvisionWizard.java | 123 ---------- .../provision/ProvisionWizardBuilder.java | 222 +++++++++++++++++++ .../console/panels/ResourceMappingPanel.html | 20 -- .../wizards/ProvisionWizard$AccountLink.html | 23 -- .../wizards/ProvisionWizard$Mapping.html | 23 -- .../wizards/ProvisionWizard$ObjectType.html | 30 --- .../console/wizards/ProvisionWizard.properties | 24 -- .../wizards/ProvisionWizard_it.properties | 24 -- .../wizards/ProvisionWizard_pt_BR.properties | 24 -- .../ProvisionWizardBuilder$ConnObjectLink.html | 31 +++ ...isionWizardBuilder$ConnObjectLink.properties | 20 ++ ...onWizardBuilder$ConnObjectLink_it.properties | 20 ++ ...izardBuilder$ConnObjectLink_pt_BR.properties | 20 ++ .../ProvisionWizardBuilder$Mapping.html | 23 ++ .../ProvisionWizardBuilder$Mapping.properties | 20 ++ ...ProvisionWizardBuilder$Mapping_it.properties | 20 ++ ...visionWizardBuilder$Mapping_pt_BR.properties | 20 ++ .../ProvisionWizardBuilder$ObjectType.html | 31 +++ ...ProvisionWizardBuilder$ObjectType.properties | 24 ++ ...visionWizardBuilder$ObjectType_it.properties | 23 ++ ...ionWizardBuilder$ObjectType_pt_BR.properties | 23 ++ 35 files changed, 965 insertions(+), 432 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java index f89aa9b..1cb987f 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ListViewPanel.java @@ -26,12 +26,15 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; import org.apache.commons.lang3.StringUtils; +import org.apache.syncope.client.console.commons.Constants; import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton; import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink; import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel; import org.apache.syncope.client.console.wizards.AjaxWizard; +import org.apache.syncope.client.console.wizards.AjaxWizardBuilder; import org.apache.wicket.PageReference; import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.event.Broadcast; import org.apache.wicket.event.IEvent; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.basic.Label; @@ -55,7 +58,7 @@ public final class ListViewPanel<T extends Serializable> extends Panel { private final ClearIndicatingAjaxButton addButton; - private AjaxWizard<T> newItemPanel; + private AjaxWizardBuilder<T> newItemPanelBuilder; private final WebMarkupContainer container; @@ -63,6 +66,8 @@ public final class ListViewPanel<T extends Serializable> extends Panel { private final List<T> listOfItems; + private NotificationPanel notificationPanel; + /** * Table view of a list of beans. * @@ -141,12 +146,12 @@ public final class ListViewPanel<T extends Serializable> extends Panel { @Override protected void populateItem(final ListItem<String> fieldItem) { try { - LOG.error("Processing field {}", fieldItem.getModelObject()); + LOG.debug("Processing field {}", fieldItem.getModelObject()); final Object value = new PropertyDescriptor(fieldItem.getModelObject(), bean.getClass()). getReadMethod().invoke(bean); - LOG.error("Field value {}", value); + LOG.debug("Field value {}", value); fieldItem.add(value == null ? new Label("field", StringUtils.EMPTY) @@ -171,10 +176,7 @@ public final class ListViewPanel<T extends Serializable> extends Panel { @Override protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) { - final Fragment fragment = new Fragment("content", "wizard", ListViewPanel.this); - fragment.add(newItemPanel.clone()); - container.addOrReplace(fragment); - target.add(container); + send(ListViewPanel.this, Broadcast.DEPTH, new AjaxWizard.NewItemActionEvent<T>(null, target)); } }; @@ -185,27 +187,44 @@ public final class ListViewPanel<T extends Serializable> extends Panel { } @Override + @SuppressWarnings("unchecked") public void onEvent(final IEvent<?> event) { if (event.getPayload() instanceof AjaxWizard.NewItemEvent) { final AjaxRequestTarget target = AjaxWizard.NewItemEvent.class.cast(event.getPayload()).getTarget(); - @SuppressWarnings("unchecked") final T item = ((AjaxWizard.NewItemEvent<T>) event.getPayload()).getItem(); - if (event.getPayload() instanceof AjaxWizard.NewItemFinishEvent) { - this.listOfItems.add(item); + if (event.getPayload() instanceof AjaxWizard.NewItemActionEvent) { + final Fragment fragment = new Fragment("content", "wizard", ListViewPanel.this); + newItemPanelBuilder.setItem(item); + + fragment.add(newItemPanelBuilder.build( + ((AjaxWizard.NewItemActionEvent<T>) event.getPayload()).getIndex())); + + container.addOrReplace(fragment); + } else { + if (event.getPayload() instanceof AjaxWizard.NewItemFinishEvent) { + if (item != null && !this.listOfItems.contains(item)) { + this.listOfItems.add(item); + } + + if (notificationPanel != null) { + getSession().info(getString(Constants.OPERATION_SUCCEEDED)); + notificationPanel.refresh(target); + } + } + container.addOrReplace(initialFragment); } - container.addOrReplace(initialFragment); target.add(container); } super.onEvent(event); } - private ListViewPanel<T> addNewItemPanel(final AjaxWizard<T> panel) { - this.newItemPanel = panel; + private ListViewPanel<T> addNewItemPanelBuilder(final AjaxWizardBuilder<T> panelBuilder) { + this.newItemPanelBuilder = panelBuilder; - if (this.newItemPanel != null) { + if (this.newItemPanelBuilder != null) { addButton.setEnabled(true); addButton.setVisible(true); } @@ -213,6 +232,11 @@ public final class ListViewPanel<T extends Serializable> extends Panel { return this; } + private ListViewPanel<T> addNotificationPanel(final NotificationPanel notificationPanel) { + this.notificationPanel = notificationPanel; + return this; + } + public static <T extends Serializable> Builder<T> builder(final Class<T> reference, final PageReference pageRef) { return new Builder<T>(reference, pageRef); } @@ -236,7 +260,9 @@ public final class ListViewPanel<T extends Serializable> extends Panel { private List<T> items; - private AjaxWizard<T> newItemPanel; + private AjaxWizardBuilder<T> newItemPanelBuilder; + + private NotificationPanel notificationPanel; private Builder(final Class<T> reference, final PageReference pageRef) { this.pageRef = pageRef; @@ -252,7 +278,8 @@ public final class ListViewPanel<T extends Serializable> extends Panel { * @return List view. */ public ListViewPanel<T> build(final String id) { - return new ListViewPanel<T>(id, items, reference, includes, actions, pageRef).addNewItemPanel(newItemPanel); + return new ListViewPanel<T>(id, items, reference, includes, actions, pageRef). + addNewItemPanelBuilder(newItemPanelBuilder).addNotificationPanel(notificationPanel); } /** @@ -314,8 +341,13 @@ public final class ListViewPanel<T extends Serializable> extends Panel { return this; } - public Builder<T> addNewItemPanel(final AjaxWizard<T> panel) { - this.newItemPanel = panel; + public Builder<T> addNewItemPanelBuilder(final AjaxWizardBuilder<T> panelBuilder) { + this.newItemPanelBuilder = panelBuilder; + return this; + } + + public Builder<T> addNotificationPanel(final NotificationPanel notificationPanel) { + this.notificationPanel = notificationPanel; return this; } } http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationPanel.java index 5d9c9a0..3098f5a 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/NotificationPanel.java @@ -32,11 +32,11 @@ public class NotificationPanel extends FeedbackPanel { private static final long serialVersionUID = 5895940553202128621L; public NotificationPanel(final String id) { - this(id, null, null); + this(id, null); } - public NotificationPanel(final String id, final String additionalCSSClass, - final IFeedbackMessageFilter feedbackMessageFilter) { + public NotificationPanel( + final String id, final IFeedbackMessageFilter feedbackMessageFilter) { super(id, feedbackMessageFilter); @@ -46,17 +46,14 @@ public class NotificationPanel extends FeedbackPanel { @Override protected void onEvent(final AjaxRequestTarget target) { - target.appendJavaScript( - "setTimeout(\"$('div#" + getMarkupId() + "').fadeOut('normal')\", 0);"); + target.appendJavaScript("setTimeout(\"$('div#" + getMarkupId() + "').fadeOut('normal')\", 0);"); } }); - // set custom markup id and ouput it, to find the component later on in the js function - setMarkupId(id); setOutputMarkupId(true); - add(new AttributeModifier("class", new Model<>("alert"))); - add(new AttributeModifier("style", new Model<>("opacity: 0;"))); + this.add(new AttributeModifier("class", new Model<>("alert"))); + this.add(new AttributeModifier("style", new Model<>("opacity: 0;"))); } private String getCSSClass(final int level) { @@ -96,9 +93,9 @@ public class NotificationPanel extends FeedbackPanel { // refresh the panel and call the js function with the panel markup id // and the total count of messages target.add(this); + if (anyMessage(FeedbackMessage.ERROR)) { - target.appendJavaScript( - "$('div#" + getMarkupId() + "').fadeTo('normal', 1.0);"); + target.appendJavaScript("$('div#" + getMarkupId() + "').fadeTo('normal', 1.0);"); } else { target.appendJavaScript( "showNotification('" + getMarkupId() + "', " + getCurrentMessages().size() + ");"); http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java index ff5cac3..d556346 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceDetailsPanel.java @@ -222,7 +222,7 @@ public class ResourceDetailsPanel extends Panel { new ResourceModel("connector", "connector").getObject(), new PropertyModel<ConnInstanceTO>(this, "connInstanceTO")); conn.setChoices(connectors.getObject()); - conn.setChoiceRenderer(new ChoiceRenderer<>("displayName", "key")); + conn.setChoiceRenderer(new ChoiceRenderer<ConnInstanceTO>("displayName", "key")); conn.getField().setModel(new IModel<ConnInstanceTO>() { http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java index b210c86..40cc013 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java @@ -129,10 +129,6 @@ public class ResourceMappingPanel extends Panel { */ private final WebMarkupContainer mappingContainer; - private final WebMarkupContainer connObjectLinkContainer; - - private final AjaxCheckBoxPanel connObjectLinkCheckbox; - private MappingTO getMapping() { if (provisionTO.getMapping() == null) { provisionTO.setMapping(new MappingTO()); @@ -159,10 +155,6 @@ public class ResourceMappingPanel extends Panel { this.mappingContainer.setOutputMarkupId(true); add(this.mappingContainer); - this.connObjectLinkContainer = new WebMarkupContainer("connObjectLinkContainer"); - this.connObjectLinkContainer.setOutputMarkupId(true); - add(this.connObjectLinkContainer); - if (resourceTO.getConnector() != null && resourceTO.getConnector() > 0) { schemaNames = getSchemaNames(resourceTO.getConnector(), resourceTO.getConnConfProperties()); setEnabled(); @@ -444,41 +436,6 @@ public class ResourceMappingPanel extends Panel { addMappingBtn.setDefaultFormProcessing(false); addMappingBtn.setEnabled(resourceTO.getConnector() != null && resourceTO.getConnector() > 0); mappingContainer.add(addMappingBtn); - - boolean connObjectLinkEnabled = false; - if (getMapping().getConnObjectLink() != null) { - connObjectLinkEnabled = true; - } - connObjectLinkCheckbox = new AjaxCheckBoxPanel("connObjectLinkCheckbox", - new ResourceModel("connObjectLinkCheckbox", "connObjectLinkCheckbox").getObject(), - new Model<>(connObjectLinkEnabled)); - connObjectLinkCheckbox.setEnabled(true); - - connObjectLinkContainer.add(connObjectLinkCheckbox); - - final AjaxTextFieldPanel connObjectLink = new AjaxTextFieldPanel("connObjectLink", - new ResourceModel("connObjectLink", "connObjectLink").getObject(), - new PropertyModel<String>(getMapping(), "connObjectLink")); - connObjectLink.setEnabled(connObjectLinkEnabled); - connObjectLinkContainer.add(connObjectLink); - - connObjectLinkCheckbox.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) { - - private static final long serialVersionUID = -1107858522700306810L; - - @Override - protected void onUpdate(final AjaxRequestTarget target) { - if (connObjectLinkCheckbox.getModelObject()) { - connObjectLink.setEnabled(Boolean.TRUE); - connObjectLink.setModelObject(""); - } else { - connObjectLink.setEnabled(Boolean.FALSE); - connObjectLink.setModelObject(""); - } - - target.add(connObjectLink); - } - }); } private List<String> getSchemaNames(final Long connectorId, final Set<ConnConfProperty> conf) { @@ -498,15 +455,10 @@ public class ResourceMappingPanel extends Panel { this.mappingContainer.setEnabled(enabled); this.mappingContainer.setVisible(enabled); - this.connObjectLinkContainer.setEnabled(enabled); - this.connObjectLinkContainer.setVisible(enabled); if (!enabled) { getMapping().getItems().clear(); getMapping().setConnObjectLink(null); - if (this.connObjectLinkCheckbox != null) { - this.connObjectLinkCheckbox.setModelObject(null); - } } } http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java index 6390f01..345d2e7 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java @@ -24,11 +24,13 @@ import java.util.ArrayList; import java.util.Collection; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.Predicate; +import org.apache.commons.lang3.SerializationUtils; import org.apache.syncope.client.console.commons.Constants; import org.apache.syncope.client.console.pages.AbstractBasePage; import org.apache.syncope.client.console.topology.TopologyNode; import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink; -import org.apache.syncope.client.console.wizards.ProvisionWizard; +import org.apache.syncope.client.console.wizards.AjaxWizard; +import org.apache.syncope.client.console.wizards.provision.ProvisionWizardBuilder; import org.apache.syncope.common.lib.to.MappingItemTO; import org.apache.syncope.common.lib.to.ProvisionTO; import org.apache.syncope.common.lib.to.ResourceTO; @@ -89,7 +91,8 @@ public class ResourceModal extends AbstractResourceModal { @Override public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) { - + send(pageRef.getPage(), Broadcast.DEPTH, + new AjaxWizard.NewItemActionEvent<ProvisionTO>(provisionTO, 2, target)); } }, ActionLink.ActionType.MAPPING, Entitlement.RESOURCE_UPDATE).addAction(new ActionLink<ProvisionTO>() { @@ -97,7 +100,8 @@ public class ResourceModal extends AbstractResourceModal { @Override public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) { - + send(pageRef.getPage(), Broadcast.DEPTH, + new AjaxWizard.NewItemActionEvent<ProvisionTO>(provisionTO, 3, target)); } }, ActionLink.ActionType.ACCOUNT_LINK, Entitlement.RESOURCE_UPDATE).addAction(new ActionLink<ProvisionTO>() { @@ -105,7 +109,9 @@ public class ResourceModal extends AbstractResourceModal { @Override public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) { - + provisionTO.setSyncToken(null); + send(pageRef.getPage(), Broadcast.DEPTH, + new AjaxWizard.NewItemFinishEvent<ProvisionTO>(provisionTO, target)); } }, ActionLink.ActionType.RESET_TIME, Entitlement.RESOURCE_UPDATE).addAction(new ActionLink<ProvisionTO>() { @@ -113,7 +119,8 @@ public class ResourceModal extends AbstractResourceModal { @Override public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) { - + send(pageRef.getPage(), Broadcast.DEPTH, + new AjaxWizard.NewItemActionEvent<ProvisionTO>(SerializationUtils.clone(provisionTO), target)); } }, ActionLink.ActionType.CLONE, Entitlement.RESOURCE_CREATE).addAction(new ActionLink<ProvisionTO>() { @@ -122,12 +129,14 @@ public class ResourceModal extends AbstractResourceModal { @Override public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) { resourceTO.getProvisions().remove(provisionTO); - target.add(provisions); - + send(pageRef.getPage(), Broadcast.DEPTH, + new AjaxWizard.NewItemFinishEvent<ProvisionTO>(null, target)); } }, ActionLink.ActionType.DELETE, Entitlement.RESOURCE_DELETE); - builder.addNewItemPanel(new ProvisionWizard("wizard", resourceTO, pageRef)); + builder.addNewItemPanelBuilder(new ProvisionWizardBuilder("wizard", resourceTO, pageRef)); + builder.addNotificationPanel(feedbackPanel); + provisions.add(builder.build("provisions")); //-------------------------------- http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeRestClient.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeRestClient.java new file mode 100644 index 0000000..7202082 --- /dev/null +++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyTypeRestClient.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.client.console.rest; + +import java.util.List; +import org.apache.syncope.common.lib.SyncopeClientException; +import org.apache.syncope.common.lib.to.AnyTypeTO; +import org.apache.syncope.common.rest.api.service.AnyTypeService; +import org.springframework.stereotype.Component; + +/** + * Console client for invoking Rest AnyType services. + */ +@Component +public class AnyTypeRestClient extends BaseRestClient { + + private static final long serialVersionUID = 1L; + + public List<AnyTypeTO> getAll() { + List<AnyTypeTO> types = null; + + try { + types = getService(AnyTypeService.class).list(); + } catch (SyncopeClientException e) { + LOG.error("While reading all any types", e); + } + + return types; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java b/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java index 4fc5a86..c991a44 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/Topology.java @@ -20,6 +20,7 @@ package org.apache.syncope.client.console.topology; import static org.apache.syncope.client.console.topology.TopologyNode.Status.FAILURE; import static org.apache.syncope.client.console.topology.TopologyNode.Status.REACHABLE; +import static org.apache.syncope.client.console.topology.TopologyNode.Status.UNKNOWN; import static org.apache.syncope.client.console.topology.TopologyNode.Status.UNREACHABLE; import com.fasterxml.jackson.databind.JsonNode; @@ -29,11 +30,13 @@ import java.io.Serializable; import java.net.URI; import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; +import java.util.Set; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; import org.apache.cxf.jaxrs.client.WebClient; @@ -46,7 +49,10 @@ import org.apache.syncope.common.lib.to.ConnInstanceTO; import org.apache.syncope.common.lib.to.ResourceTO; import org.apache.syncope.common.lib.types.Entitlement; import org.apache.syncope.common.rest.api.service.SyncopeService; +import org.apache.wicket.Application; import org.apache.wicket.Component; +import org.apache.wicket.Session; +import org.apache.wicket.ThreadContext; import org.apache.wicket.ajax.AbstractAjaxTimerBehavior; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.IAjaxIndicatorAware; @@ -164,36 +170,62 @@ public class Topology extends BasePage { private static final long serialVersionUID = 1L; + final Map<String, String> resources = new HashMap<String, String>(); + + final Set<String> runningResCheck = new HashSet<>(); + + final Map<Long, String> connectors = new HashMap<Long, String>(); + + final Set<Long> runningConnCheck = new HashSet<>(); + @Override protected void onMessage(final WebSocketRequestHandler handler, final TextMessage message) { try { final ObjectMapper mapper = new ObjectMapper(); final JsonNode obj = mapper.readTree(message.getText()); + final ExecutorService executorService = Executors.newFixedThreadPool(1); + switch (SupportedOperation.valueOf(obj.get("kind").asText())) { case CHECK_CONNECTOR: - try { - final ConnInstanceTO connector = connectorRestClient.read(obj.get("target").asLong()); - handler.push(String.format("{ \"status\": \"%s\", \"target\": \"%s\"}", - connectorRestClient.check(connector) ? REACHABLE : UNREACHABLE, - obj.get("target").asLong())); - } catch (Exception e) { - handler.push(String.format("{ \"status\": \"%s\", \"target\": \"%s\"}", - FAILURE, - obj.get("target").asLong())); + final Long ckey = obj.get("target").asLong(); + + if (connectors.containsKey(ckey)) { + handler.push(connectors.get(ckey)); + } else { + handler.push(String.format("{ \"status\": \"%s\", \"target\": \"%s\"}", UNKNOWN, ckey)); } + + synchronized (runningConnCheck) { + if (runningConnCheck.contains(ckey)) { + LOG.debug("Running connection check for connector {}", ckey); + } else { + runningConnCheck.add(ckey); + } + } + + executorService.execute(new ConnCheck(ckey)); + break; case CHECK_RESOURCE: - try { - final ResourceTO resource = resourceRestClient.read(obj.get("target").asText()); - handler.push(String.format("{ \"status\": \"%s\", \"target\": \"%s\"}", - connectorRestClient.check(resource) ? REACHABLE : UNREACHABLE, - obj.get("target").asText())); - } catch (Exception e) { - handler.push(String.format("{ \"status\": \"%s\", \"target\": \"%s\"}", - FAILURE, - obj.get("target").asText())); + final String rkey = obj.get("target").asText(); + + if (resources.containsKey(rkey)) { + handler.push(resources.get(rkey)); + } else { + handler.push(String.format("{ \"status\": \"%s\", \"target\": \"%s\"}", UNKNOWN, rkey)); + } + + synchronized (runningResCheck) { + if (runningResCheck.contains(rkey)) { + LOG.debug("Running connection check for resource {}", rkey); + } else { + runningResCheck.add(rkey); + } } + + executorService.execute(new ResCheck(rkey)); + break; case ADD_ENDPOINT: handler.appendJavaScript(String.format("addEndpoint('%s', '%s', '%s');", @@ -204,10 +236,91 @@ public class Topology extends BasePage { default: } - } catch (IOException ex) { - Logger.getLogger(Topology.class.getName()).log(Level.SEVERE, null, ex); + executorService.shutdown(); + + } catch (IOException e) { + LOG.error("Eror managing websocket message", e); } + } + + class ConnCheck implements Runnable { + + final Long key; + + private final Application application; + private final Session session; + + public ConnCheck(final Long key) { + this.key = key; + this.application = Application.get(); + this.session = Session.exists() ? Session.get() : null; + } + + @Override + public void run() { + try { + ThreadContext.setApplication(application); + ThreadContext.setSession(session); + + String res; + try { + final ConnInstanceTO connector = connectorRestClient.read(key); + res = String.format("{ \"status\": \"%s\", \"target\": \"%s\"}", + connectorRestClient.check(connector) ? REACHABLE : UNREACHABLE, key); + } catch (Exception e) { + LOG.warn("Error checking connection for {}", key, e); + res = String.format("{ \"status\": \"%s\", \"target\": \"%s\"}", FAILURE, key); + } + + synchronized (runningConnCheck) { + connectors.put(key, res); + runningConnCheck.remove(key); + } + } finally { + ThreadContext.detach(); + } + } + } + + class ResCheck implements Runnable { + + final String key; + + private final Application application; + + private final Session session; + + public ResCheck(final String key) { + this.key = key; + this.application = Application.get(); + this.session = Session.exists() ? Session.get() : null; + } + + @Override + public void run() { + try { + ThreadContext.setApplication(application); + ThreadContext.setSession(session); + + String res; + try { + final ResourceTO resource = resourceRestClient.read(key); + res = String.format("{ \"status\": \"%s\", \"target\": \"%s\"}", + connectorRestClient.check(resource) ? REACHABLE : UNREACHABLE, key); + } catch (Exception e) { + LOG.warn("Error checking connection for {}", key, e); + res = String.format("{ \"status\": \"%s\", \"target\": \"%s\"}", FAILURE, key); + } + + synchronized (runningResCheck) { + resources.put(key, res); + runningResCheck.remove(key); + } + } finally { + ThreadContext.detach(); + } + } } }); @@ -517,7 +630,17 @@ public class Topology extends BasePage { protected void onTimer(final AjaxRequestTarget target) { target.appendJavaScript("checkConnection()"); - if (getUpdateInterval().seconds() < 60.0) { + if (getUpdateInterval().seconds() < 5.0) { + setUpdateInterval(Duration.seconds(5)); + } else if (getUpdateInterval().seconds() < 10.0) { + setUpdateInterval(Duration.seconds(10)); + } else if (getUpdateInterval().seconds() < 15.0) { + setUpdateInterval(Duration.seconds(15)); + } else if (getUpdateInterval().seconds() < 20.0) { + setUpdateInterval(Duration.seconds(20)); + } else if (getUpdateInterval().seconds() < 30.0) { + setUpdateInterval(Duration.seconds(30)); + } else if (getUpdateInterval().seconds() < 60.0) { setUpdateInterval(Duration.seconds(60)); } } http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java index 3702aa2..ff64fbe 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxCheckBoxPanel.java @@ -33,12 +33,17 @@ public class AjaxCheckBoxPanel extends FieldPanel<Boolean> { private static final long serialVersionUID = 5664138233103884310L; public AjaxCheckBoxPanel(final String id, final String name, final IModel<Boolean> model) { + this(id, name, model, true); + } + + public AjaxCheckBoxPanel( + final String id, final String name, final IModel<Boolean> model, final boolean enableOnChange) { super(id, model); field = new CheckBox("checkboxField", model); add(field.setLabel(new Model<String>(name)).setOutputMarkupId(true)); - if (!isReadOnly()) { + if (enableOnChange && !isReadOnly()) { field.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) { private static final long serialVersionUID = -1107858522700306810L; http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java index f628a84..ae3a01f 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxDropDownChoicePanel.java @@ -43,8 +43,7 @@ public class AjaxDropDownChoicePanel<T extends Serializable> extends FieldPanel< super(id, model); - field = new DropDownChoice<>( - "dropDownChoiceField", model, Collections.<T>emptyList(), new ChoiceRenderer<T>()); + field = new DropDownChoice<>("dropDownChoiceField", model, Collections.<T>emptyList(), new ChoiceRenderer<T>()); add(field.setLabel(new Model<>(name)).setOutputMarkupId(true)); if (enableOnBlur) { @@ -61,7 +60,7 @@ public class AjaxDropDownChoicePanel<T extends Serializable> extends FieldPanel< } @SuppressWarnings("unchecked") - public AjaxDropDownChoicePanel<T> setChoiceRenderer(final IChoiceRenderer renderer) { + public AjaxDropDownChoicePanel<T> setChoiceRenderer(final IChoiceRenderer<T> renderer) { ((DropDownChoice) field).setChoiceRenderer(renderer); return this; } @@ -80,7 +79,7 @@ public class AjaxDropDownChoicePanel<T extends Serializable> extends FieldPanel< @Override @SuppressWarnings("unchecked") - public FieldPanel clone() { + public FieldPanel<T> clone() { final AjaxDropDownChoicePanel<T> panel = (AjaxDropDownChoicePanel<T>) super.clone(); panel.setChoiceRenderer(((DropDownChoice) field).getChoiceRenderer()); panel.setChoices(((DropDownChoice) field).getChoices()); http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java index df8e808..2ba29f8 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/AjaxTextFieldPanel.java @@ -39,6 +39,11 @@ public class AjaxTextFieldPanel extends FieldPanel<String> implements Cloneable private List<String> choices = Collections.emptyList(); public AjaxTextFieldPanel(final String id, final String name, final IModel<String> model) { + this(id, name, model, true); + } + + public AjaxTextFieldPanel( + final String id, final String name, final IModel<String> model, final boolean enableOnChange) { super(id, model); final AutoCompleteSettings settings = new AutoCompleteSettings(); @@ -66,7 +71,7 @@ public class AjaxTextFieldPanel extends FieldPanel<String> implements Cloneable }; add(field.setLabel(new Model<>(name)).setOutputMarkupId(true)); - if (!isReadOnly()) { + if (enableOnChange && !isReadOnly()) { field.add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) { private static final long serialVersionUID = -1107858522700306810L; http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java index ebbff5d..e0f2f3e 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/markup/html/form/FieldPanel.java @@ -21,6 +21,7 @@ package org.apache.syncope.client.console.wicket.markup.html.form; import java.io.Serializable; import java.util.List; import org.apache.commons.lang3.SerializationUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.wicket.AttributeModifier; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.FormComponent; @@ -61,11 +62,8 @@ public abstract class FieldPanel<T> extends AbstractFieldPanel<T> implements Clo return this; } - public FieldPanel<T> setStyleSheet(final String classes) { - field.add(AttributeModifier.replace("class", classes != null - ? classes - : "")); - + public FieldPanel<T> setStyleSheet(final String... classes) { + field.add(AttributeModifier.replace("class", StringUtils.join(classes, ' '))); return this; } http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizard.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizard.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizard.java index d9a42c1..caa3857 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizard.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizard.java @@ -16,12 +16,14 @@ package org.apache.syncope.client.console.wizards; import java.io.Serializable; -import org.apache.commons.lang3.SerializationUtils; +import org.apache.syncope.client.console.panels.NotificationPanel; import org.apache.wicket.Component; import org.apache.wicket.PageReference; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.event.Broadcast; import org.apache.wicket.extensions.wizard.Wizard; +import org.apache.wicket.extensions.wizard.WizardModel; +import org.apache.wicket.model.CompoundPropertyModel; import org.apache.wicket.request.cycle.RequestCycle; public abstract class AjaxWizard<T extends Serializable> extends Wizard { @@ -30,25 +32,50 @@ public abstract class AjaxWizard<T extends Serializable> extends Wizard { private final PageReference pageRef; - private final T item; + private T item; + + private final boolean edit; + + private NotificationPanel feedbackPanel; /** * Construct. * - * @param id The component id - * @param item + * @param id The component id. + * @param item model object. + * @param model * @param pageRef Caller page reference. + * @param edit <tt>true</tt> if edit mode. */ - public AjaxWizard(final String id, final T item, final PageReference pageRef) { + public AjaxWizard( + final String id, final T item, final WizardModel model, final PageReference pageRef, final boolean edit) { super(id); this.item = item; this.pageRef = pageRef; + this.edit = edit; + setOutputMarkupId(true); + + setDefaultModel(new CompoundPropertyModel<AjaxWizard<T>>(this)); + + init(model); } @Override protected Component newButtonBar(final String id) { - return new AjaxWizardButtonBar(id, this); + return new AjaxWizardButtonBar(id, this, this.edit); + } + + @Override + protected Component newFeedbackPanel(final String id) { + if (feedbackPanel == null) { + feedbackPanel = new NotificationPanel(id); + } + return feedbackPanel; + } + + public NotificationPanel getFeedbackPanel() { + return feedbackPanel; } protected abstract void onCancelInternal(); @@ -79,7 +106,19 @@ public abstract class AjaxWizard<T extends Serializable> extends Wizard { return item; } + /** + * Replaces the default value provided with the constructor. + * + * @param item new value. + * @return the current wizard instance. + */ + public AjaxWizard<T> setItem(final T item) { + this.item = item; + return this; + } + public abstract static class NewItemEvent<T> { + private final T item; private final AjaxRequestTarget target; @@ -98,6 +137,25 @@ public abstract class AjaxWizard<T extends Serializable> extends Wizard { } } + public static class NewItemActionEvent<T> extends NewItemEvent<T> { + + private int index = 0; + + public NewItemActionEvent(final T item, final AjaxRequestTarget target) { + super(item, target); + } + + public NewItemActionEvent(final T item, final int index, final AjaxRequestTarget target) { + super(item, target); + this.index = index; + } + + public int getIndex() { + return index; + } + + } + public static class NewItemCancelEvent<T> extends NewItemEvent<T> { public NewItemCancelEvent(final T item, final AjaxRequestTarget target) { @@ -113,13 +171,4 @@ public abstract class AjaxWizard<T extends Serializable> extends Wizard { } } - - /** - * - * @return - */ - @Override - public AjaxWizard<T> clone() { - return SerializationUtils.clone(this); - } } http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardBuilder.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardBuilder.java new file mode 100644 index 0000000..035eab6 --- /dev/null +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2015 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.syncope.client.console.wizards; + +import java.io.Serializable; +import org.apache.commons.lang3.SerializationUtils; +import org.apache.wicket.PageReference; +import org.apache.wicket.extensions.wizard.WizardModel; + +public abstract class AjaxWizardBuilder<T extends Serializable> { + + private static final long serialVersionUID = 1L; + + private final String id; + + private final PageReference pageRef; + + private final T defaultItem; + + private T item; + + /** + * Construct. + * + * @param id The component id + * @param defaultItem default item. + * @param pageRef Caller page reference. + */ + public AjaxWizardBuilder(final String id, final T defaultItem, final PageReference pageRef) { + this.id = id; + this.defaultItem = defaultItem; + this.pageRef = pageRef; + } + + public AjaxWizard<T> build(final int index) { + final AjaxWizard<T> wizard = build(index > 0); + for (int i = 1; i < index; i++) { + wizard.getWizardModel().next(); + } + return wizard; + } + + public AjaxWizard<T> build(final boolean edit) { + final T modelObject = getItem(); + setItem(null); + + return new AjaxWizard<T>(id, modelObject, buildModelSteps(modelObject, new WizardModel()), pageRef, edit) { + + private static final long serialVersionUID = 1L; + + @Override + protected void onCancelInternal() { + AjaxWizardBuilder.this.onCancelInternal(); + } + + @Override + protected void onApplyInternal() { + AjaxWizardBuilder.this.onApplyInternal(); + } + }; + } + + protected abstract WizardModel buildModelSteps(final T modelObject, final WizardModel wizardModel); + + protected abstract void onCancelInternal(); + + protected abstract void onApplyInternal(); + + private T getItem() { + return item == null ? SerializationUtils.clone(defaultItem) : item; + } + + /** + * Replaces the default value provided with the constructor. + * + * @param item new value. + * @return the current wizard factory instance. + */ + public AjaxWizardBuilder<T> setItem(final T item) { + this.item = item; + return this; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardButtonBar.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardButtonBar.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardButtonBar.java index 4f31a26..b272ff8 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardButtonBar.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/AjaxWizardButtonBar.java @@ -15,10 +15,10 @@ */ package org.apache.syncope.client.console.wizards; +import org.apache.syncope.client.console.panels.NotificationPanel; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.extensions.wizard.IWizardModel; import org.apache.wicket.extensions.wizard.IWizardStep; -import org.apache.wicket.extensions.wizard.Wizard; import org.apache.wicket.extensions.wizard.WizardButtonBar; import org.apache.wicket.markup.html.form.Form; @@ -26,7 +26,7 @@ public class AjaxWizardButtonBar extends WizardButtonBar { private static final long serialVersionUID = 1L; - public AjaxWizardButtonBar(final String id, final Wizard wizard) { + public AjaxWizardButtonBar(final String id, final AjaxWizard<?> wizard, final boolean edit) { super(id, wizard); addOrReplace(new AjaxWizardButton("next", wizard, "next") { @@ -53,8 +53,14 @@ public class AjaxWizardButtonBar extends WizardButtonBar { } @Override + protected void onError(final AjaxRequestTarget target, final Form<?> form) { + super.onError(target, form); + NotificationPanel.class.cast(wizard.getFeedbackPanel()).refresh(target); + } + + @Override public final boolean isEnabled() { - return super.isEnabled() && getWizardModel().isNextAvailable(); + return !edit && super.isEnabled() && getWizardModel().isNextAvailable(); } }); @@ -70,7 +76,7 @@ public class AjaxWizardButtonBar extends WizardButtonBar { @Override public final boolean isEnabled() { - return super.isEnabled() && getWizardModel().isPreviousAvailable(); + return !edit && super.isEnabled() && getWizardModel().isPreviousAvailable(); } }); @@ -101,9 +107,19 @@ public class AjaxWizardButtonBar extends WizardButtonBar { } @Override + protected void onError(final AjaxRequestTarget target, final Form<?> form) { + super.onError(target, form); + NotificationPanel.class.cast(wizard.getFeedbackPanel()).refresh(target); + } + + @Override public final boolean isEnabled() { - final IWizardStep activeStep = getWizardModel().getActiveStep(); - return (activeStep != null) && getWizardModel().isLastStep(activeStep) && super.isEnabled(); + if (edit) { + return true; + } else { + final IWizardStep activeStep = getWizardModel().getActiveStep(); + return (activeStep != null) && getWizardModel().isLastStep(activeStep) && super.isEnabled(); + } } }); } http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/wizards/ProvisionWizard.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/ProvisionWizard.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/ProvisionWizard.java deleted file mode 100644 index 6c3c8e0..0000000 --- a/client/console/src/main/java/org/apache/syncope/client/console/wizards/ProvisionWizard.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2015 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.syncope.client.console.wizards; - -import org.apache.commons.lang3.StringUtils; -import org.apache.syncope.client.console.panels.ResourceMappingPanel; -import org.apache.syncope.common.lib.to.ProvisionTO; -import org.apache.syncope.common.lib.to.ResourceTO; -import org.apache.wicket.PageReference; -import org.apache.wicket.extensions.wizard.WizardModel; -import org.apache.wicket.extensions.wizard.WizardStep; -import org.apache.wicket.markup.html.form.TextField; -import org.apache.wicket.model.CompoundPropertyModel; -import org.apache.wicket.model.Model; -import org.apache.wicket.model.PropertyModel; -import org.apache.wicket.model.ResourceModel; -import org.apache.wicket.model.StringResourceModel; - -public class ProvisionWizard extends AjaxWizard<ProvisionTO> { - - private static final long serialVersionUID = 1L; - - private final ResourceTO resourceTO; - - /** - * The object type specification step. - */ - private final class ObjectType extends WizardStep { - - private static final long serialVersionUID = 1L; - - /** - * Construct. - */ - public ObjectType() { - super(new ResourceModel("type.title", StringUtils.EMPTY), - new ResourceModel("type.summary", StringUtils.EMPTY), new Model<ProvisionTO>(getItem())); - - add(new TextField<String>( - "type", new PropertyModel<String>(getItem(), "anyType")).setRequired(true)); - add(new TextField<String>( - "class", new PropertyModel<String>(getItem(), "objectClass")).setRequired(true)); - } - } - - /** - * Mapping definition step. - */ - private final class Mapping extends WizardStep { - - private static final long serialVersionUID = 1L; - - /** - * Construct. - */ - public Mapping() { - setTitleModel(new ResourceModel("mapping.title", "Mapping")); - setSummaryModel(new StringResourceModel("mapping.summary", this, new Model<ProvisionTO>(getItem()))); - - add(new ResourceMappingPanel("mapping", resourceTO, getItem())); - } - } - - /** - * AccountLink specification step. - */ - private final class AccountLink extends WizardStep { - - private static final long serialVersionUID = 1L; - - /** - * Construct. - */ - public AccountLink() { - super(new ResourceModel("link.title", StringUtils.EMPTY), - new ResourceModel("link.summary", StringUtils.EMPTY)); - } - } - - /** - * Construct. - * - * @param id The component id - * @param resourceTO external resource to be updated. - * @param pageRef Caller page reference. - */ - public ProvisionWizard(final String id, final ResourceTO resourceTO, final PageReference pageRef) { - super(id, new ProvisionTO(), pageRef); - this.resourceTO = resourceTO; - - setDefaultModel(new CompoundPropertyModel<ProvisionWizard>(this)); - - final WizardModel model = new WizardModel(); - model.add(new ObjectType()); - model.add(new Mapping()); - model.add(new AccountLink()); - - init(model); - } - - @Override - protected void onCancelInternal() { - // d nothing - } - - @Override - protected void onApplyInternal() { - // do nothing - } -} http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/java/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder.java b/client/console/src/main/java/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder.java new file mode 100644 index 0000000..364bdb2 --- /dev/null +++ b/client/console/src/main/java/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder.java @@ -0,0 +1,222 @@ +/* + * Copyright 2015 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.syncope.client.console.wizards.provision; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.Predicate; +import org.apache.commons.collections4.Transformer; +import org.apache.commons.lang3.StringUtils; +import org.apache.syncope.client.console.commons.Constants; +import org.apache.syncope.client.console.panels.ResourceMappingPanel; +import org.apache.syncope.client.console.rest.AnyTypeRestClient; +import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel; +import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel; +import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel; +import org.apache.syncope.client.console.wizards.AjaxWizardBuilder; +import org.apache.syncope.common.lib.to.AnyTypeTO; +import org.apache.syncope.common.lib.to.ProvisionTO; +import org.apache.syncope.common.lib.to.ResourceTO; +import org.apache.wicket.PageReference; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior; +import org.apache.wicket.extensions.wizard.WizardModel; +import org.apache.wicket.extensions.wizard.WizardStep; +import org.apache.wicket.markup.html.WebMarkupContainer; +import org.apache.wicket.markup.html.form.TextField; +import org.apache.wicket.model.LoadableDetachableModel; +import org.apache.wicket.model.Model; +import org.apache.wicket.model.PropertyModel; +import org.apache.wicket.model.ResourceModel; +import org.apache.wicket.model.StringResourceModel; + +public class ProvisionWizardBuilder extends AjaxWizardBuilder<ProvisionTO> implements Serializable { + + private static final long serialVersionUID = 1L; + + private final ResourceTO resourceTO; + + private final LoadableDetachableModel<List<String>> anyTypes = new LoadableDetachableModel<List<String>>() { + + private static final long serialVersionUID = 1L; + + @Override + protected List<String> load() { + final List<String> currentlyAdded = new ArrayList<>(); + + CollectionUtils.collect(resourceTO.getProvisions(), new Transformer<ProvisionTO, String>() { + + @Override + public String transform(final ProvisionTO provisionTO) { + return provisionTO.getAnyType(); + } + }, currentlyAdded); + + final List<String> res = new ArrayList<>(); + + CollectionUtils.filter( + CollectionUtils.collect(new AnyTypeRestClient().getAll(), new Transformer<AnyTypeTO, String>() { + + @Override + public String transform(final AnyTypeTO anyTypeTO) { + return anyTypeTO.getKey(); + } + }, res), new Predicate<String>() { + + @Override + public boolean evaluate(String key) { + return !currentlyAdded.contains(key); + } + }); + + return res; + } + }; + + /** + * The object type specification step. + */ + private final class ObjectType extends WizardStep { + + private static final long serialVersionUID = 1L; + + /** + * Construct. + */ + public ObjectType(final ProvisionTO item) { + super(new ResourceModel("type.title", StringUtils.EMPTY), + new ResourceModel("type.summary", StringUtils.EMPTY), new Model<ProvisionTO>(item)); + + add(new AjaxDropDownChoicePanel<String>("type", "type", new PropertyModel<String>(item, "anyType"), false). + setChoices(anyTypes). + setStyleSheet("form-control"). + setRequired(true)); + + add(new TextField<String>( + "class", new PropertyModel<String>(item, "objectClass")).setRequired(true)); + } + } + + /** + * Mapping definition step. + */ + private final class Mapping extends WizardStep { + + private static final long serialVersionUID = 1L; + + /** + * Construct. + */ + public Mapping(final ProvisionTO item) { + setTitleModel(new ResourceModel("mapping.title", "Mapping")); + setSummaryModel(new StringResourceModel("mapping.summary", this, new Model<ProvisionTO>(item))); + + add(new ResourceMappingPanel("mapping", resourceTO, item)); + } + } + + /** + * AccountLink specification step. + */ + private final class ConnObjectLink extends WizardStep { + + private static final long serialVersionUID = 1L; + + /** + * Construct. + */ + public ConnObjectLink(final ProvisionTO item) { + super(new ResourceModel("link.title", StringUtils.EMPTY), + new ResourceModel("link.summary", StringUtils.EMPTY)); + + final WebMarkupContainer connObjectLinkContainer = new WebMarkupContainer("connObjectLinkContainer"); + connObjectLinkContainer.setOutputMarkupId(true); + add(connObjectLinkContainer); + + boolean connObjectLinkEnabled = false; + if (StringUtils.isNotBlank(item.getMapping().getConnObjectLink())) { + connObjectLinkEnabled = true; + } + + final AjaxCheckBoxPanel connObjectLinkCheckbox = new AjaxCheckBoxPanel( + "connObjectLinkCheckbox", + new ResourceModel("connObjectLinkCheckbox", "connObjectLinkCheckbox").getObject(), + new Model<>(connObjectLinkEnabled), + false); + connObjectLinkCheckbox.setEnabled(true); + + connObjectLinkContainer.add(connObjectLinkCheckbox); + + final AjaxTextFieldPanel connObjectLink = new AjaxTextFieldPanel( + "connObjectLink", + new ResourceModel("connObjectLink", "connObjectLink").getObject(), + new PropertyModel<String>(item.getMapping(), "connObjectLink"), + false); + connObjectLink.setEnabled(connObjectLinkEnabled); + connObjectLinkContainer.add(connObjectLink); + + connObjectLinkCheckbox.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) { + + private static final long serialVersionUID = -1107858522700306810L; + + @Override + protected void onUpdate(final AjaxRequestTarget target) { + if (connObjectLinkCheckbox.getModelObject()) { + connObjectLink.setEnabled(Boolean.TRUE); + connObjectLink.setModelObject(""); + } else { + connObjectLink.setEnabled(Boolean.FALSE); + connObjectLink.setModelObject(""); + } + + target.add(connObjectLink); + } + }); + } + } + + /** + * Construct. + * + * @param id The component id + * @param resourceTO external resource to be updated. + * @param pageRef Caller page reference. + */ + public ProvisionWizardBuilder(final String id, final ResourceTO resourceTO, final PageReference pageRef) { + super(id, new ProvisionTO(), pageRef); + this.resourceTO = resourceTO; + } + + @Override + protected WizardModel buildModelSteps(final ProvisionTO modelObject, final WizardModel wizardModel) { + wizardModel.add(new ObjectType(modelObject)); + wizardModel.add(new Mapping(modelObject)); + wizardModel.add(new ConnObjectLink(modelObject)); + return wizardModel; + } + + @Override + protected void onCancelInternal() { + // d nothing + } + + @Override + protected void onApplyInternal() { + // do nothing + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html index fe6c4ef..12ec5d2 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html +++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ResourceMappingPanel.html @@ -89,26 +89,6 @@ under the License. </tr> </tfoot> </table> - - <table id="connObjectLinkTable" - class="table" - style="font-size: 1em;margin-top:2px;" - wicket:id="connObjectLinkContainer"> - <tbody> - <tr> - <th width="10%" align="left"><wicket:message key="enable"/></th> - <th align="left"><wicket:message key="connObjectLink"/></th> - </tr> - <tr> - <td width="10%"> - <span wicket:id="connObjectLinkCheckbox">[connObjectLinkCheckbox]</span> - </td> - <td> - <span wicket:id="connObjectLink">[connObjectLink]</span> - </td> - </tr> - </tbody> - </table> </div> </wicket:panel> </html> http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard$AccountLink.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard$AccountLink.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard$AccountLink.html deleted file mode 100644 index aa2e5ab..0000000 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard$AccountLink.html +++ /dev/null @@ -1,23 +0,0 @@ -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> -<html xmlns="http://www.w3.org/1999/xhtml" > - <wicket:panel> - Specify here the account link .... work in progress - </wicket:panel> -</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard$Mapping.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard$Mapping.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard$Mapping.html deleted file mode 100644 index 2147713..0000000 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard$Mapping.html +++ /dev/null @@ -1,23 +0,0 @@ -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> -<html xmlns="http://www.w3.org/1999/xhtml"> - <wicket:panel> - <span wicket:id="mapping" /> - </wicket:panel> -</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard$ObjectType.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard$ObjectType.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard$ObjectType.html deleted file mode 100644 index e36f66d..0000000 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard$ObjectType.html +++ /dev/null @@ -1,30 +0,0 @@ -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> -<html xmlns="http://www.w3.org/1999/xhtml"> - <wicket:panel > - <div class="form-group"> - <label>Object Type</label> - <input type="text" placeholder="Object Type ..." class="form-control" wicket:id="type"> - </div> - <div class="form-group"> - <label>Object Class</label> - <input type="text" placeholder="Object Class ..." class="form-control" wicket:id="class"> - </div> - </wicket:panel> -</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard.properties deleted file mode 100644 index 535da53..0000000 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard.properties +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -type.title=Specify the type of the provisioning object -type.summary= -mapping.title=Specify the maping about the provisioning object -mapping.summary= -link.title=Specify the account link (if required) -link.summary= - http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard_it.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard_it.properties deleted file mode 100644 index 535da53..0000000 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard_it.properties +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -type.title=Specify the type of the provisioning object -type.summary= -mapping.title=Specify the maping about the provisioning object -mapping.summary= -link.title=Specify the account link (if required) -link.summary= - http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard_pt_BR.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard_pt_BR.properties deleted file mode 100644 index 535da53..0000000 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/ProvisionWizard_pt_BR.properties +++ /dev/null @@ -1,24 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -type.title=Specify the type of the provisioning object -type.summary= -mapping.title=Specify the maping about the provisioning object -mapping.summary= -link.title=Specify the account link (if required) -link.summary= - http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.html b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.html new file mode 100644 index 0000000..0dc5137 --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.html @@ -0,0 +1,31 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<html xmlns="http://www.w3.org/1999/xhtml" + xmlns:wicket="http://xmlns.jcp.org/jsf/composite"> + <wicket:panel> + <span wicket:id="connObjectLinkContainer"> + <div> + <span wicket:id="connObjectLinkCheckbox">[connObjectLinkCheckbox]</span> + </div> + <div> + <span wicket:id="connObjectLink">[connObjectLink]</span> + </div> + </span> + </wicket:panel> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.properties new file mode 100644 index 0000000..e2df31e --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink.properties @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +link.title=Specify the connector object link (if required) +link.summary= + http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink_it.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink_it.properties new file mode 100644 index 0000000..e2df31e --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink_it.properties @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +link.title=Specify the connector object link (if required) +link.summary= + http://git-wip-us.apache.org/repos/asf/syncope/blob/310b34af/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink_pt_BR.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink_pt_BR.properties new file mode 100644 index 0000000..e2df31e --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wizards/provision/ProvisionWizardBuilder$ConnObjectLink_pt_BR.properties @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +link.title=Specify the connector object link (if required) +link.summary= +
