Class VersionUtil


  • public class VersionUtil
    extends java.lang.Object
    Helper class containing helper methods for the versioning services.
    Author:
    Roy Wetherall
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String[] RESERVED_PROPERTY_NAMES
      Reserved property names
    • Constructor Summary

      Constructors 
      Constructor Description
      VersionUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void checkVersionPropertyNames​(java.util.Collection<java.lang.String> names)
      Checks that the names of the additional version properties are valid and that they do not clash with the reserved properties.
      static void convertFrozenToOriginalProps​(java.util.Map<org.alfresco.service.namespace.QName,​java.io.Serializable> props)  
      static org.alfresco.service.cmr.repository.NodeRef convertNodeRef​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
      Convert the incomming node ref (with the version store protocol specified) to the internal representation with the workspace protocol.
      static org.alfresco.service.cmr.repository.StoreRef convertStoreRef​(org.alfresco.service.cmr.repository.StoreRef storeRef)
      Create Version Store Ref
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • RESERVED_PROPERTY_NAMES

        public static final java.lang.String[] RESERVED_PROPERTY_NAMES
        Reserved property names
    • Constructor Detail

      • VersionUtil

        public VersionUtil()
    • Method Detail

      • checkVersionPropertyNames

        public static void checkVersionPropertyNames​(java.util.Collection<java.lang.String> names)
                                              throws ReservedVersionNameException
        Checks that the names of the additional version properties are valid and that they do not clash with the reserved properties.
        Parameters:
        names - the property names
        Throws:
        ReservedVersionNameException
      • convertStoreRef

        public static org.alfresco.service.cmr.repository.StoreRef convertStoreRef​(org.alfresco.service.cmr.repository.StoreRef storeRef)
        Create Version Store Ref
        Parameters:
        storeRef - ref
        Returns:
        store ref for version store
      • convertNodeRef

        public static org.alfresco.service.cmr.repository.NodeRef convertNodeRef​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        Convert the incomming node ref (with the version store protocol specified) to the internal representation with the workspace protocol.
        Parameters:
        nodeRef - the incomming verison protocol node reference
        Returns:
        the internal version node reference
      • convertFrozenToOriginalProps

        public static void convertFrozenToOriginalProps​(java.util.Map<org.alfresco.service.namespace.QName,​java.io.Serializable> props)
                                                 throws org.alfresco.service.cmr.repository.InvalidNodeRefException
        Throws:
        org.alfresco.service.cmr.repository.InvalidNodeRefException