svn commit: r1441341 - /syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleDetailsPanel.java
Author: ilgrosso Date: Fri Feb 1 08:41:20 2013 New Revision: 1441341 URL: http://svn.apache.org/viewvc?rev=1441341view=rev Log: More robust handling of Long - long conversion Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleDetailsPanel.java Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleDetailsPanel.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleDetailsPanel.java?rev=1441341r1=1441340r2=1441341view=diff == --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleDetailsPanel.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/RoleDetailsPanel.java Fri Feb 1 08:41:20 2013 @@ -331,7 +331,9 @@ public class RoleDetailsPanel extends Pa @Override public void setObject(final Object object) { -roleTO.setParent((Long) object); +long parentId = (object instanceof Long) +? ((Long) object).longValue() : 0; +roleTO.setParent(parentId); } @Override
svn commit: r1441361 - in /syncope/trunk/console/src/main: java/org/apache/syncope/console/pages/ java/org/apache/syncope/console/pages/panels/ java/org/apache/syncope/console/rest/ resources/org/apac
Author: ilgrosso Date: Fri Feb 1 09:35:21 2013 New Revision: 1441361 URL: http://svn.apache.org/viewvc?rev=1441361view=rev Log: [SYNCOPE-294] UserTO re-read from REST before opening the edit modal page Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/AbstractAttributableRestClient.java syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.html syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage.properties syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/ResourceModalPage_it.properties Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java?rev=1441361r1=1441360r2=1441361view=diff == --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java Fri Feb 1 09:35:21 2013 @@ -18,6 +18,7 @@ */ package org.apache.syncope.console.pages; +import org.apache.commons.lang.StringUtils; import org.apache.syncope.common.to.MappingItemTO; import org.apache.syncope.common.to.ResourceTO; import org.apache.syncope.common.types.AttributableType; @@ -32,8 +33,10 @@ import org.apache.wicket.ajax.markup.htm import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; import org.apache.wicket.extensions.ajax.markup.html.IndicatingAjaxButton; import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow; +import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.model.CompoundPropertyModel; +import org.apache.wicket.model.Model; import org.apache.wicket.model.ResourceModel; import org.apache.wicket.spring.injection.annot.SpringBean; @@ -52,6 +55,14 @@ public class ResourceModalPage extends B super(); +this.add(new Label(new, StringUtils.isBlank(resourceTO.getName()) +? new ResourceModel(new) +: new Model())); + +this.add(new Label(name, StringUtils.isBlank(resourceTO.getName()) +? +: resourceTO.getName())); + final Form form = new Form(form); form.setModel(new CompoundPropertyModel(resourceTO)); Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java?rev=1441361r1=1441360r2=1441361view=diff == --- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java (original) +++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java Fri Feb 1 09:35:21 2013 @@ -33,6 +33,7 @@ import org.apache.syncope.console.pages. import org.apache.syncope.console.pages.ResultStatusModalPage; import org.apache.syncope.console.pages.StatusModalPage; import org.apache.syncope.console.rest.AbstractAttributableRestClient; +import org.apache.syncope.console.rest.UserRestClient; import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn; import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn; import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.TokenColumn; @@ -147,14 +148,15 @@ public class UserSearchResultPanel exten @Override public Page createPage() { -return new EditUserModalPage( -page.getPageReference(), editmodal, (UserTO) model.getObject()); +// SYNCOPE-294: re-read userTO before edit +UserTO userTO = ((UserRestClient) restClient).read(model.getObject().getId()); +return new EditUserModalPage(page.getPageReference(), editmodal, userTO); } }); editmodal.show(target); } -}, ActionLink.ActionType.EDIT, Users, update); +}, ActionLink.ActionType.EDIT, Users, read); panel.add(new ActionLink() {
[CONF] Apache Syncope REST API upgrade
REST API upgrade Page edited by Jan Bernhardt Comment: Updating TaskService Changes (9) ... || Old URL || New URL || Comment || | POST /task/create/sync | POST /tasks | Creates a new (sync) sync task. | | GET /task/sync/list | GET /tasks/sync | Returns a list of sync tasks. | | GET /task/sync/list/\{page\}/\{size\} | GET /tasks/sync?page=\{page\}size=\{size\} | Returns a list of paginated sync tasks. | | GET /task/sync/count | GET /tasks/sync/count | Returns number of sync tasks. | | POST /task/update/sync | PUT /tasks/\{taskId\} | Updates sync task with matching id. | | GET /task/sync/execution/list | GET /tasks/sync/executions | Returns list of sync task executions. | || Old URL || New URL || Comment || | POST /task/create/sched | POST /tasks | Creates a new (sched) sched task. | | GET /task/\{kind\}/count | GET /tasks/\{kind\}/count | Returns number of tasks for matching kind. | | GET /task/sched/list | GET /tasks/sched | Returns a list of sched tasks. | | GET /task/sched/list/\{page\}/\{size\} | GET /tasks/sched?page=\{page\}size=\{size\} | Returns a list of paginated sched tasks. | | GET /task/sched/count | GET /tasks/sched/count | Returns number of sched tasks. | | POST /task/update/sched | PUT /tasks/\{taskId\} | Updates sched task with matching id. | | GET /task/sched/execution/list | GET /tasks/sched/executions | Returns list of sched task executions. | || Old URL || New URL || Comment || | GET /task/propagation/list | GET /tasks/propagation | Returns a list of propagation tasks. | | GET /task/propagation/list/\{page\}/\{size\} | GET /tasks/propagation?page=\{page\}size=\{size\} | Returns a list of paginated propagation tasks. | | GET /task/propagation/count | GET /tasks/propagation/count | Returns number of propagation tasks. | | GET /task/propagation/execution/list | GET /tasks/propagation/executions | Returns list of propagation task executions. | || Old URL || New URL || Comment || | GET /task/notification/list | GET /tasks/notification | Returns a list of notification tasks. | | GET /task/notification/list/\{page\}/\{size\} | GET /tasks/notification?page=\{page\}size=\{size\} | Returns a list of paginated notification tasks. | | GET /task/notification/count | GET /tasks/notification/count | Returns number of notification tasks. | | GET /task/notification/execution/list | GET /tasks/notification/executions | Returns list of notification task executions. | || Old URL || New URL || Comment || | GET /task/read/\{taskId\} | GET /tasks/\{taskId\} | Returns task with matching id. | | GET /task/delete/\{taskId\} | DELETE /tasks/\{taskId\} | Deletes task with matching id. | | GET /task/execution/delete/\{executionId\} /task/execution/read/\{executionId\} | DELETE GET /tasks/executions/\{executionId\} | Deletes Returns execution of task with matching id. | | POST /task/execute/\{taskId\}?dryRun=\{dryRun\} | POST /tasks/\{taskId\}/execute?dryRun=\{dryRun\} | Executes task with matching id. | | GET /task/execution/delete/\{executionId\} | DELETE /tasks/executions/\{executionId\} | Deletes execution of task with matching id. | | GET /task/jobClasses | GET /tasks/jobClasses | Returns a list of available jobClasses. | | GET /task/syncActionsClasses | GET /tasks/syncActionsClasses | Returns a list of available syncActionsClasses. | | GET /task/\{kind\}/list | GET /tasks/\{kind\} | Returns a list of task of matching kind. | | GET /task/\{kind\}/list/\{page\}/\{size\} | GET /tasks/\{kind\}?page=\{page\}size=\{size\} | Returns a list of task of matching kind with page contrains. | | GET /task/\{kind\}/execution/list | GET /tasks/\{kind\}/executions | Returns list of executions with matching kind. | | GET /task/read/\{taskId\} | GET /tasks/\{taskId\} | Returns task with matching id. | | GET /task/execution/read/\{executionId\} | GET /tasks/executions/\{executionId\} | Returns execution of task with matching id. | | POST /task/update/sync | PUT /tasks/\{taskId\} | Updates (sync) task with matching id. | | POST /task/update/sched | PUT /tasks/\{taskId\} | Updates (sched) task with matching id. | | GET /task/execution/report/\{executionId\} \\ ?executionStatus=\{executionStatus\}message=\{message\} | POST /tasks/executions/\{executionId\}/report | Creates a new report for matching execution id. | h2. User Service ... Full Content Version warningIn Syncope 1.1.0 a new REST interface was introduced (referred as new in the following). The REST interface available in 1.0.X (referred as old in the following) is still present but will be removed from releases =
svn commit: r1441415 - in /syncope/trunk/core/src: main/java/org/apache/syncope/core/services/TaskServiceImpl.java test/java/org/apache/syncope/core/rest/TaskTestITCase.java
Author: cschneider Date: Fri Feb 1 12:07:46 2013 New Revision: 1441415 URL: http://svn.apache.org/viewvc?rev=1441415view=rev Log: SYNCOPE-231 Removing unused imports Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/services/TaskServiceImpl.java syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/services/TaskServiceImpl.java URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/services/TaskServiceImpl.java?rev=1441415r1=1441414r2=1441415view=diff == --- syncope/trunk/core/src/main/java/org/apache/syncope/core/services/TaskServiceImpl.java (original) +++ syncope/trunk/core/src/main/java/org/apache/syncope/core/services/TaskServiceImpl.java Fri Feb 1 12:07:46 2013 @@ -37,10 +37,7 @@ import org.apache.syncope.common.to.Task import org.apache.syncope.common.types.PropagationTaskExecStatus; import org.apache.syncope.common.types.TaskType; import org.apache.syncope.common.util.CollectionWrapper; -import org.apache.syncope.core.persistence.dao.TaskDAO; import org.apache.syncope.core.rest.controller.TaskController; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java?rev=1441415r1=1441414r2=1441415view=diff == --- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java (original) +++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java Fri Feb 1 12:07:46 2013 @@ -28,7 +28,6 @@ import java.util.Collections; import java.util.List; import java.util.Set; -import javax.ws.rs.NotFoundException; import javax.ws.rs.core.Response; import org.apache.syncope.common.search.AttributableCond; import org.apache.syncope.common.search.AttributeCond;
[CONF] Apache Syncope Upgrade instructions
Upgrade instructions Page edited by Fabio Martelli Changes (1) ... {code} h3. Changes in ConnInstance table [SYNCOPE-279|https://issues.apache.org/jira/browse/SYNCOPE-279] introduced one additional columns in ConnInstance table: {code} connRequestTimeout INTEGER {code} h3. Other * ExternalResource.checkMandatoryConstraint renamed to ExternalResource.enforceMandatoryCondition ... Full Content 1.1.0 Espressivo - 1.1.0 Ad Libitum 1.1.0 Espressivo - 1.1.0 Ad Libitum Draft until official release of 1.1.0 Some changes in the persistence layer need to be reflected in the database used by Syncope as internal repository. MD5 is not supported any more SYNCOPE-51 removed MD5 from supported password cipher algorithm. This means that: password.cipher.algorithm must be set to something different (say SHA1) in SyncopeConf table any row in SyncopeUser table with cipherAlgorithm=MD5 must be set to something different (say SHA1); moreover, all users must change their own password Quartz upgraded to 2.1.X Syncope now features the latest version of Quartz (as per SYNCOPE-93). Remove any QRTZ_* table from the database: such tables will be re-created at next startup. New mandatory conf param 'notificationjob.cronExpression' As per SYNCOPE-216, you can specify when the NotificationJob will run. Add a row to SyncopeConf table with key = notificationjob.cronExpression and your chosen cron _expression_ as value. Reference and some examples of cron expressions are provided in Quartz website. Changes in Task table SYNCOPE-144 introduced two additional columns in Task table: name VARCHAR(255), description VARCHAR(255) Change any value from org.apache.syncope.core.scheduling.SyncJob to org.apache.syncope.core.sync.SyncJob of the jobClassName column Moreover, SYNCOPE-186 renamed jobActionsClassName to actionsClassName Changes in SyncopeRole table SYNCOPE-225 introduced three additional columns in SyncopeRole table: inheritOwner INTEGER, ROLEOWNER_ID BIGINT, USEROWNER_ID BIGINT Changes in ConnInstance table SYNCOPE-279 introduced one additional columns in ConnInstance table: connRequestTimeout INTEGER Other ExternalResource.checkMandatoryConstraint renamed to ExternalResource.enforceMandatoryCondition ExternalResource has now an additional column actionsClassName VARCHAR(255) Change Notification Preferences View Online | View Changes | Add Comment
svn commit: r1441452 - /syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/AbstractAttributableDataBinder.java
Author: massi Date: Fri Feb 1 14:16:08 2013 New Revision: 1441452 URL: http://svn.apache.org/viewvc?rev=1441452view=rev Log: SYNCOPE-306 added right check on virtual attribute Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/AbstractAttributableDataBinder.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=1441452r1=1441451r2=1441452view=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 Fri Feb 1 14:16:08 2013 @@ -273,7 +273,7 @@ public abstract class AbstractAttributab } } for (AbstractVirSchema virSchema : virSchemaDAO.findAll(attrUtil.virSchemaClass())) { -if (attributable.getAttribute(virSchema.getName()) == null +if (attributable.getVirtualAttribute(virSchema.getName()) == null evaluateMandatoryCondition(attrUtil, attributable, virSchema.getName(), attrUtil.virIntMappingType())) {
svn commit: r1441462 - in /syncope/trunk: client/src/main/java/org/apache/syncope/client/services/proxy/ common/src/main/java/org/apache/syncope/common/services/ core/src/main/java/org/apache/syncope/
Author: jbernhardt Date: Fri Feb 1 14:46:13 2013 New Revision: 1441462 URL: http://svn.apache.org/viewvc?rev=1441462view=rev Log: [SYNCOPE-231] * Adding Java Doc for TaskService * changing return type from report(..) to void, since console does not care about it and read operation can be used to get updated status Modified: syncope/trunk/client/src/main/java/org/apache/syncope/client/services/proxy/TaskServiceProxy.java syncope/trunk/common/src/main/java/org/apache/syncope/common/services/TaskService.java syncope/trunk/core/src/main/java/org/apache/syncope/core/services/TaskServiceImpl.java syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java Modified: syncope/trunk/client/src/main/java/org/apache/syncope/client/services/proxy/TaskServiceProxy.java URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/client/services/proxy/TaskServiceProxy.java?rev=1441462r1=1441461r2=1441462view=diff == --- syncope/trunk/client/src/main/java/org/apache/syncope/client/services/proxy/TaskServiceProxy.java (original) +++ syncope/trunk/client/src/main/java/org/apache/syncope/client/services/proxy/TaskServiceProxy.java Fri Feb 1 14:46:13 2013 @@ -187,8 +187,8 @@ public class TaskServiceProxy extends Sp } @Override -public TaskExecTO report(final Long executionId, final ReportExecTO report) { -return getRestTemplate().getForObject( +public void report(final Long executionId, final ReportExecTO report) { +getRestTemplate().getForObject( baseUrl + task/execution/report/{executionId}.json + ?executionStatus={status}message={message}, TaskExecTO.class, executionId, report.getStatus(), report.getMessage()); } Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/services/TaskService.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/services/TaskService.java?rev=1441462r1=1441461r2=1441462view=diff == --- syncope/trunk/common/src/main/java/org/apache/syncope/common/services/TaskService.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/services/TaskService.java Fri Feb 1 14:46:13 2013 @@ -42,60 +42,60 @@ import org.apache.syncope.common.types.T public interface TaskService { /** - * @param taskType - * @return + * @param taskType filter for task count + * @return Returns number of tasks with matching type */ @GET @Path({type}/count) int count(@PathParam(type) TaskType taskType); /** - * @param taskTO - * @return + * @param taskTO Task to be created + * @return Response containing URI location for created resource */ @POST Response create(TaskTO taskTO); /** - * @param taskId + * @param taskId Id of task to be deleted */ @DELETE @Path({taskId}) void delete(@PathParam(taskId) Long taskId); /** - * @param executionId + * @param executionId ID of task execution to be deleted */ @DELETE @Path(executions/{executionId}) void deleteExecution(@PathParam(executionId) Long executionId); /** - * @param taskId - * @param dryRun - * @return + * @param taskId Id of task to be executed + * @param dryRun if true, task will only be simulated + * @return Returns TaskExcecution */ @POST @Path({taskId}/execute) TaskExecTO execute(@PathParam(taskId) Long taskId, @QueryParam(dryRun) @DefaultValue(false) boolean dryRun); /** - * @return + * @return Returns list of JobClasses */ @GET @Path(jobClasses) SetJobClassTO getJobClasses(); /** - * @return + * @return Returns list of SyncActionClasses */ @GET @Path(syncActionsClasses) SetSyncActionClassTO getSyncActionsClasses(); /** - * @param taskType - * @return + * @param taskType Type of tasks to be listed + * @return Returns list of tasks with matching type */ @GET @Path({type}/list) @@ -103,10 +103,10 @@ public interface TaskService { List? extends TaskTO list(@PathParam(type) TaskType taskType); /** - * @param taskType - * @param page - * @param size - * @return + * @param taskType Type of tasks to be listed + * @param page Page number of tasks in relation to page size + * @param size Number of tasks listed per page + * @return Returns paginated list of task with matching type */ @GET @Path({type}) @@ -114,44 +114,42 @@ public interface TaskService { @QueryParam(size) @DefaultValue(25) int size); /** - * @param taskType - * @return + * @param taskType Type of task executions to be
svn commit: r1441495 - /syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java
Author: ashakirin Date: Fri Feb 1 15:51:53 2013 New Revision: 1441495 URL: http://svn.apache.org/viewvc?rev=1441495view=rev Log: [SYNCOPE-231] Improved TaskTO with @XmlSeeAlso Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java?rev=1441495r1=1441494r2=1441495view=diff == --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java Fri Feb 1 15:51:53 2013 @@ -25,12 +25,15 @@ import java.util.List; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; import org.apache.syncope.common.AbstractBaseBean; @XmlRootElement(name = task) @XmlType +@XmlSeeAlso({ SyncTaskTO.class, NotificationTaskTO.class, SyncTaskTO.class, +SchedTaskTO.class, PropagationTaskTO.class }) public abstract class TaskTO extends AbstractBaseBean { private static final long serialVersionUID = 386450127003321197L;
svn commit: r1441509 - in /syncope/trunk: common/src/main/java/org/apache/syncope/common/to/TaskTO.java core/src/main/java/org/apache/syncope/core/services/TaskServiceImpl.java core/src/test/java/org/
Author: cschneider Date: Fri Feb 1 16:24:26 2013 New Revision: 1441509 URL: http://svn.apache.org/viewvc?rev=1441509view=rev Log: SYNCOPE-231 Switched contenttype of UserTest to xml and fixed error in TaskService create location Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java syncope/trunk/core/src/main/java/org/apache/syncope/core/services/TaskServiceImpl.java syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/jaxrs/UserTestITCaseJAXRS.java Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java?rev=1441509r1=1441508r2=1441509view=diff == --- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/TaskTO.java Fri Feb 1 16:24:26 2013 @@ -34,6 +34,16 @@ import org.apache.syncope.common.Abstrac @XmlType @XmlSeeAlso({ SyncTaskTO.class, NotificationTaskTO.class, SyncTaskTO.class, SchedTaskTO.class, PropagationTaskTO.class }) + +/* This will help CXF marshalling but is incompatible with spring services +@JsonTypeInfo(use=Id.NAME, include=As.PROPERTY, property=type) +@JsonSubTypes({ +@JsonSubTypes.Type(value=NotificationTaskTO.class, name=notificationTask), +@JsonSubTypes.Type(value=PropagationTaskTO.class, name=propagationTask), +@JsonSubTypes.Type(value=SchedTaskTO.class, name=schedTask), +@JsonSubTypes.Type(value=SyncTaskTO.class, name=syncTask) +}) +*/ public abstract class TaskTO extends AbstractBaseBean { private static final long serialVersionUID = 386450127003321197L; Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/services/TaskServiceImpl.java URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/services/TaskServiceImpl.java?rev=1441509r1=1441508r2=1441509view=diff == --- syncope/trunk/core/src/main/java/org/apache/syncope/core/services/TaskServiceImpl.java (original) +++ syncope/trunk/core/src/main/java/org/apache/syncope/core/services/TaskServiceImpl.java Fri Feb 1 16:24:26 2013 @@ -29,6 +29,8 @@ import javax.ws.rs.core.UriInfo; import org.apache.syncope.common.SyncopeConstants; import org.apache.syncope.common.services.TaskService; import org.apache.syncope.common.to.JobClassTO; +import org.apache.syncope.common.to.NotificationTaskTO; +import org.apache.syncope.common.to.PropagationTaskTO; import org.apache.syncope.common.to.ReportExecTO; import org.apache.syncope.common.to.SchedTaskTO; import org.apache.syncope.common.to.SyncActionClassTO; @@ -63,10 +65,25 @@ public class TaskServiceImpl implements } else { throw new BadRequestException(); } -URI location = uriInfo.getAbsolutePathBuilder().path(createdTask.getId() + ).build(); +TaskType taskType = getTaskType(taskTO.getClass()); +URI location = uriInfo.getAbsolutePathBuilder().path(taskType.toString() + / + createdTask.getId()).build(); return Response.created(location).header(SyncopeConstants.REST_HEADER_ID, createdTask.getId()).build(); } +private TaskType getTaskType(Class? extends TaskTO taskClass) { +if (taskClass == PropagationTaskTO.class) { +return TaskType.PROPAGATION; +} else if (taskClass == NotificationTaskTO.class) { +return TaskType.NOTIFICATION; +} else if (taskClass == SchedTaskTO.class) { +return TaskType.SCHEDULED; +} else if (taskClass == SyncTaskTO.class) { +return TaskType.SYNCHRONIZATION; +} else { +throw new IllegalArgumentException(Invalid task class: + taskClass.getName()); +} +} + @Override public void delete(final Long taskId) { taskController.delete(taskId); Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/jaxrs/UserTestITCaseJAXRS.java URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/jaxrs/UserTestITCaseJAXRS.java?rev=1441509r1=1441508r2=1441509view=diff == --- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/jaxrs/UserTestITCaseJAXRS.java (original) +++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/jaxrs/UserTestITCaseJAXRS.java Fri Feb 1 16:24:26 2013 @@ -28,5 +28,6 @@ public class UserTestITCaseJAXRS extends public UserTestITCaseJAXRS() { super(); setEnabledCXF(true); +setContentType(CONTENT_TYPE_XML); } }
svn commit: r1441528 - /syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java
Author: cschneider Date: Fri Feb 1 16:58:01 2013 New Revision: 1441528 URL: http://svn.apache.org/viewvc?rev=1441528view=rev Log: SYNCOPE-231 Added test for issue in userService read by name Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java?rev=1441528r1=1441527r2=1441528view=diff == --- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java (original) +++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java Fri Feb 1 16:58:01 2013 @@ -808,6 +808,13 @@ public class UserTestITCase extends Abst } @Test +public void readWithMailAddressAsUserName() { +UserTO userTO = createUser(getSampleTO(m...@domain.org)); +userTO = userService.read(userTO.getUsername()); +assertNotNull(userTO); +} + +@Test public void updateWithouPassword() { UserTO userTO = getUniqueSampleTO(updatewith...@password.com);
svn commit: r1441540 - /syncope/trunk/common/src/main/java/org/apache/syncope/common/services/UserService.java
Author: cschneider Date: Fri Feb 1 17:13:24 2013 New Revision: 1441540 URL: http://svn.apache.org/viewvc?rev=1441540view=rev Log: SYNCOPE-231 Fix for issue in UserService read by name Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/services/UserService.java Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/services/UserService.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/services/UserService.java?rev=1441540r1=1441539r2=1441540view=diff == --- syncope/trunk/common/src/main/java/org/apache/syncope/common/services/UserService.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/services/UserService.java Fri Feb 1 17:13:24 2013 @@ -108,7 +108,7 @@ public interface UserService { @GET @Path(readByUsername/{username}) -UserTO read(@MatrixParam(uname) String username); +UserTO read(@PathParam(username) String username); @GET @Path(read/self)
svn commit: r1441629 - in /syncope/trunk: client/src/main/java/org/apache/syncope/client/services/proxy/ common/src/main/java/org/apache/syncope/common/services/ console/src/main/java/org/apache/synco
Author: cschneider Date: Fri Feb 1 21:10:35 2013 New Revision: 1441629 URL: http://svn.apache.org/viewvc?rev=1441629view=rev Log: SYNCOPE-231 Fix marshalling issue in getReportletConfClasses Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ReportletConfClasses.java (with props) Modified: syncope/trunk/client/src/main/java/org/apache/syncope/client/services/proxy/ReportServiceProxy.java syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ReportService.java syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/ReportRestClient.java syncope/trunk/core/src/main/java/org/apache/syncope/core/services/ReportServiceImpl.java syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/ReportTestITCase.java Modified: syncope/trunk/client/src/main/java/org/apache/syncope/client/services/proxy/ReportServiceProxy.java URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/client/services/proxy/ReportServiceProxy.java?rev=1441629r1=1441628r2=1441629view=diff == --- syncope/trunk/client/src/main/java/org/apache/syncope/client/services/proxy/ReportServiceProxy.java (original) +++ syncope/trunk/client/src/main/java/org/apache/syncope/client/services/proxy/ReportServiceProxy.java Fri Feb 1 21:10:35 2013 @@ -21,14 +21,13 @@ package org.apache.syncope.client.servic import java.io.InputStream; import java.net.URI; import java.util.Arrays; -import java.util.HashSet; import java.util.List; -import java.util.Set; import javax.ws.rs.core.Response; import org.apache.syncope.common.SyncopeConstants; import org.apache.syncope.common.services.ReportService; +import org.apache.syncope.common.services.ReportletConfClasses; import org.apache.syncope.common.to.ReportExecTO; import org.apache.syncope.common.to.ReportTO; import org.apache.syncope.common.types.ReportExecExportFormat; @@ -74,10 +73,10 @@ public class ReportServiceProxy extends } @Override -public SetString getReportletConfClasses() { +public ReportletConfClasses getReportletConfClasses() { ListString confClasses = Arrays.asList(getRestTemplate().getForObject( baseUrl + report/reportletConfClasses.json, String[].class)); -return new HashSetString(confClasses); +return new ReportletConfClasses(confClasses); } @Override Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ReportService.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ReportService.java?rev=1441629r1=1441628r2=1441629view=diff == --- syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ReportService.java (original) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ReportService.java Fri Feb 1 21:10:35 2013 @@ -19,7 +19,6 @@ package org.apache.syncope.common.services; import java.util.List; -import java.util.Set; import javax.ws.rs.DELETE; import javax.ws.rs.DefaultValue; @@ -89,7 +88,7 @@ public interface ReportService { */ @GET @Path(reportletConfClasses) -SetString getReportletConfClasses(); +ReportletConfClasses getReportletConfClasses(); /** * @return Returns a list of all reports Added: syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ReportletConfClasses.java URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ReportletConfClasses.java?rev=1441629view=auto == --- syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ReportletConfClasses.java (added) +++ syncope/trunk/common/src/main/java/org/apache/syncope/common/services/ReportletConfClasses.java Fri Feb 1 21:10:35 2013 @@ -0,0 +1,49 @@ +/* + * 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.common.services; + +import java.util.ArrayList; +import