mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V4.1-BUG-FIX to HEAD
43196: Merged DEV to V4.1-BUG-FIX 39849: ALF-13301: The value of bpm_reassignable is not converted by JBPM to boolean when we use timer. Flush session before closing JbpmContext. 43199: Temp fix for: ALF-16558 SOLR tracking does not do incremental updates but one single chunk 43201: Fixed ALF-11457 "Send email to user rule can't be created if the User name starts with number" 43210: Fixed ALF-16317 "Labels not displaying full text when creating a rule on a folder with IE8" 43219: Merged DEV to V4.1-BUG-FIX 43213: ALF-13277: CLONE - IMAP: User home space is opened when browsing through Content Folder URL org.alfresco.repo.model.filefolder.FileFolderServiceImpl.getNamePath(NodeRef, NodeRef) method was updated with fix that return an empty list if the root node path is requested. 43226: ALF-15755: Merged DEV to V4.1-BUG-FIX (modified) 43088: If the WebDAV path of a document exceeds 255 characters, documents opened in MSOffice cannot be saved back 1. parseRequestHeaders() method was overrode in AbstractMoveOrCopyMethod class. 2. unlockNodeIfLocked() method was added In MoveMethod. 43232: Fix for ALF-16254 - 'Leave Site' behaviour for group based site membership 43236: Fix for ALF-15236 - JSF - Edit online of html files does not keep the formatting 43239: Removed tabs 43251: ALF-16419: Content uploaded through webdav in win7 adds a write lock, resulting in rules not triggering - Use LockUtils.isLockedAndReadOnly in ActionExecuterAbstractBase 43310: Fix for ALF-16469 *** Solr Indexing - Index for 5M docs, 2M txns, 2TB content, 50k users, 10k groups grows up to 300GB with FTS disabled. Is it expected? - first pass at reducing stored fields in the SOLR index - PATH and secondary parent info 43314: ALF-16575 - Email server does not accept email where Subject ends with a period 43357: ALF-16573: LDAP synchronization fails when a child group has more than one parent - Because AbstractNodeDAOImpl was wrongly recognizing a deadlock as a DuplicateChildNodeNameException - Now it correctly recognizes the PostgreSQL "40P01" SQLSTATE 43359: Merged DEV to V4.1-BUG-FIX 43338: ALF-16515: Error 403 when authenticating against an Active Directory Transaction type for login Web script has been modified to 'readwrite' to introduce a possibility creating missing people in the context of the regular '/api/login' 'LoginBean'. This is necessary for some authentication mechanisms. For example, for Kerberos authentication without SSO git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@43362 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -112,7 +112,7 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
|
||||
|
||||
private boolean isCurrentNode()
|
||||
{
|
||||
return objecVariant != CMISObjectVariant.VERSION;
|
||||
return objecVariant != CMISObjectVariant.VERSION;
|
||||
}
|
||||
|
||||
protected void analyseVersionNode(NodeRef nodeRef)
|
||||
@@ -143,18 +143,18 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
|
||||
|
||||
protected void analyseCurrentVersion(NodeRef nodeRef)
|
||||
{
|
||||
if(connector.getVersionService().isVersioned(nodeRef))
|
||||
{
|
||||
versionLabel = (String) connector.getNodeService().getProperty(nodeRef, ContentModel.PROP_VERSION_LABEL);
|
||||
objectId = nodeRef.toString() + CMISConnector.ID_SEPERATOR + versionLabel;
|
||||
currentObjectId = nodeRef.toString() + CMISConnector.ID_SEPERATOR + versionLabel;
|
||||
currentNodeId = nodeRef.toString();
|
||||
objecVariant = CMISObjectVariant.CURRENT_VERSION;
|
||||
}
|
||||
else
|
||||
{
|
||||
setUnversioned(nodeRef);
|
||||
}
|
||||
if(connector.getVersionService().isVersioned(nodeRef))
|
||||
{
|
||||
versionLabel = (String) connector.getNodeService().getProperty(nodeRef, ContentModel.PROP_VERSION_LABEL);
|
||||
objectId = nodeRef.toString() + CMISConnector.ID_SEPERATOR + versionLabel;
|
||||
currentObjectId = nodeRef.toString() + CMISConnector.ID_SEPERATOR + versionLabel;
|
||||
currentNodeId = nodeRef.toString();
|
||||
objecVariant = CMISObjectVariant.CURRENT_VERSION;
|
||||
}
|
||||
else
|
||||
{
|
||||
setUnversioned(nodeRef);
|
||||
}
|
||||
}
|
||||
|
||||
protected void setUnversioned(NodeRef nodeRef)
|
||||
@@ -162,7 +162,7 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
|
||||
objecVariant = CMISObjectVariant.CURRENT_VERSION;
|
||||
objectId = nodeRef.toString() + CMISConnector.ID_SEPERATOR + CMISConnector.UNVERSIONED_VERSION_LABEL;
|
||||
versionLabel = CMISConnector.UNVERSIONED_VERSION_LABEL;
|
||||
currentObjectId = objectId;
|
||||
currentObjectId = objectId;
|
||||
}
|
||||
|
||||
protected void analyseObjectId()
|
||||
@@ -191,7 +191,7 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
|
||||
|
||||
if (NodeRef.isNodeRef(currentNodeId))
|
||||
{
|
||||
// nodeRef is a "live" node, the version label identifies the specific version of the node
|
||||
// nodeRef is a "live" node, the version label identifies the specific version of the node
|
||||
nodeRef = new NodeRef(currentNodeId);
|
||||
|
||||
// check for existence
|
||||
@@ -215,14 +215,14 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
|
||||
|
||||
if (isFolder())
|
||||
{
|
||||
// folders can't be versioned, so no need to check
|
||||
objecVariant = CMISObjectVariant.FOLDER;
|
||||
return;
|
||||
// folders can't be versioned, so no need to check
|
||||
objecVariant = CMISObjectVariant.FOLDER;
|
||||
return;
|
||||
}
|
||||
|
||||
if (versionLabel == null)
|
||||
{
|
||||
if (isDocument())
|
||||
if (isDocument())
|
||||
{
|
||||
objecVariant = CMISObjectVariant.CURRENT_VERSION;
|
||||
|
||||
@@ -266,9 +266,9 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
|
||||
return;
|
||||
}
|
||||
|
||||
if(!connector.getVersionService().isVersioned(nodeRef))
|
||||
{
|
||||
// the node isn't versioned
|
||||
if(!connector.getVersionService().isVersioned(nodeRef))
|
||||
{
|
||||
// the node isn't versioned
|
||||
if (versionLabel.equals(CMISConnector.UNVERSIONED_VERSION_LABEL))
|
||||
{
|
||||
objecVariant = CMISObjectVariant.CURRENT_VERSION;
|
||||
@@ -277,52 +277,52 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
|
||||
{
|
||||
objecVariant = CMISObjectVariant.NOT_EXISTING;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// the node is versioned, determine whether the versionLabel refers to the head version or a
|
||||
// specific non-head version
|
||||
String headVersionLabel = (String)connector.getNodeService().getProperty(nodeRef, ContentModel.PROP_VERSION_LABEL);
|
||||
currentObjectId = currentNodeId + CMISConnector.ID_SEPERATOR + headVersionLabel;
|
||||
|
||||
if (versionLabel.equals(headVersionLabel))
|
||||
{
|
||||
// the version label refers to the current head version
|
||||
objecVariant = CMISObjectVariant.CURRENT_VERSION;
|
||||
}
|
||||
else
|
||||
{
|
||||
// the version label refers to a specific non-head version, find the nodeRef
|
||||
// of the version node from the version history
|
||||
versionHistory = connector.getVersionService().getVersionHistory(nodeRef);
|
||||
if (versionHistory == null)
|
||||
{
|
||||
// unexpected null versionHistory, assume not versioned
|
||||
if (versionLabel.equals(CMISConnector.UNVERSIONED_VERSION_LABEL))
|
||||
{
|
||||
objecVariant = CMISObjectVariant.CURRENT_VERSION;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
objecVariant = CMISObjectVariant.NOT_EXISTING;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
version = versionHistory.getVersion(versionLabel);
|
||||
nodeRef = version.getFrozenStateNodeRef();
|
||||
objecVariant = CMISObjectVariant.VERSION;
|
||||
}
|
||||
catch (VersionDoesNotExistException e)
|
||||
{
|
||||
objecVariant = CMISObjectVariant.NOT_EXISTING;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// the node is versioned, determine whether the versionLabel refers to the head version or a
|
||||
// specific non-head version
|
||||
String headVersionLabel = (String)connector.getNodeService().getProperty(nodeRef, ContentModel.PROP_VERSION_LABEL);
|
||||
currentObjectId = currentNodeId + CMISConnector.ID_SEPERATOR + headVersionLabel;
|
||||
|
||||
if (versionLabel.equals(headVersionLabel))
|
||||
{
|
||||
// the version label refers to the current head version
|
||||
objecVariant = CMISObjectVariant.CURRENT_VERSION;
|
||||
}
|
||||
else
|
||||
{
|
||||
// the version label refers to a specific non-head version, find the nodeRef
|
||||
// of the version node from the version history
|
||||
versionHistory = connector.getVersionService().getVersionHistory(nodeRef);
|
||||
if (versionHistory == null)
|
||||
{
|
||||
// unexpected null versionHistory, assume not versioned
|
||||
if (versionLabel.equals(CMISConnector.UNVERSIONED_VERSION_LABEL))
|
||||
{
|
||||
objecVariant = CMISObjectVariant.CURRENT_VERSION;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
objecVariant = CMISObjectVariant.NOT_EXISTING;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
version = versionHistory.getVersion(versionLabel);
|
||||
nodeRef = version.getFrozenStateNodeRef();
|
||||
objecVariant = CMISObjectVariant.VERSION;
|
||||
}
|
||||
catch (VersionDoesNotExistException e)
|
||||
{
|
||||
objecVariant = CMISObjectVariant.NOT_EXISTING;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// check if checked out
|
||||
hasPWC = connector.getCheckOutCheckInService().isCheckedOut(getCurrentNodeNodeRef());
|
||||
@@ -413,11 +413,11 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
|
||||
// check version
|
||||
if(connector.getVersionService().isAVersion(nodeRef))
|
||||
{
|
||||
analyseVersionNode(nodeRef);
|
||||
analyseVersionNode(nodeRef);
|
||||
}
|
||||
else
|
||||
{
|
||||
analyseCurrentVersion(nodeRef);
|
||||
analyseCurrentVersion(nodeRef);
|
||||
}
|
||||
|
||||
hasPWC = connector.getCheckOutCheckInService().isCheckedOut(nodeRef);
|
||||
@@ -525,37 +525,37 @@ public class CMISNodeInfoImpl implements CMISNodeInfo
|
||||
{
|
||||
if (isLatestMajorVersion == null)
|
||||
{
|
||||
isLatestMajorVersion = Boolean.FALSE;
|
||||
isLatestMajorVersion = Boolean.FALSE;
|
||||
if (!isPWC())
|
||||
{
|
||||
if(isCurrentNode())
|
||||
{
|
||||
isLatestMajorVersion = Boolean.TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
VersionHistory versionHistory = getVersionHistory();
|
||||
if (versionHistory == null)
|
||||
{
|
||||
isLatestMajorVersion = Boolean.TRUE;
|
||||
} else
|
||||
{
|
||||
Version currentVersion = versionHistory.getHeadVersion();
|
||||
while (currentVersion != null)
|
||||
{
|
||||
if (currentVersion.getVersionType() == VersionType.MAJOR)
|
||||
{
|
||||
// ALF-11116: the current node (in the main store) and the frozen node (in the version store) are both represented as CMISNodeInfos
|
||||
// but are indistinguishable apart from their storeRef (their objectVariant can be the same).
|
||||
isLatestMajorVersion = (nodeRef.getStoreRef().getIdentifier().equals(Version2Model.STORE_ID) || nodeRef.getStoreRef().getIdentifier().equals(VersionModel.STORE_ID)) ?
|
||||
currentVersion.getFrozenStateNodeRef().equals(nodeRef) : currentVersion.getVersionedNodeRef().equals(nodeRef);
|
||||
break;
|
||||
}
|
||||
currentVersion = versionHistory.getPredecessor(currentVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isCurrentNode())
|
||||
{
|
||||
isLatestMajorVersion = Boolean.TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
VersionHistory versionHistory = getVersionHistory();
|
||||
if (versionHistory == null)
|
||||
{
|
||||
isLatestMajorVersion = Boolean.TRUE;
|
||||
} else
|
||||
{
|
||||
Version currentVersion = versionHistory.getHeadVersion();
|
||||
while (currentVersion != null)
|
||||
{
|
||||
if (currentVersion.getVersionType() == VersionType.MAJOR)
|
||||
{
|
||||
// ALF-11116: the current node (in the main store) and the frozen node (in the version store) are both represented as CMISNodeInfos
|
||||
// but are indistinguishable apart from their storeRef (their objectVariant can be the same).
|
||||
isLatestMajorVersion = (nodeRef.getStoreRef().getIdentifier().equals(Version2Model.STORE_ID) || nodeRef.getStoreRef().getIdentifier().equals(VersionModel.STORE_ID)) ?
|
||||
currentVersion.getFrozenStateNodeRef().equals(nodeRef) : currentVersion.getVersionedNodeRef().equals(nodeRef);
|
||||
break;
|
||||
}
|
||||
currentVersion = versionHistory.getPredecessor(currentVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return isLatestMajorVersion.booleanValue();
|
||||
|
Reference in New Issue
Block a user