You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by fm...@apache.org on 2013/11/19 12:12:25 UTC
svn commit: r1543381 - in /syncope/branches/1_1_X:
client/src/main/java/org/apache/syncope/client/services/proxy/
common/src/main/java/org/apache/syncope/common/services/
common/src/main/java/org/apache/syncope/common/to/
common/src/main/java/org/apach...
Author: fmartelli
Date: Tue Nov 19 11:12:24 2013
New Revision: 1543381
URL: http://svn.apache.org/r1543381
Log:
SYNCOPE-422 and SYNCOPE-423 fixed on 1.1.X
Added:
syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/ControllerHandler.java
- copied, changed from r1543068, syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/ServiceHandler.java
Removed:
syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/ServiceHandler.java
Modified:
syncope/branches/1_1_X/client/src/main/java/org/apache/syncope/client/services/proxy/WorkflowServiceProxy.java
syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/services/WorkflowService.java
syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/to/EventCategoryTO.java
syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/types/AuditElements.java
syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/types/AuditLoggerName.java
syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/util/LoggerEventUtils.java
syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Reports.java
syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Roles.java
syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/LoggerCategoryPanel.java
syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchPanel.java
syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/rest/NotificationRestClient.java
syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage.html
syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage.properties
syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage_it.properties
syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage_pt_BR.properties
syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/panels/LoggerCategoryPanel.html
syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.java
syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/WorkflowServiceImpl.java
syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/WorkflowAdapter.java
syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/role/NoOpRoleWorkflowAdapter.java
syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/user/NoOpUserWorkflowAdapter.java
syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
syncope/branches/1_1_X/core/src/main/resources/restContext.xml
syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/WorkflowTestITCase.java
syncope/branches/1_1_X/core/src/test/resources/content.xml
Modified: syncope/branches/1_1_X/client/src/main/java/org/apache/syncope/client/services/proxy/WorkflowServiceProxy.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/client/src/main/java/org/apache/syncope/client/services/proxy/WorkflowServiceProxy.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/client/src/main/java/org/apache/syncope/client/services/proxy/WorkflowServiceProxy.java (original)
+++ syncope/branches/1_1_X/client/src/main/java/org/apache/syncope/client/services/proxy/WorkflowServiceProxy.java Tue Nov 19 11:12:24 2013
@@ -18,8 +18,6 @@
*/
package org.apache.syncope.client.services.proxy;
-import java.util.Arrays;
-import java.util.List;
import org.apache.syncope.common.services.WorkflowService;
import org.apache.syncope.common.to.WorkflowDefinitionTO;
import org.apache.syncope.common.types.AttributableType;
@@ -41,10 +39,4 @@ public class WorkflowServiceProxy extend
public void updateDefinition(final AttributableType type, final WorkflowDefinitionTO definition) {
getRestTemplate().put(baseUrl + "workflow/definition/" + type.name().toLowerCase(), definition);
}
-
- @Override
- public List<String> getDefinedTasks(final AttributableType type) {
- return Arrays.asList(getRestTemplate().getForObject(baseUrl + "workflow/tasks/{type}", String[].class,
- type.name().toLowerCase()));
- }
}
Modified: syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/services/WorkflowService.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/services/WorkflowService.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/services/WorkflowService.java (original)
+++ syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/services/WorkflowService.java Tue Nov 19 11:12:24 2013
@@ -18,7 +18,6 @@
*/
package org.apache.syncope.common.services;
-import java.util.List;
import javax.ws.rs.GET;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
@@ -43,13 +42,4 @@ public interface WorkflowService {
*/
@PUT
void updateDefinition(@PathParam("kind") AttributableType kind, WorkflowDefinitionTO definition);
-
- /**
- * @param kind Kind can be USER or ROLE only!
- * @return Returns existing tasks for matching kind.
- */
- @GET
- @Path("tasks")
- List<String> getDefinedTasks(@PathParam("kind") AttributableType kind);
-
}
Modified: syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/to/EventCategoryTO.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/to/EventCategoryTO.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/to/EventCategoryTO.java (original)
+++ syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/to/EventCategoryTO.java Tue Nov 19 11:12:24 2013
@@ -55,7 +55,7 @@ public class EventCategoryTO extends Abs
}
public void setType(final AuditElements.EventCategoryType type) {
- this.type = type;
+ this.type = type == null ? AuditElements.EventCategoryType.CUSTOM : type;
}
public String getCategory() {
Modified: syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/types/AuditElements.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/types/AuditElements.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/types/AuditElements.java (original)
+++ syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/types/AuditElements.java Tue Nov 19 11:12:24 2013
@@ -35,7 +35,8 @@ public final class AuditElements impleme
REST(StringUtils.EMPTY),
TASK(StringUtils.EMPTY),
PROPAGATION("PropagationTask"),
- SYNCHRONIZATION("SyncTask");
+ SYNCHRONIZATION("SyncTask"),
+ CUSTOM(StringUtils.EMPTY);
private final String value;
Modified: syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/types/AuditLoggerName.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/types/AuditLoggerName.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/types/AuditLoggerName.java (original)
+++ syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/types/AuditLoggerName.java Tue Nov 19 11:12:24 2013
@@ -66,15 +66,11 @@ public class AuditLoggerName extends Abs
@JsonProperty("result") final Result result)
throws IllegalArgumentException {
- if (type == null || result == null) {
- throw new IllegalArgumentException("Null values not permitted");
- }
-
- this.type = type;
+ this.type = type == null ? AuditElements.EventCategoryType.CUSTOM : type;
this.category = category;
this.subcategory = subcategory;
this.event = event;
- this.result = result;
+ this.result = result == null ? Result.SUCCESS : result;
}
public AuditElements.EventCategoryType getType() {
@@ -124,7 +120,8 @@ public class AuditLoggerName extends Abs
eventCategory.getKey().getType(),
eventCategory.getKey().getCategory(),
eventCategory.getKey().getSubcategory(),
- eventCategory.getKey().getEvents().iterator().next(),
+ eventCategory.getKey().getEvents().isEmpty()
+ ? StringUtils.EMPTY : eventCategory.getKey().getEvents().iterator().next(),
eventCategory.getValue());
}
}
Modified: syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/util/LoggerEventUtils.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/util/LoggerEventUtils.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/util/LoggerEventUtils.java (original)
+++ syncope/branches/1_1_X/common/src/main/java/org/apache/syncope/common/util/LoggerEventUtils.java Tue Nov 19 11:12:24 2013
@@ -44,30 +44,44 @@ public class LoggerEventUtils {
LOG.debug("Found {} elements", elements.length);
- LOG.debug("Type {}", elements[0]);
-
- if (EventCategoryType.PROPAGATION.toString().equals(elements[0])) {
- eventCategoryTO.setType(EventCategoryType.PROPAGATION);
- } else if (EventCategoryType.SYNCHRONIZATION.toString().equals(elements[0])) {
- eventCategoryTO.setType(EventCategoryType.SYNCHRONIZATION);
+ if (elements.length == 1) {
+ eventCategoryTO.setType(EventCategoryType.CUSTOM);
+ condition = Result.SUCCESS;
+ eventCategoryTO.getEvents().add(event);
} else {
- eventCategoryTO.setType(EventCategoryType.valueOf(elements[0]));
- }
-
- LOG.debug("Category {}", elements[1]);
- eventCategoryTO.setCategory(StringUtils.isNotEmpty(elements[1]) ? elements[1] : null);
+ LOG.debug("Type {}", elements[0]);
- LOG.debug("Sub-category {}", elements[2]);
- eventCategoryTO.setSubcategory(StringUtils.isNotEmpty(elements[2]) ? elements[2] : null);
-
- if (elements.length > 3 && StringUtils.isNotEmpty(elements[3])) {
- LOG.debug("Event {}", elements[3]);
- eventCategoryTO.getEvents().add(elements[3]);
- }
+ EventCategoryType type;
- if (elements.length > 4) {
- LOG.debug("Result condition {}", elements[4]);
- condition = Result.valueOf(elements[4].toUpperCase());
+ if (EventCategoryType.PROPAGATION.toString().equals(elements[0])) {
+ type = EventCategoryType.PROPAGATION;
+ } else if (EventCategoryType.SYNCHRONIZATION.toString().equals(elements[0])) {
+ type = EventCategoryType.SYNCHRONIZATION;
+ } else {
+ try {
+ type = EventCategoryType.valueOf(elements[0]);
+ } catch (Exception e) {
+ type = EventCategoryType.CUSTOM;
+ }
+ }
+
+ eventCategoryTO.setType(type);
+
+ LOG.debug("Category {}", elements[1]);
+ eventCategoryTO.setCategory(StringUtils.isNotEmpty(elements[1]) ? elements[1] : null);
+
+ LOG.debug("Sub-category {}", elements[2]);
+ eventCategoryTO.setSubcategory(StringUtils.isNotEmpty(elements[2]) ? elements[2] : null);
+
+ if (elements.length > 3 && StringUtils.isNotEmpty(elements[3])) {
+ LOG.debug("Event {}", elements[3]);
+ eventCategoryTO.getEvents().add(elements[3]);
+ }
+
+ if (elements.length > 4) {
+ LOG.debug("Result condition {}", elements[4]);
+ condition = Result.valueOf(elements[4].toUpperCase());
+ }
}
}
Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java Tue Nov 19 11:12:24 2013
@@ -150,7 +150,9 @@ class NotificationModalPage extends Base
form.add(new LoggerCategoryPanel(
"eventSelection",
loggerRestClient.listEvents(),
- new PropertyModel<List<String>>(notificationTO, "events")) {
+ new PropertyModel<List<String>>(notificationTO, "events"),
+ getPageReference(),
+ "Notification") {
private static final long serialVersionUID = 6429053774964787735L;
Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Reports.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Reports.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Reports.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Reports.java Tue Nov 19 11:12:24 2013
@@ -297,7 +297,8 @@ public class Reports extends BasePage {
final ListModel<String> model = new ListModel<String>(new ArrayList<String>(events));
- form.add(new LoggerCategoryPanel("events", loggerRestClient.listEvents(), model) {
+ form.add(new LoggerCategoryPanel(
+ "events", loggerRestClient.listEvents(), model, getPageReference(), "Reports") {
private static final long serialVersionUID = 6113164334533550277L;
Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Roles.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Roles.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Roles.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Roles.java Tue Nov 19 11:12:24 2013
@@ -101,7 +101,7 @@ public class Roles extends BasePage {
final Form searchForm = new Form("searchForm");
add(searchForm);
- final RoleSearchPanel searchPanel = new RoleSearchPanel("searchPanel");
+ final RoleSearchPanel searchPanel = new RoleSearchPanel.Builder("searchPanel").build();
searchForm.add(searchPanel);
searchForm.add(new ClearIndicatingAjaxButton("search", new ResourceModel("search"), getPageReference()) {
Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/LoggerCategoryPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/LoggerCategoryPanel.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/LoggerCategoryPanel.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/LoggerCategoryPanel.java Tue Nov 19 11:12:24 2013
@@ -32,8 +32,13 @@ import org.apache.syncope.common.types.A
import org.apache.syncope.common.types.AuditElements.EventCategoryType;
import org.apache.syncope.common.util.LoggerEventUtils;
import org.apache.syncope.console.commons.Constants;
+import org.apache.syncope.console.pages.panels.SelectedEventsPanel.EventSelectionChanged;
import org.apache.syncope.console.pages.panels.SelectedEventsPanel.InspectSelectedEvent;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.console.wicket.markup.html.form.ActionLinksPanel;
import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
@@ -44,6 +49,7 @@ import org.apache.wicket.markup.html.bas
import org.apache.wicket.markup.html.form.IChoiceRenderer;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.model.ResourceModel;
import org.slf4j.Logger;
@@ -74,12 +80,18 @@ public abstract class LoggerCategoryPane
private final AjaxDropDownChoicePanel<String> subcategory;
+ private final AjaxTextFieldPanel custom;
+
+ private final ActionLinksPanel actionPanel;
+
private final IModel<List<String>> model;
public LoggerCategoryPanel(
final String id,
final List<EventCategoryTO> eventCategoryTOs,
- final IModel<List<String>> model) {
+ final IModel<List<String>> model,
+ final PageReference pageReference,
+ final String pageId) {
super(id);
this.model = model;
@@ -176,6 +188,77 @@ public abstract class LoggerCategoryPane
}
});
+ categoryContainer.add(new Label("customLabel", new ResourceModel("custom", "custom")).setVisible(false));
+
+ custom = new AjaxTextFieldPanel("custom", "custom", new Model<String>(null));
+ custom.setStyleSheet("ui-widget-content ui-corner-all short_fixedsize");
+ custom.setVisible(false);
+ custom.setEnabled(false);
+
+ categoryContainer.add(custom);
+
+ actionPanel = new ActionLinksPanel("customActions", new Model(), pageReference);
+ categoryContainer.add(actionPanel);
+
+ actionPanel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435501L;
+
+ @Override
+ public void onClick(AjaxRequestTarget target) {
+ if (StringUtils.isNotBlank(custom.getModelObject())) {
+ final Map.Entry<EventCategoryTO, AuditElements.Result> parsed =
+ LoggerEventUtils.parseEventCategory(custom.getModelObject());
+
+ final String eventString = LoggerEventUtils.buildEvent(
+ parsed.getKey().getType(),
+ null,
+ null,
+ parsed.getKey().getEvents().isEmpty()
+ ? StringUtils.EMPTY : parsed.getKey().getEvents().iterator().next(),
+ parsed.getValue());
+
+ custom.setModelObject(StringUtils.EMPTY);
+ send(LoggerCategoryPanel.this.getPage(), Broadcast.BREADTH, new EventSelectionChanged(
+ target,
+ Collections.<String>singleton(eventString),
+ Collections.<String>emptySet()));
+ target.add(categoryContainer);
+ }
+ }
+ }, ActionLink.ActionType.CREATE, pageId, true);
+
+ actionPanel.add(new ActionLink() {
+
+ private static final long serialVersionUID = -3722207913631435502L;
+
+ @Override
+ public void onClick(AjaxRequestTarget target) {
+ if (StringUtils.isNotBlank(custom.getModelObject())) {
+ final Map.Entry<EventCategoryTO, AuditElements.Result> parsed =
+ LoggerEventUtils.parseEventCategory(custom.getModelObject());
+
+ final String eventString = LoggerEventUtils.buildEvent(
+ parsed.getKey().getType(),
+ null,
+ null,
+ parsed.getKey().getEvents().isEmpty()
+ ? StringUtils.EMPTY : parsed.getKey().getEvents().iterator().next(),
+ parsed.getValue());
+
+ custom.setModelObject(StringUtils.EMPTY);
+ send(LoggerCategoryPanel.this.getPage(), Broadcast.BREADTH, new EventSelectionChanged(
+ target,
+ Collections.<String>emptySet(),
+ Collections.<String>singleton(eventString)));
+ target.add(categoryContainer);
+ }
+ }
+ }, ActionLink.ActionType.DELETE, pageId, true);
+
+ actionPanel.setVisible(false);
+ actionPanel.setEnabled(false);
+
eventsContainer.add(new EventSelectionPanel("eventsPanel", eventCategoryTO, model) {
private static final long serialVersionUID = 3513194801190026082L;
@@ -229,11 +312,30 @@ public abstract class LoggerCategoryPane
final Panel changedPanel = change.getChangedPanel();
if ("type".equals(changedPanel.getId())) {
- category.setChoices(filter(eventCategoryTOs, type.getModelObject()));
- subcategory.setChoices(Collections.<String>emptyList());
eventCategoryTO.setType(type.getModelObject());
eventCategoryTO.setCategory(null);
eventCategoryTO.setSubcategory(null);
+
+ if (type.getModelObject() == EventCategoryType.CUSTOM) {
+ category.setChoices(Collections.<String>emptyList());
+ subcategory.setChoices(Collections.<String>emptyList());
+ category.setEnabled(false);
+ subcategory.setEnabled(false);
+ custom.setVisible(true);
+ custom.setEnabled(true);
+ actionPanel.setVisible(true);
+ actionPanel.setEnabled(true);
+
+ } else {
+ category.setChoices(filter(eventCategoryTOs, type.getModelObject()));
+ subcategory.setChoices(Collections.<String>emptyList());
+ category.setEnabled(true);
+ subcategory.setEnabled(true);
+ custom.setVisible(false);
+ custom.setEnabled(false);
+ actionPanel.setVisible(false);
+ actionPanel.setEnabled(false);
+ }
change.getTarget().add(categoryContainer);
} else if ("category".equals(changedPanel.getId())) {
subcategory.setChoices(filter(eventCategoryTOs, type.getModelObject(), category.getModelObject()));
@@ -262,7 +364,29 @@ public abstract class LoggerCategoryPane
eventCategoryTO.setSubcategory(categoryEvent.getKey().getSubcategory());
-
+ if (categoryEvent.getKey().getType() == EventCategoryType.CUSTOM) {
+ custom.setModelObject(LoggerEventUtils.buildEvent(
+ categoryEvent.getKey().getType(),
+ categoryEvent.getKey().getCategory(),
+ categoryEvent.getKey().getSubcategory(),
+ categoryEvent.getKey().getEvents().isEmpty()
+ ? StringUtils.EMPTY : categoryEvent.getKey().getEvents().iterator().next(),
+ categoryEvent.getValue()));
+
+ category.setEnabled(false);
+ subcategory.setEnabled(false);
+ custom.setVisible(true);
+ custom.setEnabled(true);
+ actionPanel.setVisible(true);
+ actionPanel.setEnabled(true);
+ } else {
+ category.setEnabled(true);
+ subcategory.setEnabled(true);
+ custom.setVisible(false);
+ custom.setEnabled(false);
+ actionPanel.setVisible(false);
+ actionPanel.setEnabled(false);
+ }
inspectSelectedEvent.getTarget().add(categoryContainer);
updateEventsContainer(inspectSelectedEvent.getTarget());
Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchPanel.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchPanel.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchPanel.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchPanel.java Tue Nov 19 11:12:24 2013
@@ -18,9 +18,11 @@
*/
package org.apache.syncope.console.pages.panels;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import org.apache.syncope.common.search.NodeCond;
import org.apache.syncope.common.types.AttributableType;
import org.apache.syncope.console.commons.SearchCondWrapper;
import org.apache.wicket.model.LoadableDetachableModel;
@@ -29,8 +31,30 @@ public class RoleSearchPanel extends Abs
private static final long serialVersionUID = 5757183539269316263L;
- public RoleSearchPanel(final String id) {
- super(id, AttributableType.ROLE, null, true);
+ public static class Builder implements Serializable {
+
+ private static final long serialVersionUID = 6308997285778809579L;
+
+ private String id;
+
+ private NodeCond initCond = null;
+
+ public Builder(final String id) {
+ this.id = id;
+ }
+
+ public RoleSearchPanel.Builder nodeCond(final NodeCond initCond) {
+ this.initCond = initCond;
+ return this;
+ }
+
+ public RoleSearchPanel build() {
+ return new RoleSearchPanel(this);
+ }
+ }
+
+ private RoleSearchPanel(final Builder builder) {
+ super(builder.id, AttributableType.ROLE, builder.initCond, true);
}
@Override
Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/rest/NotificationRestClient.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/rest/NotificationRestClient.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/rest/NotificationRestClient.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/rest/NotificationRestClient.java Tue Nov 19 11:12:24 2013
@@ -23,10 +23,8 @@ import java.util.List;
import org.apache.syncope.common.services.ConfigurationService;
import org.apache.syncope.common.services.NotificationService;
-import org.apache.syncope.common.services.WorkflowService;
import org.apache.syncope.common.to.MailTemplateTO;
import org.apache.syncope.common.to.NotificationTO;
-import org.apache.syncope.common.types.AttributableType;
import org.apache.syncope.common.util.CollectionWrapper;
import org.springframework.stereotype.Component;
@@ -59,8 +57,4 @@ public class NotificationRestClient exte
return CollectionWrapper.unwrapMailTemplates(new ArrayList<MailTemplateTO>(getService(
ConfigurationService.class).getMailTemplates()));
}
-
- public List<String> getEvents() {
- return getService(WorkflowService.class).getDefinedTasks(AttributableType.USER);
- }
}
Modified: syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage.html
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage.html?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage.html (original)
+++ syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage.html Tue Nov 19 11:12:24 2013
@@ -23,6 +23,27 @@ under the License.
min-width: 970px;
overflow: hidden;
}
+
+ div#userFilter {
+ border: 1px solid #DDDDDD;
+ }
+
+ div#userFilter div#title {
+ margin: 10px 0px 0px 8px;
+ }
+
+ div#userFilter div#warning {
+ margin: 1px 0px 5px 8px;
+ }
+
+ div#userFilter div#title label {
+ font-weight: bold;
+ }
+
+ div#userFilter div#warning label {
+ color: #E00000;
+ font-size: 8px;
+ }
</style>
</wicket:head>
<wicket:extend>
@@ -32,8 +53,8 @@ under the License.
<div id="tabs">
<ul>
<li class="tabs-selected"><a href="#notification"><span><wicket:message key="notification"/></span></a></li>
- <li><a href="#about"><span><wicket:message key="about"/></span></a></li>
<li><a href="#events"><span><wicket:message key="events"/></span></a></li>
+ <li><a href="#about"><span><wicket:message key="about"/></span></a></li>
<li><a href="#recipients"><span><wicket:message key="recipients"/></span></a></li>
</ul>
@@ -95,6 +116,10 @@ under the License.
</div>
</div>
+ <div id="events">
+ <span wicket:id="eventSelection"/>
+ </div>
+
<div id="about">
<span wicket:id="aboutContainer">
<div class="tablerow" style="width: auto;">
@@ -105,12 +130,18 @@ under the License.
<label for="checkAbout"><wicket:message key="checkAbout"/></label>
</div>
</div>
- <span wicket:id="about"/>
+ <div id="userFilter">
+ <div id="title">
+ <label for="userFilter"><wicket:message key="userFilter"/></label>
+ </div>
+ <div id="warning">
+ <label for="userFilter"><wicket:message key="userFilterWarning"/></label>
+ </div>
+ <div id="condition">
+ <span wicket:id="about"/>
+ </div>
+ </div>
</span>
- </div>
-
- <div id="events">
- <span wicket:id="eventSelection"/>
</div>
<div id="recipients">
Modified: syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage.properties
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage.properties?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage.properties (original)
+++ syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage.properties Tue Nov 19 11:12:24 2013
@@ -28,4 +28,6 @@ selfAsRecipient=Include users matching A
recipientAttrType=Recipients e-mail attribute type
recipientAttrName=Recipients e-mail attribute schema
checkRecipients=Search recipients
-checkAbout=All users
+checkAbout=All
+userFilter=User filter
+userFilterWarning=Do not use this filter unless events are not targeted at users
Modified: syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage_it.properties
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage_it.properties?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage_it.properties (original)
+++ syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage_it.properties Tue Nov 19 11:12:24 2013
@@ -28,4 +28,6 @@ selfAsRecipient=Includi i soggetti
recipientAttrType=Tipo attributo e-mail destinatari
recipientAttrName=Shcema attributo e-mail destinatari
checkRecipients=Cerca i destinatari
-checkAbout=Tutti gli utenti
\ No newline at end of file
+checkAbout=Tutto
+userFilter=Filtro utenti
+userFilterWarning=Non usare questo filtro se gli eventi catturati non riguardano espressamente utenti
\ No newline at end of file
Modified: syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage_pt_BR.properties
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage_pt_BR.properties?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage_pt_BR.properties (original)
+++ syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/NotificationModalPage_pt_BR.properties Tue Nov 19 11:12:24 2013
@@ -14,18 +14,20 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-title=Alterar Notifica\u00E7\u00E3o
+title=Alterar Notifica\u00e7\u00e3o
submit=Salvar
subject=Assunto
sender=Remetente
template=Template
-traceLevel=N\u00EDvel de Trace
-notification=Notifica\u00E7\u00E3o
+traceLevel=N\u00edvel de Trace
+notification=Notifica\u00e7\u00e3o
about=Sobre
events=Eventos
-recipients=Destinat\u00E1rios
-selfAsRecipient=Incluir usu\u00E1rios relacionados Sobre
-recipientAttrType=Tipo de atributo de destinat\u00E1rio de email.
-recipientAttrName=Destinat\u00E1rios de e-mail para atributos de esquema
-checkRecipients=Buscar Destinat\u00E1rios
-checkAbout=Todos os usu\u00E1rios
\ No newline at end of file
+recipients=Destinat\u00e1rios
+selfAsRecipient=Incluir usu\u00e1rios relacionados Sobre
+recipientAttrType=Tipo de atributo de destinat\u00e1rio de email.
+recipientAttrName=Destinat\u00e1rios de e-mail para atributos de esquema
+checkRecipients=Buscar Destinat\u00e1rios
+checkAbout=Todos
+userFilter=User filter
+userFilterWarning=Do not use this filter unless events are not targeted at users
\ No newline at end of file
Modified: syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/panels/LoggerCategoryPanel.html
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/panels/LoggerCategoryPanel.html?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/panels/LoggerCategoryPanel.html (original)
+++ syncope/branches/1_1_X/console/src/main/resources/org/apache/syncope/console/pages/panels/LoggerCategoryPanel.html Tue Nov 19 11:12:24 2013
@@ -86,6 +86,15 @@ under the License.
<span wicket:id="subcategory">[sub-category]</span>
</div>
</div>
+ <div id="eventElement">
+ <div id="label">
+ <label wicket:id="customLabel"/>
+ </div>
+ <div id="value">
+ <span wicket:id="custom">[custom]</span>
+ <span wicket:id="customActions">[actions]</span>
+ </div>
+ </div>
</div>
<div wicket:id="eventsContainer" style="display: block">
<span wicket:id="eventsPanel">[events panel]</span>
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/rest/controller/WorkflowController.java Tue Nov 19 11:12:24 2013
@@ -19,7 +19,6 @@
package org.apache.syncope.core.rest.controller;
import java.lang.reflect.Method;
-import java.util.List;
import org.apache.syncope.common.to.WorkflowDefinitionTO;
import org.apache.syncope.core.workflow.WorkflowAdapter;
import org.apache.syncope.core.workflow.WorkflowException;
@@ -32,7 +31,6 @@ import org.springframework.transaction.a
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.servlet.ModelAndView;
@Controller
@RequestMapping("/workflow")
@@ -79,22 +77,6 @@ public class WorkflowController extends
updateDefinition(rwfAdapter, definition);
}
- private List<String> getDefinedTasks(final WorkflowAdapter adapter) {
- return adapter.getDefinedTasks();
- }
-
- @PreAuthorize("hasRole('WORKFLOW_TASK_LIST')")
- @RequestMapping(method = RequestMethod.GET, value = "/tasks/user")
- public ModelAndView getDefinedUserTasks() {
- return new ModelAndView().addObject(getDefinedTasks(uwfAdapter));
- }
-
- @PreAuthorize("hasRole('WORKFLOW_TASK_LIST')")
- @RequestMapping(method = RequestMethod.GET, value = "/tasks/role")
- public ModelAndView getDefinedRoleTasks() {
- return new ModelAndView().addObject(getDefinedTasks(rwfAdapter));
- }
-
/**
* {@inheritDoc}
*/
Copied: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/ControllerHandler.java (from r1543068, syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/ServiceHandler.java)
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/ControllerHandler.java?p2=syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/ControllerHandler.java&p1=syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/ServiceHandler.java&r1=1543068&r2=1543381&rev=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/ServiceHandler.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/ControllerHandler.java Tue Nov 19 11:12:24 2013
@@ -30,12 +30,12 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@Aspect
-public class ServiceHandler {
+public class ControllerHandler {
/**
* Logger.
*/
- private static final Logger LOG = LoggerFactory.getLogger(ServiceHandler.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ControllerHandler.class);
@Autowired
private NotificationManager notificationManager;
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/WorkflowServiceImpl.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/WorkflowServiceImpl.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/WorkflowServiceImpl.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/services/WorkflowServiceImpl.java Tue Nov 19 11:12:24 2013
@@ -18,22 +18,19 @@
*/
package org.apache.syncope.core.services;
-import java.util.List;
-
import javax.ws.rs.BadRequestException;
import javax.ws.rs.core.UriInfo;
import org.apache.syncope.common.services.WorkflowService;
import org.apache.syncope.common.to.WorkflowDefinitionTO;
import org.apache.syncope.common.types.AttributableType;
-import org.apache.syncope.common.util.CollectionWrapper;
import org.apache.syncope.core.rest.controller.WorkflowController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class WorkflowServiceImpl implements WorkflowService, ContextAware {
-
+
@Autowired
private WorkflowController workflowController;
@@ -49,7 +46,6 @@ public class WorkflowServiceImpl impleme
}
}
-
@Override
public void updateDefinition(final AttributableType kind, final WorkflowDefinitionTO definition) {
switch (kind) {
@@ -64,21 +60,7 @@ public class WorkflowServiceImpl impleme
}
}
-
- @Override
- public List<String> getDefinedTasks(final AttributableType kind) {
- switch (kind) {
- case USER:
- return CollectionWrapper.wrapStrings(workflowController.getDefinedUserTasks());
- case ROLE:
- return CollectionWrapper.wrapStrings(workflowController.getDefinedUserTasks());
- default:
- throw new BadRequestException();
- }
- }
-
@Override
public void setUriInfo(final UriInfo ui) {
}
-
}
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/WorkflowAdapter.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/WorkflowAdapter.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/WorkflowAdapter.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/WorkflowAdapter.java Tue Nov 19 11:12:24 2013
@@ -53,14 +53,6 @@ public interface WorkflowAdapter {
void updateDefinition(WorkflowDefinitionTO definition) throws NotFoundException, WorkflowException;
/**
- * Get list of defined tasks in workflow.
- *
- * @return list of defined tasks in workflow
- * @throws WorkflowException workflow exception
- */
- List<String> getDefinedTasks() throws WorkflowException;
-
- /**
* Get all defined forms for current workflow process instances.
*
* @return list of defined forms
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/role/NoOpRoleWorkflowAdapter.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/role/NoOpRoleWorkflowAdapter.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/role/NoOpRoleWorkflowAdapter.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/role/NoOpRoleWorkflowAdapter.java Tue Nov 19 11:12:24 2013
@@ -18,7 +18,6 @@
*/
package org.apache.syncope.core.workflow.role;
-import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -42,8 +41,6 @@ import org.springframework.transaction.a
@Transactional(rollbackFor = {Throwable.class})
public class NoOpRoleWorkflowAdapter extends AbstractRoleWorkflowAdapter {
- private static final List<String> TASKS = Arrays.asList(new String[]{"create", "update", "delete"});
-
@Override
public WorkflowResult<Long> create(final RoleTO roleTO)
throws UnauthorizedRoleException, WorkflowException {
@@ -98,13 +95,6 @@ public class NoOpRoleWorkflowAdapter ext
}
@Override
- public List<String> getDefinedTasks()
- throws WorkflowException {
-
- return TASKS;
- }
-
- @Override
public List<WorkflowFormTO> getForms() {
return Collections.emptyList();
}
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/user/NoOpUserWorkflowAdapter.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/user/NoOpUserWorkflowAdapter.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/user/NoOpUserWorkflowAdapter.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/user/NoOpUserWorkflowAdapter.java Tue Nov 19 11:12:24 2013
@@ -20,7 +20,6 @@ package org.apache.syncope.core.workflow
import java.util.AbstractMap;
import java.util.AbstractMap.SimpleEntry;
-import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -43,9 +42,6 @@ import org.springframework.transaction.a
@Transactional(rollbackFor = {Throwable.class})
public class NoOpUserWorkflowAdapter extends AbstractUserWorkflowAdapter {
- private static final List<String> TASKS =
- Arrays.asList(new String[] {"create", "activate", "update", "suspend", "reactivate", "delete"});
-
public static final String ENABLED = "enabled";
@Override
@@ -167,13 +163,6 @@ public class NoOpUserWorkflowAdapter ext
}
@Override
- public List<String> getDefinedTasks()
- throws WorkflowException {
-
- return TASKS;
- }
-
- @Override
public List<WorkflowFormTO> getForms() {
return Collections.emptyList();
}
Modified: syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java (original)
+++ syncope/branches/1_1_X/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java Tue Nov 19 11:12:24 2013
@@ -35,11 +35,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Resource;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathFactory;
import org.activiti.engine.ActivitiException;
import org.activiti.engine.FormService;
import org.activiti.engine.HistoryService;
@@ -77,8 +72,6 @@ import org.springframework.beans.BeanUti
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.codec.Base64;
import org.springframework.transaction.annotation.Transactional;
-import org.w3c.dom.Document;
-import org.w3c.dom.NodeList;
/**
* Activiti (http://www.activiti.org/) based implementation.
@@ -444,37 +437,6 @@ public class ActivitiUserWorkflowAdapter
}
}
- @Override
- public List<String> getDefinedTasks()
- throws WorkflowException {
-
- List<String> result = new ArrayList<String>();
-
- ProcessDefinition procDef = getProcessDefinition();
-
- InputStream procDefIS = repositoryService.getResourceAsStream(procDef.getDeploymentId(), WF_PROCESS_RESOURCE);
-
- DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
- try {
- DocumentBuilder builder = domFactory.newDocumentBuilder();
- Document doc = builder.parse(procDefIS);
-
- XPath xpath = XPathFactory.newInstance().newXPath();
-
- NodeList nodeList = (NodeList) xpath.evaluate("//userTask | //serviceTask | //scriptTask", doc,
- XPathConstants.NODESET);
- for (int i = 0; i < nodeList.getLength(); i++) {
- result.add(nodeList.item(i).getAttributes().getNamedItem("id").getNodeValue());
- }
- } catch (Exception e) {
- throw new WorkflowException("While reading defined tasks", e);
- } finally {
- IOUtils.closeQuietly(procDefIS);
- }
-
- return result;
- }
-
private WorkflowFormPropertyType fromActivitiFormType(final FormType activitiFormType) {
WorkflowFormPropertyType result = WorkflowFormPropertyType.String;
Modified: syncope/branches/1_1_X/core/src/main/resources/restContext.xml
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/main/resources/restContext.xml?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/main/resources/restContext.xml (original)
+++ syncope/branches/1_1_X/core/src/main/resources/restContext.xml Tue Nov 19 11:12:24 2013
@@ -42,7 +42,7 @@ under the License.
<!-- CXF Configuration - BEGIN -->
<context:component-scan base-package="org.apache.syncope.core.services"/>
- <bean id="serviceHandler" name="serviceHandler" class="org.apache.syncope.core.services.ServiceHandler" />
+ <bean id="controllerHandler" name="controllerHandler" class="org.apache.syncope.core.services.ControllerHandler" />
<bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
<property name="depthProperties">
Modified: syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/WorkflowTestITCase.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/WorkflowTestITCase.java?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/WorkflowTestITCase.java (original)
+++ syncope/branches/1_1_X/core/src/test/java/org/apache/syncope/core/rest/WorkflowTestITCase.java Tue Nov 19 11:12:24 2013
@@ -18,10 +18,8 @@
*/
package org.apache.syncope.core.rest;
-import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
-import java.util.List;
import org.apache.syncope.common.to.WorkflowDefinitionTO;
import org.apache.syncope.common.types.AttributableType;
@@ -66,18 +64,4 @@ public class WorkflowTestITCase extends
WorkflowDefinitionTO newDefinition = workflowService.getDefinition(AttributableType.ROLE);
assertNotNull(newDefinition);
}
-
- @Test
- public void testGetUserTasks() {
- List<String> tasks = workflowService.getDefinedTasks(AttributableType.USER);
- assertNotNull(tasks);
- assertFalse(tasks.isEmpty());
- }
-
- @Test
- public void testGetRoleTasks() {
- List<String> tasks = workflowService.getDefinedTasks(AttributableType.ROLE);
- assertNotNull(tasks);
- assertFalse(tasks.isEmpty());
- }
}
Modified: syncope/branches/1_1_X/core/src/test/resources/content.xml
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/core/src/test/resources/content.xml?rev=1543381&r1=1543380&r2=1543381&view=diff
==============================================================================
--- syncope/branches/1_1_X/core/src/test/resources/content.xml (original)
+++ syncope/branches/1_1_X/core/src/test/resources/content.xml Tue Nov 19 11:12:24 2013
@@ -830,8 +830,8 @@ under the License.
xmlAbout="%3Corg.apache.syncope.common.search.NodeCond%3E%0A++%3Ctype%3EAND%3C%2Ftype%3E%0A++%3CleftNodeCond%3E%0A++++%3Ctype%3ELEAF%3C%2Ftype%3E%0A++++%3CattributeCond%3E%0A++++++%3Ctype%3ELIKE%3C%2Ftype%3E%0A++++++%3Cschema%3Efullname%3C%2Fschema%3E%0A++++++%3Cexpression%3E%25o%25%3C%2Fexpression%3E%0A++++%3C%2FattributeCond%3E%0A++%3C%2FleftNodeCond%3E%0A++%3CrightNodeCond%3E%0A++++%3Ctype%3ELEAF%3C%2Ftype%3E%0A++++%3CattributeCond%3E%0A++++++%3Ctype%3ELIKE%3C%2Ftype%3E%0A++++++%3Cschema%3Efullname%3C%2Fschema%3E%0A++++++%3Cexpression%3E%25i%25%3C%2Fexpression%3E%0A++++%3C%2FattributeCond%3E%0A++%3C%2FrightNodeCond%3E%0A%3C%2Forg.apache.syncope.common.search.NodeCond%3E"
xmlRecipients="%3Corg.apache.syncope.common.search.NodeCond%3E%0A++%3Ctype%3ELEAF%3C%2Ftype%3E%0A++%3CmembershipCond%3E%0A++++%3CroleId%3E7%3C%2FroleId%3E%0A++%3C%2FmembershipCond%3E%0A%3C%2Forg.apache.syncope.common.search.NodeCond%3E"
recipientAttrType="UserSchema" recipientAttrName="email"/>
- <Notification_events Notification_id="1" events="unexisting1"/>
- <Notification_events Notification_id="1" events="unexisting2"/>
+ <Notification_events Notification_id="1" events="[CUSTOM]:[]:[]:[unexisting1]:[FAILURE]"/>
+ <Notification_events Notification_id="1" events="[CUSTOM]:[]:[]:[unexisting2]:[SUCCESS]"/>
<Report id="1" name="test"/>
<ReportletConfInstance id="1" Report_id="1" serializedInstance="%3Corg.apache.syncope.common.report.UserReportletConf%3E%0A++%3Cname%3EtestUserReportlet%3C%2Fname%3E%0A++%3Cattrs%3E%0A++++%3Cstring%3Efullname%3C%2Fstring%3E%0A++++%3Cstring%3Egender%3C%2Fstring%3E%0A++%3C%2Fattrs%3E%0A++%3CderAttrs+class%3D%22singleton-list%22%3E%0A++++%3Cstring%3Ecn%3C%2Fstring%3E%0A++%3C%2FderAttrs%3E%0A++%3CvirAttrs+class%3D%22singleton-list%22%3E%0A++++%3Cstring%3Evirtualdata%3C%2Fstring%3E%0A++%3C%2FvirAttrs%3E%0A++%3Cfeatures+class%3D%22java.util.Arrays%24ArrayList%22%3E%0A++++%3Ca+class%3D%22org.apache.syncope.common.report.UserReportletConf%24Feature-array%22%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3Eid%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3Eusername%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.rep
ort.UserReportletConf_-Feature%3EworkflowId%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3Estatus%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3EcreationDate%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3ElastLoginDate%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3EchangePwdDate%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3EpasswordHistorySize%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3EfailedLoginCount%3C%2Forg.apache.syncop
e.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3Ememberships%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++++%3Corg.apache.syncope.common.report.UserReportletConf_-Feature%3Eresources%3C%2Forg.apache.syncope.common.report.UserReportletConf_-Feature%3E%0A++++%3C%2Fa%3E%0A++%3C%2Ffeatures%3E%0A%3C%2Forg.apache.syncope.common.report.UserReportletConf%3E"/>