Class SecretSharedPropertyCollector


  • public class SecretSharedPropertyCollector
    extends java.lang.Object
    Provides property values for Alfresco Communication using "secret" method: - "alfresco.secureComms" is the commsMethod (none, https or secret) - "alfresco.secureComms.secret" is the word used as shared secret for "secret" method - "alfresco.secureComms.secret.header" is the request header name used for "secret" method
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Properties completeCoreProperties​(java.util.Properties properties)
      Add secret shared properties to original core properties read from "solrcore.properties"
      static java.lang.String getSecret()
      Read "secret" word from Java environment variable "alfresco.secureComms.secret" It can be set from command line invocation using default "-D" parameter: solr start -a "-Dcreate.alfresco.defaults=alfresco -Dalfresco.secureComms.secret=secret"
      static java.lang.String getSecretHeader()
      Read secret request header name from Java environment variable "alfresco.secureComms.secret.header".
      static boolean isCommsSecretShared()
      Check if communications method is "secret"
      • Methods inherited from class java.lang.Object

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

      • SECRET_SHARED_METHOD_KEY

        public static final java.lang.String SECRET_SHARED_METHOD_KEY
        See Also:
        Constant Field Values
    • Constructor Detail

      • SecretSharedPropertyCollector

        public SecretSharedPropertyCollector()
    • Method Detail

      • isCommsSecretShared

        public static boolean isCommsSecretShared()
        Check if communications method is "secret"
        Returns:
        true when communications method is "secret"
      • getSecret

        public static java.lang.String getSecret()
        Read "secret" word from Java environment variable "alfresco.secureComms.secret" It can be set from command line invocation using default "-D" parameter: solr start -a "-Dcreate.alfresco.defaults=alfresco -Dalfresco.secureComms.secret=secret"
        Returns:
        value for the "secret" word
      • getSecretHeader

        public static java.lang.String getSecretHeader()
        Read secret request header name from Java environment variable "alfresco.secureComms.secret.header". If it's not specified, used default value "X-Alfresco-Search-Secret"
        Returns:
        value for the secret request header
      • completeCoreProperties

        public static java.util.Properties completeCoreProperties​(java.util.Properties properties)
        Add secret shared properties to original core properties read from "solrcore.properties"
        Parameters:
        properties - Read properties from "solrcore.properties"
        Returns:
        when "secret" communication method is configured additional properties are set in original parameter