BeanDescriptor
.
+ *
+ * @return A BeanDescriptor providing overall information about
+ * the bean, such as its displayName, its customizer, etc. May
+ * return null if the information should be obtained by automatic
+ * analysis.
+ */
+// BeanDescriptor getBeanDescriptor();
+
+ /**
+ * Gets the beans EventSetDescriptor
s.
+ *
+ * @return An array of EventSetDescriptors describing the kinds of
+ * events fired by this bean. May return null if the information
+ * should be obtained by automatic analysis.
+ */
+// EventSetDescriptor[] getEventSetDescriptors();
+
+ /**
+ * A bean may have a "default" event that is the event that will
+ * mostly commonly be used by humans when using the bean.
+ * @return Index of default event in the EventSetDescriptor array
+ * returned by getEventSetDescriptors.
+ * Returns -1 if there is no default event. + */ +// int getDefaultEventIndex(); + + /** + * Returns descriptors for all properties of the bean. + * May return {@code null} if the information + * should be obtained by automatic analysis. + *
+ * If a property is indexed, then its entry in the result array + * will belong to the {@link IndexedPropertyDescriptor} subclass + * of the {@link PropertyDescriptor} class. + * A client of the {@code getPropertyDescriptors} method + * can use "{@code instanceof}" to check + * whether a given {@code PropertyDescriptor} + * is an {@code IndexedPropertyDescriptor}. + * + * @return an array of {@code PropertyDescriptor}s + * describing all properties supported by the bean + * or {@code null} + */ +// PropertyDescriptor[] getPropertyDescriptors(); + + /** + * A bean may have a "default" property that is the property that will + * mostly commonly be initially chosen for update by human's who are + * customizing the bean. + * @return Index of default property in the PropertyDescriptor array + * returned by getPropertyDescriptors. + *
Returns -1 if there is no default property.
+ */
+// int getDefaultPropertyIndex();
+
+ /**
+ * Gets the beans MethodDescriptor
s.
+ *
+ * @return An array of MethodDescriptors describing the externally
+ * visible methods supported by this bean. May return null if
+ * the information should be obtained by automatic analysis.
+ */
+// MethodDescriptor[] getMethodDescriptors();
+
+ /**
+ * This method allows a BeanInfo object to return an arbitrary collection
+ * of other BeanInfo objects that provide additional information on the
+ * current bean.
+ *
+ * If there are conflicts or overlaps between the information provided
+ * by different BeanInfo objects, then the current BeanInfo takes precedence
+ * over the getAdditionalBeanInfo objects, and later elements in the array
+ * take precedence over earlier ones.
+ *
+ * @return an array of BeanInfo objects. May return null.
+ */
+// BeanInfo[] getAdditionalBeanInfo();
+
+}
diff --git a/source/java/org/alfresco/repo/security/authentication/subsystems/SubsystemChainingAuthenticationComponent.java b/source/java/org/alfresco/repo/security/authentication/subsystems/SubsystemChainingAuthenticationComponent.java
index e70b057ffb..372ed1a84c 100644
--- a/source/java/org/alfresco/repo/security/authentication/subsystems/SubsystemChainingAuthenticationComponent.java
+++ b/source/java/org/alfresco/repo/security/authentication/subsystems/SubsystemChainingAuthenticationComponent.java
@@ -92,4 +92,25 @@ public class SubsystemChainingAuthenticationComponent extends AbstractChainingAu
}
return result;
}
+
+ @Override
+ protected AuthenticationComponent getAuthenticationComponent(String instanceId)
+ {
+ ApplicationContext context = this.applicationContextManager.getApplicationContext(instanceId);
+ if(context != null)
+ {
+ try
+ {
+ AuthenticationComponent authenticationComponent = (AuthenticationComponent) context
+ .getBean(sourceBeanName);
+ return authenticationComponent;
+ }
+ catch (NoSuchBeanDefinitionException e)
+ {
+ return null;
+ }
+ }
+
+ return null;
+ }
}
diff --git a/source/java/org/alfresco/repo/security/sync/ldap/LDAPNameResolver.java b/source/java/org/alfresco/repo/security/sync/ldap/LDAPNameResolver.java
index 1c2969c588..d89aed9618 100644
--- a/source/java/org/alfresco/repo/security/sync/ldap/LDAPNameResolver.java
+++ b/source/java/org/alfresco/repo/security/sync/ldap/LDAPNameResolver.java
@@ -18,6 +18,7 @@
*/
package org.alfresco.repo.security.sync.ldap;
+import org.alfresco.repo.security.authentication.AuthenticationDiagnostic;
import org.alfresco.repo.security.authentication.AuthenticationException;
/**
@@ -37,5 +38,5 @@ public interface LDAPNameResolver
* @throws AuthenticationException
* if the user ID cannot be resolved
*/
- public String resolveDistinguishedName(String userId) throws AuthenticationException;
+ public String resolveDistinguishedName(String userId, AuthenticationDiagnostic diagnostic) throws AuthenticationException;
}
diff --git a/source/java/org/alfresco/repo/security/sync/ldap/LDAPUserRegistry.java b/source/java/org/alfresco/repo/security/sync/ldap/LDAPUserRegistry.java
index 196a968709..290e827a1d 100644
--- a/source/java/org/alfresco/repo/security/sync/ldap/LDAPUserRegistry.java
+++ b/source/java/org/alfresco/repo/security/sync/ldap/LDAPUserRegistry.java
@@ -56,6 +56,7 @@ import javax.naming.ldap.LdapName;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.management.subsystems.ActivateableBean;
+import org.alfresco.repo.security.authentication.AuthenticationDiagnostic;
import org.alfresco.repo.security.authentication.AuthenticationException;
import org.alfresco.repo.security.authentication.ldap.LDAPInitialDirContextFactory;
import org.alfresco.repo.security.sync.NodeDescription;
@@ -920,8 +921,12 @@ public class LDAPUserRegistry implements UserRegistry, LDAPNameResolver, Initial
* (non-Javadoc)
* @see org.alfresco.repo.security.sync.ldap.LDAPNameResolver#resolveDistinguishedName(java.lang.String)
*/
- public String resolveDistinguishedName(String userId) throws AuthenticationException
+ public String resolveDistinguishedName(String userId, AuthenticationDiagnostic diagnostic) throws AuthenticationException
{
+ if(logger.isDebugEnabled())
+ {
+ logger.debug("resolveDistinguishedName userId:" + userId);
+ }
SearchControls userSearchCtls = new SearchControls();
userSearchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);
@@ -930,14 +935,19 @@ public class LDAPUserRegistry implements UserRegistry, LDAPNameResolver, Initial
{
this.userIdAttributeName
});
+
+ String query = this.userSearchBase + "(&" + this.personQuery
+ + "(" + this.userIdAttributeName + "= userId))";
+
InitialDirContext ctx = null;
try
{
- ctx = this.ldapInitialContextFactory.getDefaultIntialDirContext();
+ ctx = this.ldapInitialContextFactory.getDefaultIntialDirContext(diagnostic);
// Execute the user query with an additional condition that ensures only the user with the required ID is
- // returned. Force RFC 2254 escaping of the user ID in the filter to avoid any manipulation
+ // returned. Force RFC 2254 escaping of the user ID in the filter to avoid any manipulation
+
NamingEnumeration
+ * Decodes a URL encoded string. The empty string is returned for invalid input values.
+ *
+ * Usage: urldecode(String s)
+ */
+public class URLDecodeMethod extends BaseTemplateProcessorExtension implements TemplateMethodModelEx
+{
+ /**
+ * @see freemarker.template.TemplateMethodModel#exec(java.util.List)
+ */
+ public Object exec(List args) throws TemplateModelException
+ {
+ String result = "";
+
+ if (args.size() != 0)
+ {
+ String s = "";
+ Object arg0 = args.get(0);
+ if (arg0 instanceof TemplateScalarModel)
+ {
+ s = ((TemplateScalarModel)arg0).getAsString();
+ }
+
+ if (s != null)
+ {
+ result = URLDecoder.decode(s);
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/source/java/org/alfresco/service/cmr/module/ModuleService.java b/source/java/org/alfresco/service/cmr/module/ModuleService.java
index 84da4bc1b6..b5e222c976 100644
--- a/source/java/org/alfresco/service/cmr/module/ModuleService.java
+++ b/source/java/org/alfresco/service/cmr/module/ModuleService.java
@@ -19,6 +19,7 @@
package org.alfresco.service.cmr.module;
import java.util.List;
+import java.util.Map;
import org.alfresco.repo.module.ModuleComponent;
@@ -47,6 +48,13 @@ public interface ModuleService
*/
List