You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2014/08/29 11:09:23 UTC

svn commit: r1621266 - in /syncope/trunk: ./ build-tools/src/main/java/org/apache/syncope/buildtools/ client/src/main/java/org/apache/syncope/client/ console/src/main/java/org/apache/syncope/console/resources/ core-upgrader/src/main/java/org/apache/syn...

Author: ilgrosso
Date: Fri Aug 29 09:09:22 2014
New Revision: 1621266

URL: http://svn.apache.org/r1621266
Log:
Merge from 1_2_X

Modified:
    syncope/trunk/   (props changed)
    syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java
    syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/LdifURLLoader.java
    syncope/trunk/client/src/main/java/org/apache/syncope/client/SyncopeClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/resources/WorkflowDefGETResource.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/resources/WorkflowDefPUTResource.java
    syncope/trunk/core-upgrader/src/main/java/org/apache/syncope/upgrader/util/GuardedStringConverter.java
    syncope/trunk/core-upgrader/src/main/java/org/apache/syncope/upgrader/util/XMLDeserializer.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractDerAttr.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractExec.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/PropagationTask.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/TaskExecDAOImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/AbstractSyncActions.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPMembershipSyncActions.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/util/SpringVelocityResourceLoader.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/util/VelocityEngineFactoryBean.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/util/VirAttrCache.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/util/jexl/JexlUtil.java

Propchange: syncope/trunk/
------------------------------------------------------------------------------
  Merged /syncope/branches/1_2_X:r1619967-1621265

Modified: syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java
URL: http://svn.apache.org/viewvc/syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java (original)
+++ syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/ApacheDSStartStopListener.java Fri Aug 29 09:09:22 2014
@@ -49,8 +49,6 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Start and stop an embedded ApacheDS instance alongside with Servlet Context.
- *
- * @see http://svn.apache.org/repos/asf/directory/documentation/samples/trunk/embedded-sample/
  */
 public class ApacheDSStartStopListener implements ServletContextListener {
 
@@ -200,9 +198,9 @@ public class ApacheDSStartStopListener i
     public void contextInitialized(final ServletContextEvent sce) {
         File workDir = (File) sce.getServletContext().getAttribute("javax.servlet.context.tempdir");
         workDir = new File(workDir, "server-work");
-        
+
         final boolean loadDefaultContent = !workDir.exists();
-        
+
         if (loadDefaultContent && !workDir.mkdirs()) {
             throw new RuntimeException("Could not create " + workDir.getAbsolutePath());
         }

Modified: syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/LdifURLLoader.java
URL: http://svn.apache.org/viewvc/syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/LdifURLLoader.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/LdifURLLoader.java (original)
+++ syncope/trunk/build-tools/src/main/java/org/apache/syncope/buildtools/LdifURLLoader.java Fri Aug 29 09:09:22 2014
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
 /**
  * Support for commands to load an LDIF from an URL into a DirContext.
  *
- * @see org.apache.directory.server.protocol.shared.store.LdifFileLoader
+ * Inspired from <tt>org.apache.directory.server.protocol.shared.store.LdifFileLoader</tt>.
  */
 public class LdifURLLoader {
 

Modified: syncope/trunk/client/src/main/java/org/apache/syncope/client/SyncopeClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/client/src/main/java/org/apache/syncope/client/SyncopeClient.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/client/src/main/java/org/apache/syncope/client/SyncopeClient.java (original)
+++ syncope/trunk/client/src/main/java/org/apache/syncope/client/SyncopeClient.java Fri Aug 29 09:09:22 2014
@@ -224,21 +224,21 @@ public class SyncopeClient {
      *
      * @param subjectType user / role
      * @return whether Activiti workflow is enabled for given attributable type
-     * @see WorkflowService#getOptions(org.apache.syncope.common.types.AttributableType)
+     * @see WorkflowService#getOptions(org.apache.syncope.common.types.SubjectType)
      */
     public boolean isActivitiEnabledFor(final SubjectType subjectType) {
         Response options = getService(WorkflowService.class).getOptions(subjectType);
 
         boolean result;
         switch (subjectType) {
+            case ROLE:
+                result = Boolean.valueOf(options.getHeaderString(RESTHeaders.ACTIVITI_ROLE_ENABLED));
+                break;
+
             case USER:
             default:
                 result = Boolean.valueOf(options.getHeaderString(RESTHeaders.ACTIVITI_USER_ENABLED));
                 break;
-
-            case ROLE:
-                result = Boolean.valueOf(options.getHeaderString(RESTHeaders.ACTIVITI_ROLE_ENABLED));
-                break;
         }
 
         return result;

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/resources/WorkflowDefGETResource.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/resources/WorkflowDefGETResource.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/resources/WorkflowDefGETResource.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/resources/WorkflowDefGETResource.java Fri Aug 29 09:09:22 2014
@@ -29,8 +29,7 @@ import org.springframework.web.context.s
 /**
  * Mirror REST resource for obtaining user workflow definition in JSON (used by Activiti Modeler).
  *
- * @see org.apache.syncope.common.services.WorkflowService#exportDefinition(
- * org.apache.syncope.common.types.AttributableType)
+ * @see org.apache.syncope.common.services.WorkflowService#exportDefinition(org.apache.syncope.common.types.SubjectType)
  */
 public class WorkflowDefGETResource extends AbstractResource {
 

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/resources/WorkflowDefPUTResource.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/resources/WorkflowDefPUTResource.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/resources/WorkflowDefPUTResource.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/resources/WorkflowDefPUTResource.java Fri Aug 29 09:09:22 2014
@@ -33,9 +33,8 @@ import org.springframework.web.context.s
 /**
  * Mirror REST resource for putting user workflow definition in JSON (used by Activiti Modeler).
  *
- * @seeorg.apache.syncope.common.services.WorkflowService#importDefinition(
- * org.apache.syncope.common.types.AttributableType,
- * java.lang.String)
+ * @see org.apache.syncope.common.services.WorkflowService#importDefinition(
+ * org.apache.syncope.common.types.SubjectType, java.lang.String)
  */
 public class WorkflowDefPUTResource extends AbstractResource {
 

Modified: syncope/trunk/core-upgrader/src/main/java/org/apache/syncope/upgrader/util/GuardedStringConverter.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core-upgrader/src/main/java/org/apache/syncope/upgrader/util/GuardedStringConverter.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/core-upgrader/src/main/java/org/apache/syncope/upgrader/util/GuardedStringConverter.java (original)
+++ syncope/trunk/core-upgrader/src/main/java/org/apache/syncope/upgrader/util/GuardedStringConverter.java Fri Aug 29 09:09:22 2014
@@ -36,7 +36,7 @@ import com.thoughtworks.xstream.io.Hiera
  * Help in XStream serialization of GuardedString by (de)serializing instances using the default Encryptor (which works
  * consistently across class loading) instead of a random Encryptor instance.
  *
- * @see XMLSerializer
+ * @see XMLDeserializer
  * @see GuardedString
  */
 public class GuardedStringConverter implements Converter {
@@ -125,4 +125,4 @@ public class GuardedStringConverter impl
     public boolean canConvert(final Class type) {
         return type.equals(GuardedString.class);
     }
-}
\ No newline at end of file
+}

Modified: syncope/trunk/core-upgrader/src/main/java/org/apache/syncope/upgrader/util/XMLDeserializer.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core-upgrader/src/main/java/org/apache/syncope/upgrader/util/XMLDeserializer.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/core-upgrader/src/main/java/org/apache/syncope/upgrader/util/XMLDeserializer.java (original)
+++ syncope/trunk/core-upgrader/src/main/java/org/apache/syncope/upgrader/util/XMLDeserializer.java Fri Aug 29 09:09:22 2014
@@ -25,9 +25,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Helper class for deserialization of configuration objects, empowering XStream.
- *
- * @see http://xstream.codehaus.org/
+ * Helper class for deserialization of configuration objects, empowering
+ * <a href="http://xstream.codehaus.org">XStream</a>.
  */
 public final class XMLDeserializer {
 
@@ -49,4 +48,4 @@ public final class XMLDeserializer {
 
     private XMLDeserializer() {
     }
-}
\ No newline at end of file
+}

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractDerAttr.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractDerAttr.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractDerAttr.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractDerAttr.java Fri Aug 29 09:09:22 2014
@@ -41,7 +41,6 @@ public abstract class AbstractDerAttr ex
     }
 
     /**
-     * @see http://commons.apache.org/jexl/reference/index.html
      * @param attributes the set of attributes against which evaluate this derived attribute
      * @return the value of this derived attribute
      */

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractExec.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractExec.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractExec.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/AbstractExec.java Fri Aug 29 09:09:22 2014
@@ -67,7 +67,6 @@ public abstract class AbstractExec exten
     /**
      * Set a message for this execution, taking care of replacing every null character with newline.
      *
-     * @see https://issues.apache.org/jira/browse/SYNCOPE-214
      * @param message the message to set for this execution
      */
     public void setMessage(String message) {

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/PropagationTask.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/PropagationTask.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/PropagationTask.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/PropagationTask.java Fri Aug 29 09:09:22 2014
@@ -51,7 +51,7 @@ public class PropagationTask extends Tas
     private PropagationMode propagationMode;
 
     /**
-     * @see PropagationOperation
+     * @see ResourceOperation
      */
     @Enumerated(EnumType.STRING)
     private ResourceOperation propagationOperation;

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/TaskExecDAOImpl.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/TaskExecDAOImpl.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/TaskExecDAOImpl.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/TaskExecDAOImpl.java Fri Aug 29 09:09:22 2014
@@ -85,16 +85,15 @@ public class TaskExecDAOImpl extends Abs
     }
 
     /**
-     * This method has an explicit Transactional annotation because it is called by AbstractJob.
-     *
-     * @see AbstractJob
+     * This method has an explicit Transactional annotation because it is called by
+     * {@link org.apache.syncope.core.quartz.AbstractTaskJob#execute(org.quartz.JobExecutionContext) }.
      *
      * @param taskId task id
      * @param execution task execution
      * @throws InvalidEntityException if any bean validation fails
      */
     @Override
-    @Transactional(rollbackFor = {Throwable.class})
+    @Transactional(rollbackFor = { Throwable.class })
     public void saveAndAdd(final Long taskId, final TaskExec execution) throws InvalidEntityException {
         Task task = taskDAO.find(taskId);
         task.addExec(execution);

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/AbstractSyncActions.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/AbstractSyncActions.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/AbstractSyncActions.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/AbstractSyncActions.java Fri Aug 29 09:09:22 2014
@@ -27,15 +27,15 @@ public interface AbstractSyncActions<T e
     /**
      * Action to be executed before to start the synchronization task execution.
      *
-     * @param handler synchronization handler being executed.
-     * @throws JobExecutionException in case of generic failure.
+     * @param profile sync profile
+     * @throws JobExecutionException in case of generic failure
      */
     void beforeAll(final SyncProfile<?, ?> profile) throws JobExecutionException;
 
     /**
      * Action to be executed after the synchronization task completion.
      *
-     * @param handler synchronization handler being executed.
+     * @param profile sync profile
      * @param results synchronization result
      * @throws JobExecutionException in case of generic failure
      */

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPMembershipSyncActions.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPMembershipSyncActions.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPMembershipSyncActions.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/impl/LDAPMembershipSyncActions.java Fri Aug 29 09:09:22 2014
@@ -119,7 +119,8 @@ public class LDAPMembershipSyncActions e
 
     /**
      * Keep track of members of the role being updated <b>before</b> actual update takes place. This is not needed on
-     * <ul> <li>beforeProvision() - because the synchronizing role does not exist yet on Syncope</li> <li>beforeDelete() -
+     * <ul> <li>beforeProvision() - because the synchronizing role does not exist yet on Syncope</li> <li>beforeDelete()
+     * -
      * because role delete cascades as membership removal for all users involved</li> </ul>
      *
      * {@inheritDoc}
@@ -177,8 +178,8 @@ public class LDAPMembershipSyncActions e
      *
      * @param delta representing the synchronizing role
      * @param connector associated to the current resource
-     * @return value of attribute returned by getGroupMembershipAttrName()
-     * @see getGroupMembershipAttrName()
+     * @return value of attribute returned by
+     * {@link #getGroupMembershipAttrName(org.apache.syncope.core.propagation.Connector) }
      */
     protected List<Object> getMembAttrValues(final SyncDelta delta, final Connector connector) {
         List<Object> result = Collections.<Object>emptyList();
@@ -256,13 +257,14 @@ public class LDAPMembershipSyncActions e
     /**
      * Synchronize Syncope memberships with the situation read on the external resource's group.
      *
-     * @param handler syncope sync result handler
+     * @param profile sync profile
      * @param delta representing the synchronizing role
      * @param roleTO role after modification performed by the handler
      * @throws JobExecutionException if anything goes wrong
      */
     protected void synchronizeMemberships(
             final SyncProfile<?, ?> profile, final SyncDelta delta, final RoleTO roleTO) throws JobExecutionException {
+
         final AbstractSyncTask task = profile.getSyncTask();
         final ExternalResource resource = task.getResource();
         final Connector connector = profile.getConnector();

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/util/SpringVelocityResourceLoader.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/util/SpringVelocityResourceLoader.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/util/SpringVelocityResourceLoader.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/util/SpringVelocityResourceLoader.java Fri Aug 29 09:09:22 2014
@@ -29,7 +29,7 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Velocity ResourceLoader adapter that loads via a Spring ResourceLoader.
- * Similar to {@link org.springframework.ui.velocity.SpringResourceLoader} but more integrated with
+ * Similar to <tt>org.springframework.ui.velocity.SpringResourceLoader</tt> but more integrated with
  * {@link VelocityEngineFactoryBean}.
  */
 public class SpringVelocityResourceLoader extends ResourceLoader {

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/util/VelocityEngineFactoryBean.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/util/VelocityEngineFactoryBean.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/util/VelocityEngineFactoryBean.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/util/VelocityEngineFactoryBean.java Fri Aug 29 09:09:22 2014
@@ -28,10 +28,8 @@ import org.springframework.core.io.Defau
 import org.springframework.core.io.ResourceLoader;
 
 /**
- * Similar to Spring's equivalent, does not implement {@link org.springframework.context.ResourceLoaderAware} thus
- * allowing custom injection.
- *
- * @see org.springframework.ui.velocity.VelocityEngineFactoryBean
+ * Similar to Spring's equivalent (<tt>org.springframework.ui.velocity.VelocityEngineFactoryBean</tt>), does not
+ * implement {@link org.springframework.context.ResourceLoaderAware} thus allowing custom injection.
  */
 public class VelocityEngineFactoryBean implements FactoryBean<VelocityEngine>, InitializingBean {
 

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/util/VirAttrCache.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/util/VirAttrCache.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/util/VirAttrCache.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/util/VirAttrCache.java Fri Aug 29 09:09:22 2014
@@ -56,13 +56,14 @@ public final class VirAttrCache {
      * @param type user or role
      * @param id user or role id
      * @param schemaName virtual attribute name
-     * @param values virtual attribute values
+     * @param value virtual attribute values
      */
     public void put(
             final AttributableType type,
             final Long id,
             final String schemaName,
             final VirAttrCacheValue value) {
+
         synchronized (cache) {
             // this operations (retrieve cache space and put entry on) have to be thread safe.
             if (this.cache.size() >= this.maxCacheSize) {

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/util/jexl/JexlUtil.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/util/jexl/JexlUtil.java?rev=1621266&r1=1621265&r2=1621266&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/util/jexl/JexlUtil.java (original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/util/jexl/JexlUtil.java Fri Aug 29 09:09:22 2014
@@ -45,7 +45,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * @see http://commons.apache.org/jexl/reference/index.html
+ * JEXL <a href="http://commons.apache.org/jexl/reference/index.html">reference</a> is available.
  */
 public final class JexlUtil {