Class HandlerOfResources


  • public class HandlerOfResources
    extends Object
    Methods taken from AlfrescoCoreAdminHandler that deal with I/O resources
    • Field Detail

      • DISALLOWED_SHARED_UPDATES

        protected static final List<String> DISALLOWED_SHARED_UPDATES
    • Constructor Detail

      • HandlerOfResources

        public HandlerOfResources()
    • Method Detail

      • openResource

        public static InputStream openResource​(String solrHome,
                                               String resource)
        Opens an InputStream
        Parameters:
        solrHome -
        resource -
        Returns:
        InputStream
      • updateSharedProperties

        public static void updateSharedProperties​(org.apache.solr.common.params.SolrParams params,
                                                  File config,
                                                  boolean disallow)
                                           throws IOException
        Updates a properties file using the SolrParams
        Parameters:
        params -
        config -
        Throws:
        IOException
      • updatePropertiesFile

        public static void updatePropertiesFile​(org.apache.solr.common.params.SolrParams params,
                                                File config,
                                                List<String> disallowed)
        Updates a properties file using the SolrParams
        Parameters:
        params -
        config -
        Throws:
        IOException
      • allowedProperties

        public static boolean allowedProperties​(Properties toCheck,
                                                List<String> disallowed)
        Checks a list of properties to see if they are allowed It actually checks if the property starts with any value in the List disallowed.
        Parameters:
        toCheck -
        disallowed -
        Returns:
      • extractCustomProperties

        public static Properties extractCustomProperties​(org.apache.solr.common.params.SolrParams params)
        Extracts Custom Properties from SolrParams
        Parameters:
        params -
        Returns:
        Properties
      • getSafeBoolean

        public static boolean getSafeBoolean​(org.apache.solr.common.params.SolrParams params,
                                             String paramName)
        Safely gets a boolean from SolrParams
        Parameters:
        params -
        paramName -
        Returns:
        boolean
      • getSafeLong

        public static Long getSafeLong​(org.apache.solr.common.params.SolrParams params,
                                       String paramName)
        Safely gets a Long from SolrParams
        Parameters:
        params -
        paramName -
        Returns:
        Long