Merged DEV/SWIFT to HEAD

27168: Added generics for cannedQueryRegistry
   27169: Fixed formatting
   27170: SOLR queries
          - ALF-7072 RSOLR 013: Remote API to get ACLs and readers
            - Queries for ACL ChangeSets and ACLs
            - WebScripts for AclChangeSetsGet
          - ALF-7071 and ALF-7072: Fix naming conventions
   27171: Fixed MySQL create script (ALF-8336: RSOLR 013: DB upgrade scripts for ACL changes)
   27337: Initial draft of the publishing API
   27516: Get the basic WCM ML tests working, covering the simpler use cases
   27517: More on the WCM-QS multi lingual support, further on the aspect and the unit tests for it
   27518: Begin the WCM-QS webscript to return the translation details on a node
   27519: Push some WCM-QS ML search logic into SiteHelper, and add a unit test for it
   27542: - Initial skeleton of the channel API.
          - Initial draft of the publishing content model.
   27546: ALF-7481: RSOLR 018: Execute query against SOLR
          - pass authority filter in json body to avoid possible issue over-running the max URL length
   27559: Created a Web Site Generator tool which randomly generates WCM QS websites.
   27561: Created ChannelServiceImpl and implemented the ChannelType registry.
   27577: Start to pull across the WCM-QS ML custom action
   27579: More pulling across the WCM-QS ML custom action
   27580: More WCM-QS ML ui porting
   27588: ALF-8421: RSOLR 037: Encapsulate the CMIS Query Parser
   27589: Created a PublishingModel to hold Web Publishing constants.
   27610: ALF-7874 Add iWorks mimetype entries
   27624: Restructure index tracking
   27630: ALF-8182: SVC 03: Object Picker needs to use new NodeLocatorService to resolve startLocation parameter
          The picker now uses the NodeLocatorService to look up some start locations and most importantly allows
		  custom 'locators' to be used. All the current start location tokens are still supported
		  i.e. {companyhome}, {userhome}, {siteshome}, {doclib}, {self} and {parent}. A new one has been added called {ancestor},
		  this will allow an ancestor node to be located, the node can be selected by type or aspect, see example below.
          Some node locators can take parameters, a "startLocationParams" has therefore been added to allow these to be specified.

		  The example below shows how to configure a picker to start in the root folder of the site the node being edited is located within.

		  <field id="fdk:contentMultiple">
             <control>
                <control-param name="startLocation">{ancestor}</control-param>
                <control-param name="startLocationParams">type=st:site</control-param>
             </control>
          </field>
   27631: ALF-8182: SVC 03: Object Picker needs to use new NodeLocatorService to resolve startLocation parameter
          Centralised node locator classes to repo.nodelocator package
		  (moved out of repo.node package as that area is reserved for low level node processing)
		  and made all naming consistent i.e. nodelocator rather than nodelocation.
   27633: Fixed cmis:objectTypeId property definition (required = true, see CMIS 1.0 errata 1)
   27635: CMIS compliance fixes
   27638: - Initial operational publishing context with model bootstrapped.
          - First implementation of ChannelService.getChannels and ChannelService.createChannel. Test cases to follow imminently...

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28301 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2011-06-09 12:08:12 +00:00
parent efbd951a10
commit ae765f91d9
91 changed files with 2720 additions and 28122 deletions

View File

@@ -43,10 +43,9 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
/**
* Registry of property accessors which map the retrieval and setting of properties
* within Alfresco.
* Registry of property accessors which map the retrieval and setting of
* properties within Alfresco.
*
* @author davidc
*/
@@ -60,12 +59,13 @@ public class RuntimePropertyAccessorMapping implements PropertyAccessorMapping,
private CMISConnector cmisConnector;
private CMISMapping cmisMapping;
private CMISDictionaryService cmisDictionaryService;
private Map<String, AbstractProperty> propertyAccessors = new HashMap<String, AbstractProperty>();
private Map<BaseTypeId, Map<Action, CMISActionEvaluator<? extends Object>>> actionEvaluators = new HashMap<BaseTypeId, Map<Action, CMISActionEvaluator<? extends Object>>>();
/**
* @param service registry
* @param service
* registry
*/
public void setServiceRegistry(ServiceRegistry serviceRegistry)
{
@@ -73,7 +73,8 @@ public class RuntimePropertyAccessorMapping implements PropertyAccessorMapping,
}
/**
* @param cmis connector
* @param cmis
* connector
*/
public void setCmisConnector(CMISConnector cmisConnector)
{
@@ -81,7 +82,8 @@ public class RuntimePropertyAccessorMapping implements PropertyAccessorMapping,
}
/**
* @param cmis mapping
* @param cmis
* mapping
*/
public void setCmisMapping(CMISMapping cmisMapping)
{
@@ -89,7 +91,8 @@ public class RuntimePropertyAccessorMapping implements PropertyAccessorMapping,
}
/**
* @param cmis mapping
* @param cmis
* mapping
*/
public void setCmisDictionaryService(CMISDictionaryService cmisDictionaryService)
{
@@ -113,9 +116,12 @@ public class RuntimePropertyAccessorMapping implements PropertyAccessorMapping,
registerPropertyAccessor(new ObjectTypeIdProperty(serviceRegistry, cmisDictionaryService));
registerPropertyAccessor(new BaseTypeIdProperty(serviceRegistry, cmisDictionaryService));
registerPropertyAccessor(new DirectProperty(serviceRegistry, PropertyIds.CREATED_BY, ContentModel.PROP_CREATOR));
registerPropertyAccessor(new DirectProperty(serviceRegistry, PropertyIds.CREATION_DATE, ContentModel.PROP_CREATED));
registerPropertyAccessor(new DirectProperty(serviceRegistry, PropertyIds.LAST_MODIFIED_BY, ContentModel.PROP_MODIFIER));
registerPropertyAccessor(new DirectProperty(serviceRegistry, PropertyIds.LAST_MODIFICATION_DATE, ContentModel.PROP_MODIFIED));
registerPropertyAccessor(new DirectProperty(serviceRegistry, PropertyIds.CREATION_DATE,
ContentModel.PROP_CREATED));
registerPropertyAccessor(new DirectProperty(serviceRegistry, PropertyIds.LAST_MODIFIED_BY,
ContentModel.PROP_MODIFIER));
registerPropertyAccessor(new DirectProperty(serviceRegistry, PropertyIds.LAST_MODIFICATION_DATE,
ContentModel.PROP_MODIFIED));
registerPropertyAccessor(new FixedValueProperty(serviceRegistry, PropertyIds.CHANGE_TOKEN, null));
registerPropertyAccessor(new DirectProperty(serviceRegistry, PropertyIds.NAME, ContentModel.PROP_NAME)
{
@@ -139,7 +145,8 @@ public class RuntimePropertyAccessorMapping implements PropertyAccessorMapping,
registerPropertyAccessor(new ContentStreamLengthProperty(serviceRegistry));
registerPropertyAccessor(new ContentStreamMimetypeProperty(serviceRegistry));
registerPropertyAccessor(new ContentStreamIdProperty(serviceRegistry));
registerPropertyAccessor(new DirectProperty(serviceRegistry, PropertyIds.CONTENT_STREAM_FILE_NAME, ContentModel.PROP_NAME));
registerPropertyAccessor(new DirectProperty(serviceRegistry, PropertyIds.CONTENT_STREAM_FILE_NAME,
ContentModel.PROP_NAME));
registerPropertyAccessor(new ParentProperty(serviceRegistry));
registerPropertyAccessor(new PathProperty(serviceRegistry, cmisConnector));
registerPropertyAccessor(new AllowedChildObjectTypeIdsProperty(serviceRegistry, cmisMapping));
@@ -175,11 +182,8 @@ public class RuntimePropertyAccessorMapping implements PropertyAccessorMapping,
PermissionService.WRITE_PROPERTIES, PermissionService.WRITE_CONTENT), false));
registerEvaluator(BaseTypeId.CMIS_DOCUMENT, new CurrentVersionEvaluator(serviceRegistry,
new CanCheckOutActionEvaluator(serviceRegistry), false));
registerEvaluator(BaseTypeId.CMIS_DOCUMENT, new CurrentVersionEvaluator(serviceRegistry,
new PermissionActionEvaluator(serviceRegistry, Action.CAN_CANCEL_CHECK_OUT,
PermissionService.CANCEL_CHECK_OUT), false));
registerEvaluator(BaseTypeId.CMIS_DOCUMENT, new PermissionActionEvaluator(serviceRegistry, Action.CAN_CHECK_IN,
PermissionService.CHECK_IN));
registerEvaluator(BaseTypeId.CMIS_DOCUMENT, new CanCancelCheckOutActionEvaluator(serviceRegistry));
registerEvaluator(BaseTypeId.CMIS_DOCUMENT, new CanCheckInActionEvaluator(serviceRegistry));
registerEvaluator(BaseTypeId.CMIS_DOCUMENT, new CurrentVersionEvaluator(serviceRegistry,
new PermissionActionEvaluator(serviceRegistry, Action.CAN_SET_CONTENT_STREAM,
PermissionService.WRITE_CONTENT), false));
@@ -290,7 +294,8 @@ public class RuntimePropertyAccessorMapping implements PropertyAccessorMapping,
/**
* Gets a property accessor
*
* @param propertyId property id
* @param propertyId
* property id
* @return property accessor
*/
public CMISPropertyAccessor getPropertyAccessor(String propertyId)
@@ -301,15 +306,17 @@ public class RuntimePropertyAccessorMapping implements PropertyAccessorMapping,
/**
* Create a direct node property accessor
*
* @param propertyId property id
* @param propertyName node property name
* @return property accessor
* @param propertyId
* property id
* @param propertyName
* node property name
* @return property accessor
*/
public CMISPropertyAccessor createDirectPropertyAccessor(String propertyId, QName propertyName)
{
return new DirectProperty(serviceRegistry, propertyId, propertyName);
}
/**
* Register pre-defined Property Accessor
*