Class PropertiesUtils


  • public class PropertiesUtils
    extends java.lang.Object
    Utility class dedicatd to manage Alfresco properties
    Author:
    Piergiorgio Lucidi
    • Constructor Summary

      Constructors 
      Constructor Description
      PropertiesUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<org.alfresco.webservice.types.NamedValue> getContentProperties​(org.alfresco.webservice.types.NamedValue[] properties)  
      static java.util.Date getDatePropertyValue​(org.alfresco.webservice.types.NamedValue[] properties, java.lang.String qname)  
      static java.lang.String getMimeType​(java.util.List<org.alfresco.webservice.types.NamedValue> contentProperties)
      This method returns the mimetype of the default content defined for the node.
      static java.lang.String getNodeReference​(org.alfresco.webservice.types.NamedValue[] properties)
      Build the Alfresco node identifier
      static java.lang.String[] getPropertyValues​(org.alfresco.webservice.types.NamedValue[] properties, java.lang.String qname)  
      static java.lang.String getVersionLabel​(org.alfresco.webservice.types.NamedValue[] properties)  
      static void ingestProperties​(org.apache.manifoldcf.agents.interfaces.RepositoryDocument rd, org.alfresco.webservice.types.NamedValue[] properties, java.util.List<org.alfresco.webservice.types.NamedValue> contentProperties)  
      • Methods inherited from class java.lang.Object

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

      • PropertiesUtils

        public PropertiesUtils()
    • Method Detail

      • getPropertyValues

        public static java.lang.String[] getPropertyValues​(org.alfresco.webservice.types.NamedValue[] properties,
                                                           java.lang.String qname)
      • ingestProperties

        public static void ingestProperties​(org.apache.manifoldcf.agents.interfaces.RepositoryDocument rd,
                                            org.alfresco.webservice.types.NamedValue[] properties,
                                            java.util.List<org.alfresco.webservice.types.NamedValue> contentProperties)
                                     throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
                                            java.text.ParseException
        Throws:
        org.apache.manifoldcf.core.interfaces.ManifoldCFException
        java.text.ParseException
      • getContentProperties

        public static java.util.List<org.alfresco.webservice.types.NamedValue> getContentProperties​(org.alfresco.webservice.types.NamedValue[] properties)
        Parameters:
        properties -
        Returns:
        a list of binary properties for the current node
      • getNodeReference

        public static java.lang.String getNodeReference​(org.alfresco.webservice.types.NamedValue[] properties)
        Build the Alfresco node identifier
        Parameters:
        properties -
        Returns:
        the node reference for the current document
      • getVersionLabel

        public static java.lang.String getVersionLabel​(org.alfresco.webservice.types.NamedValue[] properties)
        Parameters:
        properties -
        Returns:
        version label of the latest version of the node
      • getMimeType

        public static java.lang.String getMimeType​(java.util.List<org.alfresco.webservice.types.NamedValue> contentProperties)
        This method returns the mimetype of the default content defined for the node. Notice that more than one binary can be defined in a custom model of Alfresco and also that it could exist some contents that don't have a binary
        Parameters:
        contentProperties -
        Returns:
        mimetype of the default content property
      • getDatePropertyValue

        public static java.util.Date getDatePropertyValue​(org.alfresco.webservice.types.NamedValue[] properties,
                                                          java.lang.String qname)
                                                   throws java.text.ParseException
        Parameters:
        properties -
        Returns:
        version label of the latest version of the node
        Throws:
        java.text.ParseException