Class SimpleAtomConfig

  • All Implemented Interfaces:
    AtomConfig

    public class SimpleAtomConfig
    extends Object
    implements AtomConfig
    Simple implementation of AtomConfig.
    • Field Detail

      • DEFAULT_MAX_NUMBER_OBJECT_TYPES

        public static final int DEFAULT_MAX_NUMBER_OBJECT_TYPES
        See Also:
        Constant Field Values
      • DEFAULT_MAX_OBJECT_TYPE_COOKIE_LENGTH

        public static final int DEFAULT_MAX_OBJECT_TYPE_COOKIE_LENGTH
        See Also:
        Constant Field Values
    • Constructor Detail

      • SimpleAtomConfig

        public SimpleAtomConfig()
      • SimpleAtomConfig

        public SimpleAtomConfig​(int maxPageSize,
                                int maxNumObjects,
                                int maxCookieLength)
    • Method Detail

      • withContainerProperty

        public SimpleAtomConfig withContainerProperty​(String propertyKey,
                                                      String propertyValue)
        Builder method to set any container properties. Creates and populates a HashMap with key value pairs
        Parameters:
        propertyKey - the key of property to be stored
        propertyValue - the associated value of the key to be stored
        Returns:
        this
      • setProxyConfig

        public void setProxyConfig​(AtomProxyConfig proxyConfig)
        Setter method for AtomProxyConfig to overwrite the default implementation of SimpleAtomProxyConfig instance if needed.
        Parameters:
        proxyConfig - Atom proxy configuration information which may be of use to a developer. Connector devs can use the SimpleAtomProxyConfig builder to create a new instance and pass it in as an argument here.
      • getContainerProperty

        public String getContainerProperty​(String key)
        Description copied from interface: AtomConfig
        Gets the property value for the given key as a String.
        Specified by:
        getContainerProperty in interface AtomConfig
        Parameters:
        key - key of the desired property
        Returns:
        String property value or null if not found.
      • getContainerProperty

        public String getContainerProperty​(String key,
                                           String defaultValue)
        Description copied from interface: AtomConfig
        Gets the property value for the given key as a String., returning the defaultValue if the located property value is blank (null or all characters are whitespace).
        Specified by:
        getContainerProperty in interface AtomConfig
        Parameters:
        key - key of the desired property
        defaultValue - value to return if property value is blank
        Returns:
        String property value or defaultValue if not found.
      • getBooleanContainerProperty

        public Boolean getBooleanContainerProperty​(String key)
        Description copied from interface: AtomConfig
        Gets the property value for the given key as a Boolean.
        Specified by:
        getBooleanContainerProperty in interface AtomConfig
        Parameters:
        key - key of the desired property
        Returns:
        Boolean property value or null if not found or isn't "true" or "false".
      • getBooleanContainerProperty

        public boolean getBooleanContainerProperty​(String key,
                                                   boolean defaultValue)
        Description copied from interface: AtomConfig
        Gets the property value for the given key as a boolean, returning the defaultValue if the located property value null.
        Specified by:
        getBooleanContainerProperty in interface AtomConfig
        Parameters:
        key - key of the desired property
        defaultValue - value to return if property value is null
        Returns:
        boolean property value or defaultValue if not found.
      • getLongContainerProperty

        public Long getLongContainerProperty​(String key)
        Description copied from interface: AtomConfig
        Gets the property value for the given key as a Long.
        Specified by:
        getLongContainerProperty in interface AtomConfig
        Parameters:
        key - key of the desired property
        Returns:
        Long property value or null if not found.
      • getLongContainerProperty

        public long getLongContainerProperty​(String key,
                                             long defaultValue)
        Description copied from interface: AtomConfig
        Gets the property value for the given key as a Long, returning the defaultValue if the located property value null.
        Specified by:
        getLongContainerProperty in interface AtomConfig
        Parameters:
        key - key of the desired property
        defaultValue - value to return if property value is null
        Returns:
        Long property value or defaultValue if not found.
      • getProxyConfig

        public AtomProxyConfig getProxyConfig()
        Description copied from interface: AtomConfig
        Returns ProxyConfig object with access to Atom proxy properties such as proxyHost, proxyPort etc.
        Specified by:
        getProxyConfig in interface AtomConfig
        Returns:
        Proxy configuration properties set on an Atom.
      • getMaxPageSize

        public int getMaxPageSize()
        Description copied from interface: AtomConfig
        Returns the maximum page size recommended by the Atom. Connector implementations should use this value along with any internal limits to determine a reasonable page size when working with pageable results.
        Specified by:
        getMaxPageSize in interface AtomConfig
        Returns:
        the maximum page size that the atom recommends
      • getMaxNumberObjectTypes

        public int getMaxNumberObjectTypes()
        Description copied from interface: AtomConfig
        Returns the maximum number of object types allowed to be returned from a browse request. More than this number of object types will be considered an error by the Atom and will fail the browsing process.
        Specified by:
        getMaxNumberObjectTypes in interface AtomConfig
        Returns:
        the maximum number of object types allowed
      • getMaxObjectTypeCookieLength

        public int getMaxObjectTypeCookieLength()
        Description copied from interface: AtomConfig
        Returns the maximum number of characters allowed in an ObjectType cookie. Cookies which are longer than this value will be considered an error by the Atom and will fail the browsing process.
        Specified by:
        getMaxObjectTypeCookieLength in interface AtomConfig
        Returns:
        the maximum number of characters allowed in an ObjectDefinition cookie.
      • getLogLevel

        public Level getLogLevel()
        Description copied from interface: AtomConfig
        Returns the logging level for the connector.
        Specified by:
        getLogLevel in interface AtomConfig
        Returns:
        the logging level for the connector