mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged DEV/CMIS_10 to HEAD
18731: SAIL-169: CMIS REST versioning compliance - Rendering of "via" link for working copy and "current-version" and "working-copy" links for documents - Added ability to dereference object IDs in cmisproperty() template function - Fixed broken CMIS index page git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18896 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -28,8 +28,8 @@ public class CMISObjectNotFoundException extends CMISServiceException
|
||||
{
|
||||
private static final long serialVersionUID = 1726826685938651586L;
|
||||
|
||||
public CMISObjectNotFoundException(String objectId)
|
||||
public CMISObjectNotFoundException(String message)
|
||||
{
|
||||
super("Unable to find Object " + objectId, "objectNotFound", 404);
|
||||
super(message, "objectNotFound", 404);
|
||||
}
|
||||
}
|
||||
|
@@ -977,12 +977,12 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
|
||||
NodeRef nodeRef = new NodeRef(nodeRefString);
|
||||
if (!nodeService.exists(nodeRef))
|
||||
{
|
||||
throw new CMISObjectNotFoundException(objectId);
|
||||
throw new CMISObjectNotFoundException("Unable to find object " + objectId);
|
||||
}
|
||||
VersionHistory versionHistory = versionService.getVersionHistory(nodeRef);
|
||||
if (versionHistory == null)
|
||||
{
|
||||
throw new CMISObjectNotFoundException(objectId);
|
||||
throw new CMISObjectNotFoundException("Unable to find object " + objectId);
|
||||
}
|
||||
try
|
||||
{
|
||||
@@ -994,7 +994,7 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
|
||||
}
|
||||
catch (VersionDoesNotExistException e)
|
||||
{
|
||||
throw new CMISObjectNotFoundException(objectId);
|
||||
throw new CMISObjectNotFoundException("Unable to find object " + objectId);
|
||||
}
|
||||
}
|
||||
else if (requiredType.isAssignableFrom(NodeRef.class))
|
||||
@@ -1011,7 +1011,7 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
|
||||
NodeRef nodeRef = new NodeRef(objectId);
|
||||
if (!nodeService.exists(nodeRef))
|
||||
{
|
||||
throw new CMISObjectNotFoundException(objectId);
|
||||
throw new CMISObjectNotFoundException("Unable to find object " + objectId);
|
||||
}
|
||||
if (isVersionable)
|
||||
{
|
||||
@@ -1192,7 +1192,7 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
|
||||
VersionHistory versionHistory = versionService.getVersionHistory(versionSeries);
|
||||
if (versionHistory == null)
|
||||
{
|
||||
throw new CMISObjectNotFoundException(objectId);
|
||||
throw new CMISObjectNotFoundException(objectId + " has no major version");
|
||||
}
|
||||
Version current = versionService.getCurrentVersion(versionSeries);
|
||||
while (current != null && current.getVersionType() != VersionType.MAJOR)
|
||||
@@ -1201,7 +1201,7 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware,
|
||||
}
|
||||
if (current == null)
|
||||
{
|
||||
throw new CMISObjectNotFoundException(objectId);
|
||||
throw new CMISObjectNotFoundException(objectId + " has no major version");
|
||||
}
|
||||
return current.getFrozenStateNodeRef();
|
||||
}
|
||||
|
@@ -174,6 +174,14 @@ public class TemplateNode extends BasePermissionsNode implements NamespacePrefix
|
||||
return this.services.getNodeService().exists(this.nodeRef);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return <code>true</code> if this node is a working copy
|
||||
*/
|
||||
public boolean getIsWorkingCopy()
|
||||
{
|
||||
return this.services.getNodeService().hasAspect(this.nodeRef, ContentModel.ASPECT_WORKING_COPY);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the type.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user