diff --git a/config/alfresco/bootstrap-context.xml b/config/alfresco/bootstrap-context.xml
index d6edcc9ed2..fd3189c903 100644
--- a/config/alfresco/bootstrap-context.xml
+++ b/config/alfresco/bootstrap-context.xml
@@ -81,6 +81,10 @@
/
alfresco/bootstrap/descriptor.xml
+
+ /
+ alfresco/bootstrap/systemRegistry.xml
+
diff --git a/config/alfresco/bootstrap/systemRegistry.xml b/config/alfresco/bootstrap/systemRegistry.xml
new file mode 100644
index 0000000000..60535e06ff
--- /dev/null
+++ b/config/alfresco/bootstrap/systemRegistry.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
diff --git a/config/alfresco/messages/patch-service.properties b/config/alfresco/messages/patch-service.properties
index e2da4e6b4a..d23c91170f 100644
--- a/config/alfresco/messages/patch-service.properties
+++ b/config/alfresco/messages/patch-service.properties
@@ -128,3 +128,5 @@ patch.linkNodeExtension.description=Fixes link node file extensions to have a .u
patch.linkNodeExtension.result=Fixed {0} link node file extensions. See file {1} for details.
patch.linkNodeExtension.err.unable_to_fix=Auto-fixing of link node file extensions failed. See file {0} for details.
patch.linkNodeExtension.rewritten=Name ''{0}'' rewritten to ''{1}''
+
+patch.systemRegistryBootstrap.description=Bootstraps the node that will hold system registry metadata.
diff --git a/config/alfresco/patch/patch-services-context.xml b/config/alfresco/patch/patch-services-context.xml
index 75dc5f982d..0f678cb28c 100644
--- a/config/alfresco/patch/patch-services-context.xml
+++ b/config/alfresco/patch/patch-services-context.xml
@@ -537,8 +537,7 @@
-
-
+
patch.userHomesFolder
patch.userHomesFolder.description
0
@@ -548,7 +547,7 @@
-
+
@@ -588,7 +587,7 @@
patch.LinkNodeFileExtension
- patch.invalidNameEnding.description
+ patch.linkNodeExtension.description
0
33
34
@@ -601,4 +600,25 @@
+
+ patch.systemRegistryBootstrap
+ patch.systemRegistryBootstrap.description
+ 0
+ 34
+ 35
+
+
+
+
+
+ /sys:system-registry
+
+
+
+ /
+ alfresco/bootstrap/systemRegistry.xml
+
+
+
+
diff --git a/config/alfresco/version.properties b/config/alfresco/version.properties
index 7da60169dc..0c0bccdf92 100644
--- a/config/alfresco/version.properties
+++ b/config/alfresco/version.properties
@@ -19,4 +19,4 @@ version.build=@build-number@
# Schema number
-version.schema=34
+version.schema=35
diff --git a/source/java/org/alfresco/repo/admin/patch/impl/UserHomesFolderPatch.java b/source/java/org/alfresco/repo/admin/patch/impl/UserHomesFolderPatch.java
index c220e6cd4b..8f01ef0d70 100644
--- a/source/java/org/alfresco/repo/admin/patch/impl/UserHomesFolderPatch.java
+++ b/source/java/org/alfresco/repo/admin/patch/impl/UserHomesFolderPatch.java
@@ -72,29 +72,6 @@ public class UserHomesFolderPatch extends AbstractPatch
this.messageSource = messageSource;
}
- /**
- * Ensure that required common properties have been set
- */
- protected void checkCommonProperties() throws Exception
- {
- if (importerBootstrap == null)
- {
- throw new PatchException("'importerBootstrap' property has not been set");
- }
- else if (namespaceService == null)
- {
- throw new PatchException("'namespaceService' property has not been set");
- }
- else if (searchService == null)
- {
- throw new PatchException("'searchService' property has not been set");
- }
- else if (nodeService == null)
- {
- throw new PatchException("'nodeService' property has not been set");
- }
- }
-
/**
* Extracts pertinent references and properties that are common to execution
* of this and derived patches.
@@ -170,11 +147,8 @@ public class UserHomesFolderPatch extends AbstractPatch
protected String applyInternal() throws Exception
{
// properties must be set
- checkCommonProperties();
- if (messageSource == null)
- {
- throw new PatchException("'messageSource' property has not been set");
- }
+ super.checkPropertyNotNull(importerBootstrap, "importerBootstrap");
+ super.checkPropertyNotNull(messageSource, "messageSource");
// get useful values
setUp();
diff --git a/source/java/org/alfresco/repo/security/authentication/AbstractAuthenticationComponent.java b/source/java/org/alfresco/repo/security/authentication/AbstractAuthenticationComponent.java
index a396d535fe..0143e9683b 100644
--- a/source/java/org/alfresco/repo/security/authentication/AbstractAuthenticationComponent.java
+++ b/source/java/org/alfresco/repo/security/authentication/AbstractAuthenticationComponent.java
@@ -116,27 +116,32 @@ public abstract class AbstractAuthenticationComponent implements AuthenticationC
}
/**
- * Explicitly set the current authentication.
- *
- * @param authentication
- * Authentication
+ * @inheritDoc
*/
public Authentication setCurrentAuthentication(Authentication authentication)
{
- Context context = ContextHolder.getContext();
- SecureContext sc = null;
- if ((context == null) || !(context instanceof SecureContext))
+ if (authentication == null)
{
- sc = new SecureContextImpl();
- ContextHolder.setContext(sc);
+ clearCurrentSecurityContext();
+ return null;
}
else
{
- sc = (SecureContext) context;
+ Context context = ContextHolder.getContext();
+ SecureContext sc = null;
+ if ((context == null) || !(context instanceof SecureContext))
+ {
+ sc = new SecureContextImpl();
+ ContextHolder.setContext(sc);
+ }
+ else
+ {
+ sc = (SecureContext) context;
+ }
+ authentication.setAuthenticated(true);
+ sc.setAuthentication(authentication);
+ return authentication;
}
- authentication.setAuthenticated(true);
- sc.setAuthentication(authentication);
- return authentication;
}
/**
diff --git a/source/java/org/alfresco/repo/security/authentication/AuthenticationComponent.java b/source/java/org/alfresco/repo/security/authentication/AuthenticationComponent.java
index d423270042..c3fba1c921 100644
--- a/source/java/org/alfresco/repo/security/authentication/AuthenticationComponent.java
+++ b/source/java/org/alfresco/repo/security/authentication/AuthenticationComponent.java
@@ -52,9 +52,13 @@ public interface AuthenticationComponent
public void clearCurrentSecurityContext();
/**
- * Explicitly set the current suthentication.
+ * Explicitly set the current suthentication. If the authentication is null the
+ * the current authentication is {@link #clearCurrentSecurityContext() cleared}.
+ *
+ * @param authentication the current authentication (may be null).
+ *
+ * @return Returns the modified authentication instance or null if it was cleared.
*/
-
public Authentication setCurrentAuthentication(Authentication authentication);
/**
diff --git a/source/java/org/alfresco/service/cmr/search/ResultSet.java b/source/java/org/alfresco/service/cmr/search/ResultSet.java
index 1d634bf49e..b089bff790 100644
--- a/source/java/org/alfresco/service/cmr/search/ResultSet.java
+++ b/source/java/org/alfresco/service/cmr/search/ResultSet.java
@@ -44,11 +44,15 @@ public interface ResultSet extends Iterable // Specfic iterator ov
/**
* Get the id of the node at the given index
+ *
+ * @param n zero-based index
*/
NodeRef getNodeRef(int n);
/**
* Get the score for the node at the given position
+ *
+ * @param n zero-based index
*/
float getScore(int n);
@@ -61,6 +65,8 @@ public interface ResultSet extends Iterable // Specfic iterator ov
/**
* Get a row from the result set by row index, starting at 0.
+ *
+ * @param i zero-based index
*/
ResultSetRow getRow(int i);
@@ -76,6 +82,8 @@ public interface ResultSet extends Iterable // Specfic iterator ov
/**
* Get the child assoc ref for a particular row.
+ *
+ * @param n zero-based index
*/
ChildAssociationRef getChildAssocRef(int n);