Merged V3.1 to HEAD

13625: Fix ETHREEOH-1644
   13634: Merged V2.2 to V3.1
      13632: Preparation for fix of ETHREEOH-1663: ML Document Editions Broken by Upgrade to 3.1
   13636: Fixed ETHREEOH-1663: ML Document Editions Broken by Upgrade to 3.1
   13638: Fixed ETHREEOH-1665: Copy/pasting a Specialised Folder changes the assoc qname
   13639: Fixed ETHREEOH-1663: ML Document Editions Broken by Upgrade to 3.1
   13640: Fixed ETHREEOH-1672: Manage Multilingual Content JSP breaks when viewing all Related Content
   13641: Fixed ETHREEOH-1657: Manage Multilingual Content fails with NPE when document was previously versionable
   13774: Fix for ETHREEOH-1629
   13775: Fix for ETHREEOH-1645
   13784: SchemaBootstrap now auto-generates a mostly-canonical schema description on new DB and on upgrades
   13804: Added option to finish schema bootstrap, dump schema structure and exit
   13807: Further pretty formatting of schema dump
   ___________________________________________________________________
   Modified: svn:mergeinfo
      Merged /alfresco/BRANCHES/V2.2:r13632
      Merged /alfresco/BRANCHES/V3.1:r13625,13634,13636,13638-13641,13774-13775,13784,13804,13807


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13912 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-04-09 13:54:02 +00:00
parent e6567f6428
commit 0b57c06ad3
21 changed files with 476 additions and 153 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2008 Alfresco Software Limited.
* Copyright (C) 2005-2009 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -96,69 +96,61 @@ public class VersionImpl implements Version
{
return versionProperties.toString();
}
/**
* Helper method to get the created date from the version property data.
*
* @return the date the version was created (note: not the date of the original node)
*/
public Date getFrozenModifiedDate()
{
Date modifiedDate = (Date)this.versionProperties.get(Version2Model.PROP_FROZEN_MODIFIED);
if (modifiedDate == null)
{
// Assume deprecated V1 version store
modifiedDate = (Date)this.versionProperties.get(VersionBaseModel.PROP_CREATED_DATE);
}
return modifiedDate;
}
public String getFrozenModifier()
{
String modifier = (String)this.versionProperties.get(Version2Model.PROP_FROZEN_MODIFIER);
if (modifier == null)
{
// Assume deprecated V1 version store
modifier = (String)this.versionProperties.get(VersionBaseModel.PROP_CREATOR);
}
return modifier;
}
public Date getCreatedDate()
{
return (Date)this.versionProperties.get(VersionBaseModel.PROP_CREATED_DATE);
// note: internal version node created date can be retrieved via standard node service
return getFrozenModifiedDate();
}
/**
* Helper method to get the creator from the version property data.
*
* @return the creator of the version (note: not the creator of the original node)
*/
public String getCreator()
{
return (String)this.versionProperties.get(VersionBaseModel.PROP_CREATOR);
// note: internal version node creator can be retrieved via standard node service
return getFrozenModifier();
}
/**
* Helper method to get the version label from the version property data.
*
* @return the version label
*/
public String getVersionLabel()
{
return (String)this.versionProperties.get(VersionBaseModel.PROP_VERSION_LABEL);
}
/**
* Helper method to get the version type.
*
* @return the value of the version type as an enum value
*/
public VersionType getVersionType()
{
return (VersionType)this.versionProperties.get(VersionBaseModel.PROP_VERSION_TYPE);
}
/**
* Helper method to get the version description.
*
* @return the version description
*/
public String getDescription()
{
return (String)this.versionProperties.get(Version.PROP_DESCRIPTION);
}
/**
* @see org.alfresco.service.cmr.version.Version#getVersionProperties()
*/
public Map<String, Serializable> getVersionProperties()
{
return this.versionProperties;
}
/**
* @see org.alfresco.service.cmr.version.Version#getVersionProperty(java.lang.String)
*/
public Serializable getVersionProperty(String name)
{
Serializable result = null;
@@ -169,9 +161,6 @@ public class VersionImpl implements Version
return result;
}
/**
* @see org.alfresco.service.cmr.version.Version#getVersionedNodeRef()
*/
public NodeRef getVersionedNodeRef()
{
NodeRef versionedNodeRef = null;
@@ -193,10 +182,7 @@ public class VersionImpl implements Version
return versionedNodeRef;
}
/**
* @see org.alfresco.service.cmr.version.Version#getFrozenStateNodeRef()
*/
public NodeRef getFrozenStateNodeRef()
{
return this.nodeRef;