mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged DEV\EXTENSIONS to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/DEV/EXTENSIONS@4843 svn://svn.alfresco.com:3691/alfresco/BRANCHES/DEV/EXTENSIONS@4848 . Allow null in setAuthentication Patch for system registry area git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4953 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -81,6 +81,10 @@
|
|||||||
<prop key="path">/</prop>
|
<prop key="path">/</prop>
|
||||||
<prop key="location">alfresco/bootstrap/descriptor.xml</prop>
|
<prop key="location">alfresco/bootstrap/descriptor.xml</prop>
|
||||||
</props>
|
</props>
|
||||||
|
<props>
|
||||||
|
<prop key="path">/</prop>
|
||||||
|
<prop key="location">alfresco/bootstrap/systemRegistry.xml</prop>
|
||||||
|
</props>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
6
config/alfresco/bootstrap/systemRegistry.xml
Normal file
6
config/alfresco/bootstrap/systemRegistry.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0"
|
||||||
|
xmlns:sys="http://www.alfresco.org/model/system/1.0">
|
||||||
|
|
||||||
|
<sys:container view:childName="sys:system-registry" />
|
||||||
|
|
||||||
|
</view:view>
|
@@ -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.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.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.linkNodeExtension.rewritten=Name ''{0}'' rewritten to ''{1}''
|
||||||
|
|
||||||
|
patch.systemRegistryBootstrap.description=Bootstraps the node that will hold system registry metadata.
|
||||||
|
@@ -537,7 +537,6 @@
|
|||||||
</props>
|
</props>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="patch.userHomesFolder" class="org.alfresco.repo.admin.patch.impl.UserHomesFolderPatch" parent="basePatch" >
|
<bean id="patch.userHomesFolder" class="org.alfresco.repo.admin.patch.impl.UserHomesFolderPatch" parent="basePatch" >
|
||||||
<property name="id"><value>patch.userHomesFolder</value></property>
|
<property name="id"><value>patch.userHomesFolder</value></property>
|
||||||
<property name="description"><value>patch.userHomesFolder.description</value></property>
|
<property name="description"><value>patch.userHomesFolder.description</value></property>
|
||||||
@@ -588,7 +587,7 @@
|
|||||||
|
|
||||||
<bean id="patch.LinkNodeFileExtension" class="org.alfresco.repo.admin.patch.impl.LinkNodeFileExtensionPatch" parent="basePatch" >
|
<bean id="patch.LinkNodeFileExtension" class="org.alfresco.repo.admin.patch.impl.LinkNodeFileExtensionPatch" parent="basePatch" >
|
||||||
<property name="id"><value>patch.LinkNodeFileExtension</value></property>
|
<property name="id"><value>patch.LinkNodeFileExtension</value></property>
|
||||||
<property name="description"><value>patch.invalidNameEnding.description</value></property>
|
<property name="description"><value>patch.linkNodeExtension.description</value></property>
|
||||||
<property name="fixesFromSchema"><value>0</value></property>
|
<property name="fixesFromSchema"><value>0</value></property>
|
||||||
<property name="fixesToSchema"><value>33</value></property>
|
<property name="fixesToSchema"><value>33</value></property>
|
||||||
<property name="targetSchema"><value>34</value></property>
|
<property name="targetSchema"><value>34</value></property>
|
||||||
@@ -601,4 +600,25 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<bean id="patch.systemRegistryBootstrap" class="org.alfresco.repo.admin.patch.impl.GenericBootstrapPatch" parent="basePatch" >
|
||||||
|
<property name="id"><value>patch.systemRegistryBootstrap</value></property>
|
||||||
|
<property name="description"><value>patch.systemRegistryBootstrap.description</value></property>
|
||||||
|
<property name="fixesFromSchema"><value>0</value></property>
|
||||||
|
<property name="fixesToSchema"><value>34</value></property>
|
||||||
|
<property name="targetSchema"><value>35</value></property>
|
||||||
|
<!-- bootstrap view -->
|
||||||
|
<property name="importerBootstrap">
|
||||||
|
<ref bean="systemBootstrap" />
|
||||||
|
</property>
|
||||||
|
<property name="checkPath">
|
||||||
|
<value>/sys:system-registry</value>
|
||||||
|
</property>
|
||||||
|
<property name="bootstrapView">
|
||||||
|
<props>
|
||||||
|
<prop key="path">/</prop>
|
||||||
|
<prop key="location">alfresco/bootstrap/systemRegistry.xml</prop>
|
||||||
|
</props>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
@@ -19,4 +19,4 @@ version.build=@build-number@
|
|||||||
|
|
||||||
# Schema number
|
# Schema number
|
||||||
|
|
||||||
version.schema=34
|
version.schema=35
|
||||||
|
@@ -72,29 +72,6 @@ public class UserHomesFolderPatch extends AbstractPatch
|
|||||||
this.messageSource = messageSource;
|
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
|
* Extracts pertinent references and properties that are common to execution
|
||||||
* of this and derived patches.
|
* of this and derived patches.
|
||||||
@@ -170,11 +147,8 @@ public class UserHomesFolderPatch extends AbstractPatch
|
|||||||
protected String applyInternal() throws Exception
|
protected String applyInternal() throws Exception
|
||||||
{
|
{
|
||||||
// properties must be set
|
// properties must be set
|
||||||
checkCommonProperties();
|
super.checkPropertyNotNull(importerBootstrap, "importerBootstrap");
|
||||||
if (messageSource == null)
|
super.checkPropertyNotNull(messageSource, "messageSource");
|
||||||
{
|
|
||||||
throw new PatchException("'messageSource' property has not been set");
|
|
||||||
}
|
|
||||||
|
|
||||||
// get useful values
|
// get useful values
|
||||||
setUp();
|
setUp();
|
||||||
|
@@ -116,12 +116,16 @@ public abstract class AbstractAuthenticationComponent implements AuthenticationC
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Explicitly set the current authentication.
|
* @inheritDoc
|
||||||
*
|
|
||||||
* @param authentication
|
|
||||||
* Authentication
|
|
||||||
*/
|
*/
|
||||||
public Authentication setCurrentAuthentication(Authentication authentication)
|
public Authentication setCurrentAuthentication(Authentication authentication)
|
||||||
|
{
|
||||||
|
if (authentication == null)
|
||||||
|
{
|
||||||
|
clearCurrentSecurityContext();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Context context = ContextHolder.getContext();
|
Context context = ContextHolder.getContext();
|
||||||
SecureContext sc = null;
|
SecureContext sc = null;
|
||||||
@@ -138,6 +142,7 @@ public abstract class AbstractAuthenticationComponent implements AuthenticationC
|
|||||||
sc.setAuthentication(authentication);
|
sc.setAuthentication(authentication);
|
||||||
return authentication;
|
return authentication;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current authentication context
|
* Get the current authentication context
|
||||||
|
@@ -52,9 +52,13 @@ public interface AuthenticationComponent
|
|||||||
public void clearCurrentSecurityContext();
|
public void clearCurrentSecurityContext();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Explicitly set the current suthentication.
|
* Explicitly set the current suthentication. If the authentication is <tt>null</tt> the
|
||||||
|
* the current authentication is {@link #clearCurrentSecurityContext() cleared}.
|
||||||
|
*
|
||||||
|
* @param authentication the current authentication (may be <tt>null</tt>).
|
||||||
|
*
|
||||||
|
* @return Returns the modified authentication instance or <tt>null</tt> if it was cleared.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public Authentication setCurrentAuthentication(Authentication authentication);
|
public Authentication setCurrentAuthentication(Authentication authentication);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -44,11 +44,15 @@ public interface ResultSet extends Iterable<ResultSetRow> // Specfic iterator ov
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the id of the node at the given index
|
* Get the id of the node at the given index
|
||||||
|
*
|
||||||
|
* @param n zero-based index
|
||||||
*/
|
*/
|
||||||
NodeRef getNodeRef(int n);
|
NodeRef getNodeRef(int n);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the score for the node at the given position
|
* Get the score for the node at the given position
|
||||||
|
*
|
||||||
|
* @param n zero-based index
|
||||||
*/
|
*/
|
||||||
float getScore(int n);
|
float getScore(int n);
|
||||||
|
|
||||||
@@ -61,6 +65,8 @@ public interface ResultSet extends Iterable<ResultSetRow> // Specfic iterator ov
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a row from the result set by row index, starting at 0.
|
* Get a row from the result set by row index, starting at 0.
|
||||||
|
*
|
||||||
|
* @param i zero-based index
|
||||||
*/
|
*/
|
||||||
ResultSetRow getRow(int i);
|
ResultSetRow getRow(int i);
|
||||||
|
|
||||||
@@ -76,6 +82,8 @@ public interface ResultSet extends Iterable<ResultSetRow> // Specfic iterator ov
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the child assoc ref for a particular row.
|
* Get the child assoc ref for a particular row.
|
||||||
|
*
|
||||||
|
* @param n zero-based index
|
||||||
*/
|
*/
|
||||||
ChildAssociationRef getChildAssocRef(int n);
|
ChildAssociationRef getChildAssocRef(int n);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user