Merged V3.3-BUG-FIX to HEAD

21536: Fix for ALF-4068 - IE6 XSS issue
   21538: Added missing I18N label for when no wiki page defined in dashlet POST component
   21562: Merged BRANCHES/DEV/BELARUS/V3.3-BUG-FIX-2010_06_14 to BRANCHES/DEV/V3.3-BUG-FIX:
      20742: ALF-3572: Treat PasswordText as default for CMIS Web Service authentication
   21575: Merged BRANCHES/DEV/BELARUS/V3.3-BUG-FIX-2010_06_24 to BRANCHES/DEV/V3.3-BUG-FIX:
      21098: Bug is related to unsupported CMISResultSetMetaDataImpl.getLimitBy() method. But LimitBy parameter is required for a lot of search logic parts including permissions and constraints checks. To support LimitBy parameter the following solution was implemented:
   21578: Dictionary DAO: wrap initDictionary in writeLock
      - investigating intermittent failure of RepoAdminServiceImplTest.testSimpleDynamicModelViaNodeService (eg. b29/b59 of V3.3-BUG-FIX)
   21593: Fix ALF-1703: properties of type 'propertyXML' are returned as 'propertyString'
   21594: Fix ALF-4202: Cannot issue query with join via Web Services binding
      - wasn't issuing query with CMISQueryMode.CMS_WITH_ALFRESCO_EXTENSIONS query mode
   21611: Fix ALF-2649: CMIS query join return partial entry result
   21627: Merged V3.3 to V3.3-BUG-FIX
      21532: Fix for ALF-3042: Missing Null check for the propertyDefinition.
         - fixed all unprotected uses within indexing and query
      21534: Fix for ALF-2151: Range queries don't work.
         - docs updated 
         - added unit test to check for failure of d:content ranges as expected
      21558: Fix for ALF-4183 - Publishing a draft blog post does not turn on permission inheritence
      21609: Fix NFS problems with gEdit and OpenOffice when editing documents in the root of the filesystem. ALF-3955.
         Also fixed an unreported issue where an InvalidNodeRefException is thrown by the file cache timer after several edit/save operations on a file.
      21626: Merged PATCHES/V3.2.1 to V3.3
         21606: ALF-4044: Introduced new policy.content.update.ignoreEmpty setting, that when true causes the repository to behave as it did before the fix to ALF-254. I.e. writing empty content will not trigger onContentPropertyUpdate policies or inbound content rules. This enables better compatibility with mac clients using CIFS or WebDAV; they actually create and close a file before appending its data.
         21607: (RECORD ONLY) Incremented version label


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21628 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2010-08-05 09:08:56 +00:00
parent 5f61bd9c9e
commit 9421100da5
8 changed files with 49 additions and 33 deletions

View File

@@ -201,8 +201,8 @@
[#macro row row renditionfilter="cmis:none" includeallowableactions=false includerelationships="none"]
[@entry]
[#-- TODO: calculate multiNodeResultSet from result set --]
[#if row.nodes?? && row.nodes?size == 1][#assign node = row.nodes?first/][/#if]
[#if node??]
[#if row.node??]
[#assign node = row.node/]
<author><name>${node.properties.creator!""}</name></author>
[@contentstream node/]
<id>urn:uuid:${node.id}</id>

View File

@@ -248,7 +248,16 @@ function unpackProperties(node, typeDef, props, exclude, validator, vals)
// extract value
var val = null;
var prop = (props == null) ? null : props.find(propName);
if (prop != null && !prop.isNull())
if (prop != null)
{
if (prop.type !== propDef.dataType.label)
{
status.code = 500;
status.message = "Property " + propName + " has a data type " + prop.type + " which is different to its property definition type " + propDef.dataType.label;
status.redirect = true;
return null;
}
if (!prop.isNull())
{
if (prop.isMultiValued())
{
@@ -266,6 +275,7 @@ function unpackProperties(node, typeDef, props, exclude, validator, vals)
val = prop.nativeValue;
}
}
}
// NOTE: special case name: entry.title overrides cmis:name
if (propName === PROP_NAME)

View File

@@ -68,18 +68,14 @@ script:
model.resultset = paged.result;
model.cursor = paged.cursor;
// check includeFlags are valid for query
var multiNodeResultSet = false; // todo: calculate from result set (for now, don't support joins)
if (multiNodeResultSet && (model.includeAllowableActions))
{
status.setCode(status.STATUS_BAD_REQUEST, "Can't includeAllowableActions for multi-selector column result sets");
break script;
}
// TODO: check includeFlags are valid for query (with multiple types referenced in selectors)
// construct query uri
model.queryUri = "/cmis/query";
model.queryArgs = cmis.ARG_QUERY_STATEMENT + "=" + model.statement;
if (model.includeAllowableActions) model.queryArgs += "&" + cmis.ARG_INCLUDE_ALLOWABLE_ACTIONS + "=true";
if (model.includeAllowableActions) model.queryArgs += "&" + cmis.ARG_INCLUDE_ALLOWABLE_ACTIONS + "=" + model.includeAllowableActions;
if (model.includeRelationships != "none") model.queryArgs += "&" + cmis.ARG_INCLUDE_RELATIONSHIPS + "=" + model.includeRelationships;
if (model.renditionFilter != "cmis:none") model.queryArgs += "&" + cmis.ARG_RENDITION_FILTER + "=" + model.renditionFilter;
model.queryArgs += "&" + cmis.ARG_SKIP_COUNT + "=" + page.number;
model.queryArgs += "&" + cmis.ARG_MAX_ITEMS + "=" + page.size;

View File

@@ -43,11 +43,5 @@ script:
model.resultset = paged.result;
model.cursor = paged.cursor;
// check includeFlags are valid for query
var multiNodeResultSet = false; // TODO: calculate from result set (for now, don't support joins)
if (!multiNodeResultSet && (model.includeAllowableActions))
{
status.setCode(status.STATUS_BAD_REQUEST, "Can't includeAllowableActions for multi-selector column result sets");
break script;
}
// TODO: check includeFlags are valid for query (with multiple types referenced in selectors)
}

View File

@@ -14,7 +14,7 @@ function setOrUpdateReleasedAndUpdatedDates(node)
// (re-)enable permission inheritance which got disable for draft posts
// only set if was previously draft - as only the owner/admin can do this
if (!node.inheritsPermissions)
if (!node.inheritsPermissions())
{
node.setInheritsPermissions(true);
}

View File

@@ -190,6 +190,20 @@ public class CMISTemplateResultSet implements Serializable
return nodes.size() == 0 ? null : nodes.values();
}
/**
* @return node (if there is only a single node associated with the row), otherwise null
*/
public TemplateNode getNode()
{
try
{
NodeRef nodeRef = row.getNodeRef();
return new TemplateNode(nodeRef, serviceRegistry, imageResolver);
}
catch(UnsupportedOperationException e) {}
return null;
}
/**
* Builds a map of Template Nodes for the nodes associated with this row
*

View File

@@ -39,6 +39,7 @@ import org.alfresco.cmis.CMISResultSetColumn;
import org.alfresco.cmis.CMISResultSetRow;
import org.alfresco.cmis.CMISServiceException;
import org.alfresco.cmis.PropertyFilter;
import org.alfresco.cmis.CMISQueryOptions.CMISQueryMode;
import org.alfresco.repo.cmis.ws.utils.ExceptionUtil;
import org.alfresco.repo.security.permissions.AccessDeniedException;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -91,6 +92,7 @@ public class DMDiscoveryServicePort extends DMAbstractServicePort implements Dis
// execute query
// TODO: If the select clause includes properties from more than a single type reference, then the repository SHOULD throw an exception if includeRelationships or
// includeAllowableActions is specified as true.
options.setQueryMode(CMISQueryMode.CMS_WITH_ALFRESCO_EXTENSIONS);
CMISResultSet resultSet = cmisQueryService.query(options);
CMISResultSetColumn[] columns = resultSet.getMetaData().getColumns();