Class DefaultResourceConfigSeq

  • All Implemented Interfaces:
    Iterable<org.smooks.api.resource.config.ResourceConfig>, org.smooks.api.resource.config.ResourceConfigSeq

    public class DefaultResourceConfigSeq
    extends Object
    implements org.smooks.api.resource.config.ResourceConfigSeq
    ResourceConfig list.
    Author:
    tfennelly
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(org.smooks.api.profile.ProfileSet profileSet)
      Add a ProfileSet instance to this list.
      void add​(org.smooks.api.resource.config.ResourceConfig resourceConfig)
      Add a ResourceConfig instance to this list.
      void addAll​(org.smooks.api.resource.config.ResourceConfigSeq resourceConfigSeq)
      Add all the ResourceConfig instances in the specified ResourceConfigSeq to this list.
      org.smooks.api.resource.config.ResourceConfig get​(int index)
      Get the ResourceConfig instance at the specified index.
      List<org.smooks.api.resource.config.ResourceConfig> getAll()  
      List<org.smooks.api.resource.config.ResourceConfig> getAll​(org.smooks.api.profile.ProfileSet profileSet)
      Get all ResourceConfig entries targeted at the specified profile set.
      String getName()
      Get the name of this list instance.
      List<org.smooks.api.profile.ProfileSet> getProfiles()
      Get the list of profiles configured on this resource configuration list.
      boolean isEmpty()
      Is this list instance empty.
      boolean isSystem()
      Is this configuration list instance one of the system installed config lists.
      Iterator<org.smooks.api.resource.config.ResourceConfig> iterator()  
      List<org.smooks.api.resource.config.ResourceConfig> lookupResource​(org.smooks.api.resource.config.ConfigSearch searchCriteria)
      Lookup a resource configuration from this config list.
      void setSystem​(boolean isSystem)
      Set whether or not this configuration list instance is one of the system installed config lists.
      int size()
      Get the size of this list.
    • Constructor Detail

      • DefaultResourceConfigSeq

        public DefaultResourceConfigSeq​(String name)
        Public constructor.
        Parameters:
        name - The name of this instance.
    • Method Detail

      • add

        public void add​(org.smooks.api.resource.config.ResourceConfig resourceConfig)
        Add a ResourceConfig instance to this list.
        Specified by:
        add in interface org.smooks.api.resource.config.ResourceConfigSeq
        Parameters:
        resourceConfig - ResourceConfig instance to add.
      • addAll

        public void addAll​(org.smooks.api.resource.config.ResourceConfigSeq resourceConfigSeq)
        Add all the ResourceConfig instances in the specified ResourceConfigSeq to this list.
        Specified by:
        addAll in interface org.smooks.api.resource.config.ResourceConfigSeq
        Parameters:
        resourceConfigSeq - ResourceConfigSeq instance to add.
      • add

        public void add​(org.smooks.api.profile.ProfileSet profileSet)
        Add a ProfileSet instance to this list.
        Specified by:
        add in interface org.smooks.api.resource.config.ResourceConfigSeq
        Parameters:
        profileSet - ProfileSet instance to add.
      • getName

        public String getName()
        Get the name of this list instance.
        Specified by:
        getName in interface org.smooks.api.resource.config.ResourceConfigSeq
        Returns:
        List name.
      • isSystem

        public boolean isSystem()
        Is this configuration list instance one of the system installed config lists.
        Specified by:
        isSystem in interface org.smooks.api.resource.config.ResourceConfigSeq
        Returns:
        True if this configuration list instance one of the system installed config lists, otherwise false.
      • setSystem

        public void setSystem​(boolean isSystem)
        Set whether or not this configuration list instance is one of the system installed config lists.
        Specified by:
        setSystem in interface org.smooks.api.resource.config.ResourceConfigSeq
        Parameters:
        isSystem - True if this configuration list instance one of the system installed config lists, otherwise false.
      • isEmpty

        public boolean isEmpty()
        Is this list instance empty.
        Specified by:
        isEmpty in interface org.smooks.api.resource.config.ResourceConfigSeq
        Returns:
        True if this list instance is empty, otherwise false.
      • size

        public int size()
        Get the size of this list.
        Specified by:
        size in interface org.smooks.api.resource.config.ResourceConfigSeq
        Returns:
        The size of te list i.e. number of entries.
      • get

        public org.smooks.api.resource.config.ResourceConfig get​(int index)
                                                          throws ArrayIndexOutOfBoundsException
        Get the ResourceConfig instance at the specified index.
        Specified by:
        get in interface org.smooks.api.resource.config.ResourceConfigSeq
        Parameters:
        index - Resource index.
        Returns:
        The ResourceConfig instance at the specified index.
        Throws:
        ArrayIndexOutOfBoundsException - The specified index is out of bounds.
      • getAll

        public List<org.smooks.api.resource.config.ResourceConfig> getAll​(org.smooks.api.profile.ProfileSet profileSet)
        Get all ResourceConfig entries targeted at the specified profile set.
        Specified by:
        getAll in interface org.smooks.api.resource.config.ResourceConfigSeq
        Parameters:
        profileSet - The profile set to searh against.
        Returns:
        All ResourceConfig entries targeted at the specified profile set.
      • getProfiles

        public List<org.smooks.api.profile.ProfileSet> getProfiles()
        Get the list of profiles configured on this resource configuration list.
        Specified by:
        getProfiles in interface org.smooks.api.resource.config.ResourceConfigSeq
        Returns:
        List of profiles.
      • lookupResource

        public List<org.smooks.api.resource.config.ResourceConfig> lookupResource​(org.smooks.api.resource.config.ConfigSearch searchCriteria)
        Lookup a resource configuration from this config list.

        Note that this is resource config order-dependent. It will not locate configs that have not yet been loaded.

        Specified by:
        lookupResource in interface org.smooks.api.resource.config.ResourceConfigSeq
        Parameters:
        searchCriteria - The resource lookup criteria.
        Returns:
        List of matches resources, or an empty List if no matches are found.
      • iterator

        public Iterator<org.smooks.api.resource.config.ResourceConfig> iterator()
        Specified by:
        iterator in interface Iterable<org.smooks.api.resource.config.ResourceConfig>