svn commit: r1444739 - in /syncope/trunk/core/src: main/java/org/apache/syncope/core/rest/data/ test/java/org/apache/syncope/core/persistence/dao/
Author: ilgrosso Date: Mon Feb 11 11:13:07 2013 New Revision: 1444739 URL: http://svn.apache.org/r1444739 Log: [SYNCOPE-215] Implement usage of AbstractVirSchema#isReadonly() + basci test Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/AbstractAttributableDataBinder.java syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/SchemaDataBinder.java syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/VirSchemaTest.java Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/AbstractAttributableDataBinder.java URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/AbstractAttributableDataBinder.java?rev=1444739r1=1444738r2=1444739view=diff == --- syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/AbstractAttributableDataBinder.java (original) +++ syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/AbstractAttributableDataBinder.java Mon Feb 11 11:13:07 2013 @@ -131,7 +131,7 @@ public abstract class AbstractAttributab } else if (schema.isReadonly()) { schema = null; -LOG.debug(Ignoring virtual or readonly schema {}, schemaName); +LOG.debug(Ignoring readonly schema {}, schemaName); } } @@ -157,6 +157,10 @@ public abstract class AbstractAttributab if (virtualSchema == null) { LOG.debug(Ignoring invalid virtual schema {}, virSchemaName); +} else if (virtualSchema.isReadonly()) { +virtualSchema = null; + +LOG.debug(Ignoring readonly virtual schema {}, virtualSchema); } } @@ -274,6 +278,7 @@ public abstract class AbstractAttributab } for (AbstractVirSchema virSchema : virSchemaDAO.findAll(attrUtil.virSchemaClass())) { if (attributable.getVirtualAttribute(virSchema.getName()) == null + !virSchema.isReadonly() evaluateMandatoryCondition(attrUtil, attributable, virSchema.getName(), attrUtil.virIntMappingType())) { @@ -294,11 +299,11 @@ public abstract class AbstractAttributab // 1. virtual attributes to be removed for (String vAttrToBeRemoved : vAttrsToBeRemoved) { -AbstractVirSchema virtualSchema = getVirtualSchema(vAttrToBeRemoved, attrUtil.virSchemaClass()); -if (virtualSchema != null) { -AbstractVirAttr virAttr = attributable.getVirtualAttribute(virtualSchema.getName()); +AbstractVirSchema virSchema = getVirtualSchema(vAttrToBeRemoved, attrUtil.virSchemaClass()); +if (virSchema != null) { +AbstractVirAttr virAttr = attributable.getVirtualAttribute(virSchema.getName()); if (virAttr == null) { -LOG.debug(No virtual attribute found for schema {}, virtualSchema.getName()); +LOG.debug(No virtual attribute found for schema {}, virSchema.getName()); } else { attributable.removeVirtualAttribute(virAttr); virAttrDAO.delete(virAttr); @@ -306,7 +311,7 @@ public abstract class AbstractAttributab for (ExternalResource resource : resourceDAO.findAll()) { for (AbstractMappingItem mapItem : attrUtil.getMappingItems(resource)) { -if (virtualSchema.getName().equals(mapItem.getIntAttrName()) +if (virSchema.getName().equals(mapItem.getIntAttrName()) mapItem.getIntMappingType() == attrUtil.virIntMappingType() attributable.getResources().contains(resource)) { @@ -731,7 +736,7 @@ public abstract class AbstractAttributab attributeTO = new AttributeTO(); attributeTO.setSchema(virtualAttribute.getVirtualSchema().getName()); attributeTO.setValues(virtualAttribute.getValues()); -attributeTO.setReadonly(false); + attributeTO.setReadonly(virtualAttribute.getVirtualSchema().isReadonly()); abstractAttributableTO.addVirtualAttribute(attributeTO); } Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/SchemaDataBinder.java URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/SchemaDataBinder.java?rev=1444739r1=1444738r2=1444739view=diff == --- syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/SchemaDataBinder.java (original) +++ syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/SchemaDataBinder.java Mon Feb 11 11:13:07 2013 @@ -19,7 +19,6 @@ package
svn commit: r1444850 - in /syncope/branches/1_0_X: console/src/main/resources/org/apache/syncope/console/pages/ core/src/main/java/org/apache/syncope/core/workflow/ core/src/main/java/org/apache/synco
Author: ilgrosso Date: Mon Feb 11 16:26:31 2013 New Revision: 1444850 URL: http://svn.apache.org/r1444850 Log: [SYNCOPE-308] Default workflow changed to raise exception when update of rejected user is attempted Modified: syncope/branches/1_0_X/console/src/main/resources/org/apache/syncope/console/pages/Users.html syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/workflow/ActivitiUserWorkflowAdapter.java syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/workflow/activiti/Delete.java syncope/branches/1_0_X/core/src/main/resources/userWorkflow.bpmn20.xml Modified: syncope/branches/1_0_X/console/src/main/resources/org/apache/syncope/console/pages/Users.html URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/resources/org/apache/syncope/console/pages/Users.html?rev=1444850r1=1444849r2=1444850view=diff == --- syncope/branches/1_0_X/console/src/main/resources/org/apache/syncope/console/pages/Users.html (original) +++ syncope/branches/1_0_X/console/src/main/resources/org/apache/syncope/console/pages/Users.html Mon Feb 11 16:26:31 2013 @@ -12,26 +12,6 @@ limitations under the License. under the License. -- -wicket:head -style type=text/css -/* SET THE DEFAULT ERROR PANEL'S' STYLE, INVALIDATING THE CSS RENDERING -FOR THE CURRENT PAGE */ -.feedbackPanelERROR { -background: none !important; -font-weight: normal; -color: red; -border:0 none !important; -list-style-type: disc; -padding: 5px; -margin: 5px; -} - -.feedbackPanelERROR span { -padding: 0px; -margin: 0px; -} -/style -/wicket:head wicket:extend div id=tabs ul Modified: syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/workflow/ActivitiUserWorkflowAdapter.java URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/workflow/ActivitiUserWorkflowAdapter.java?rev=1444850r1=1444849r2=1444850view=diff == --- syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/workflow/ActivitiUserWorkflowAdapter.java (original) +++ syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/workflow/ActivitiUserWorkflowAdapter.java Mon Feb 11 16:26:31 2013 @@ -269,7 +269,7 @@ public class ActivitiUserWorkflowAdapter } if (StringUtils.isBlank(user.getWorkflowId())) { -throw new WorkflowException(new NotFoundException(Empty workflow id)); +throw new WorkflowException(new NotFoundException(Empty workflow id for + user)); } ListTask tasks = taskService.createTaskQuery().processInstanceId(user.getWorkflowId()).list(); Modified: syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/workflow/activiti/Delete.java URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/workflow/activiti/Delete.java?rev=1444850r1=1444849r2=1444850view=diff == --- syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/workflow/activiti/Delete.java (original) +++ syncope/branches/1_0_X/core/src/main/java/org/apache/syncope/core/workflow/activiti/Delete.java Mon Feb 11 16:26:31 2013 @@ -34,7 +34,6 @@ public class Delete extends AbstractActi user.checkToken(); } - // remove SyncopeUser variable execution.removeVariable(ActivitiUserWorkflowAdapter.SYNCOPE_USER); } Modified: syncope/branches/1_0_X/core/src/main/resources/userWorkflow.bpmn20.xml URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/core/src/main/resources/userWorkflow.bpmn20.xml?rev=1444850r1=1444849r2=1444850view=diff == --- syncope/branches/1_0_X/core/src/main/resources/userWorkflow.bpmn20.xml (original) +++ syncope/branches/1_0_X/core/src/main/resources/userWorkflow.bpmn20.xml Mon Feb 11 16:26:31 2013 @@ -164,8 +164,13 @@ under the License. userTask id=rejected name=Rejected/ -sequenceFlow id=flow14 sourceRef=rejected targetRef=delete/ - +sequenceFlow id=flow14 sourceRef=rejected targetRef=rejectedGw/ + +exclusiveGateway id=rejectedGw/ +sequenceFlow id=rejected2Delete sourceRef=rejectedGw targetRef=delete + conditionExpression xsi:type=tFormalExpression${task == 'delete'}/conditionExpression +/sequenceFlow + !-- Delete an user (created, active or suspended) -- serviceTask id=delete name=Delete activiti:class=org.apache.syncope.core.workflow.activiti.Delete/
svn commit: r1444867 - /syncope/branches/1_0_X/core/src/main/resources/userWorkflow.bpmn20.xml
Author: ilgrosso Date: Mon Feb 11 17:06:06 2013 New Revision: 1444867 URL: http://svn.apache.org/r1444867 Log: [SYNCOPE-308] Re-merging user workflow definition from trunk Modified: syncope/branches/1_0_X/core/src/main/resources/userWorkflow.bpmn20.xml Modified: syncope/branches/1_0_X/core/src/main/resources/userWorkflow.bpmn20.xml URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/core/src/main/resources/userWorkflow.bpmn20.xml?rev=1444867r1=1444866r2=1444867view=diff == --- syncope/branches/1_0_X/core/src/main/resources/userWorkflow.bpmn20.xml (original) +++ syncope/branches/1_0_X/core/src/main/resources/userWorkflow.bpmn20.xml Mon Feb 11 17:06:06 2013 @@ -23,12 +23,12 @@ under the License. xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:activiti=http://activiti.org/bpmn; xmlns:bpmndi=http://www.omg.org/spec/BPMN/20100524/DI; - xmlns:omgdc=http://www.omg.org/spec/DD/20100524/DC; + xmlns:omgdc=http://www.omg.org/spec/DD/20100524/DC; xmlns:omgdi=http://www.omg.org/spec/DD/20100524/DI; xsi:schemaLocation=http://www.omg.org/spec/BPMN/20100524/MODEL http://www.omg.org/spec/BPMN/2.0/20100501/BPMN20.xsd; - process id=userWorkflow name=User Workflow + process id=userWorkflow name=User Workflow isExecutable=true startEvent id=theStart/ @@ -165,11 +165,14 @@ under the License. userTask id=rejected name=Rejected/ sequenceFlow id=flow14 sourceRef=rejected targetRef=rejectedGw/ - + exclusiveGateway id=rejectedGw/ sequenceFlow id=rejected2Delete sourceRef=rejectedGw targetRef=delete conditionExpression xsi:type=tFormalExpression${task == 'delete'}/conditionExpression /sequenceFlow +sequenceFlow id=rejected2Rejected sourceRef=rejectedGw targetRef=rejected + conditionExpression xsi:type=tFormalExpression${empty task}/conditionExpression +/sequenceFlow !-- Delete an user (created, active or suspended) -- serviceTask id=delete name=Delete activiti:class=org.apache.syncope.core.workflow.activiti.Delete/