com.groupdocs.assembly

Class DataSourceInfo

  • java.lang.Object
    • com.groupdocs.assembly.DataSourceInfo


  • public class DataSourceInfo
    extends java.lang.Object
    Provides information on a single data source object to be used to assemble a document from a template.
    • Constructor Summary

      Constructors 
      Constructor and Description
      DataSourceInfo()
      Creates a new instance of this class without any properties specified.
      DataSourceInfo(java.lang.Object dataSource)
      Creates a new instance of this class with the data source object specified.
      DataSourceInfo(java.lang.Object dataSource, java.lang.String name)
      Creates a new instance of this class with the data source object and its name specified.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object getDataSource()
      Gets the data source object.
      java.lang.String getName()
      Gets the name of the data source object to be used to access the data source object in a template document.
      void setDataSource(java.lang.Object value)
      Sets the data source object.
      void setName(java.lang.String value)
      Sets the name of the data source object to be used to access the data source object in a template document.
      • Methods inherited from class java.lang.Object

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

      • DataSourceInfo

        public DataSourceInfo()
        Creates a new instance of this class without any properties specified.
      • DataSourceInfo

        public DataSourceInfo(java.lang.Object dataSource)
        Creates a new instance of this class with the data source object specified.

        The data source object can be of one of the following types:

        For information on how to work with data sources of different types in template documents, see template syntax reference(https://docs.groupdocs.com/display/assemblyjava/Template+Syntax+-+Part+1+of+2#TemplateSyntax-Part1of2-UsingDataSources).

        Parameters:
        dataSource - The data source object.
      • DataSourceInfo

        public DataSourceInfo(java.lang.Object dataSource,
                              java.lang.String name)
        Creates a new instance of this class with the data source object and its name specified.

        The data source object can be of one of the following types:

        For information on how to work with data sources of different types in template documents, see template syntax reference(https://docs.groupdocs.com/display/assemblyjava/Template+Syntax+-+Part+1+of+2#TemplateSyntax-Part1of2-UsingDataSources).

        When the name of the data source object is specified, you can access the data source object and its members in a template document using the name.

        When the name of the data source object is null or empty, you can still access members of the data source object in a template document using context object member access (see Template Syntax Reference for more information), but you cannot access the data source object itself.

        When passing multiple DataSourceInfo instances to DocumentAssembler, only the name of the first data source object can be null or empty. Names of the rest ones must be specified and unique.

        Parameters:
        dataSource - The data source object.
        name - The name of the data source object to be used to access the data source object in a template document.
    • Method Detail

      • getName

        public java.lang.String getName()
        Gets the name of the data source object to be used to access the data source object in a template document.

        When the name of the data source object is specified, you can access the data source object and its members in a template document using the name.

        When the name of the data source object is null or empty, you can still access members of the data source object in a template document using context object member access (see Template Syntax Reference for more information), but you cannot access the data source object itself.

        When passing multiple DataSourceInfo instances to DocumentAssembler, only the name of the first data source object can be null or empty. Names of the rest ones must be specified and unique.

        Returns:
        The name of the data source object to be used to access the data source object in a template document.
      • setName

        public void setName(java.lang.String value)
        Sets the name of the data source object to be used to access the data source object in a template document.

        When the name of the data source object is specified, you can access the data source object and its members in a template document using the name.

        When the name of the data source object is null or empty, you can still access members of the data source object in a template document using context object member access (see Template Syntax Reference for more information), but you cannot access the data source object itself.

        When passing multiple DataSourceInfo instances to DocumentAssembler, only the name of the first data source object can be null or empty. Names of the rest ones must be specified and unique.

        Parameters:
        value - The name of the data source object to be used to access the data source object in a template document.