Class StiResource

java.lang.Object
com.stimulsoft.report.dictionary.StiResource
All Implemented Interfaces:
IStiJsonReportObject, IStiSerializable, IStiSerializableToString, IStiName, ICloneable, IStiAlias, IStiInherited

Copyright Stimulsoft
  • Field Details

    • inherited

      public boolean inherited
    • content

      public byte[] content
    • storable

      public boolean storable
      Specifies whether the resource is saved in the document file.
    • key

      public String key
    • type

      public StiResourceType type
  • Constructor Details

    • StiResource

      public StiResource()
      Creates an object of the type StiResource.
    • StiResource

      public StiResource(String name, StiResourceType type, byte[] content)
      Creates an object of the type StiResource.
      Parameters:
      name - Name of the resource.
      type - Type of the resource.
      content - Content of the resource.
    • StiResource

      public StiResource(String name, String alias, StiResourceType type, byte[] content)
      Creates an object of the type StiResource.
      Parameters:
      name - Name of the resource.
      alias - Alias of the resource.
      type - Type of the resource.
      content - Content of the resource.
    • StiResource

      public StiResource(String name, String alias, boolean inherited, StiResourceType type, byte[] content)
    • StiResource

      public StiResource(String name, String alias, boolean inherited, StiResourceType type, byte[] content, boolean availableInTheViewer)
      Creates an object of the type StiResource.
      Parameters:
      name - Name of the resource.
      alias - Alias of the resource.
      inherited - Value which indicates that this resource inherited in dictionary from the master report.
      type - Type of the resource.
      content - Content of the resource.
  • Method Details

    • clone

      public Object clone()
      Specified by:
      clone in interface ICloneable
      Overrides:
      clone in class Object
    • SaveToJsonObject

      public JSONObject SaveToJsonObject(StiJsonSaveMode mode) throws JSONException
      Specified by:
      SaveToJsonObject in interface IStiJsonReportObject
      Throws:
      JSONException
    • LoadFromJsonObject

      public void LoadFromJsonObject(JSONObject jObject) throws JSONException
      Specified by:
      LoadFromJsonObject in interface IStiJsonReportObject
      Throws:
      JSONException
    • getComponentId

      public StiComponentId getComponentId()
    • getPropName

      public String getPropName()
    • getInherited

      public boolean getInherited()
      Specified by:
      getInherited in interface IStiInherited
      Returns:
      the inherited
    • setInherited

      public void setInherited(boolean inherited)
      Specified by:
      setInherited in interface IStiInherited
      Parameters:
      inherited - the inherited to set
    • getName

      public String getName()
      A name of the file.d
      Specified by:
      getName in interface IStiName
      Returns:
      the name
    • setName

      public void setName(String value)
      A name of the file.
      Specified by:
      setName in interface IStiName
      Parameters:
      name - the name to set
    • getAlias

      public String getAlias()
      An alias of the file.
      Specified by:
      getAlias in interface IStiAlias
      Returns:
      the alias
    • setAlias

      public void setAlias(String alias)
      An alias of the file.
      Specified by:
      setAlias in interface IStiAlias
      Parameters:
      alias - the alias to set
    • getContent

      public byte[] getContent()
      Returns:
      the content
    • setContent

      public void setContent(byte[] content)
      Parameters:
      content - the content to set
    • isStorable

      public boolean isStorable()
      Specifies whether the resource is saved in the document file.
      Returns:
    • setStorable

      public void setStorable(boolean storable)
      Specifies whether the resource is saved in the document file.
      Parameters:
      storable -
    • getKey

      public String getKey()
      The key of the dictionary object.
      Returns:
      the key
    • setKey

      public void setKey(String key)
      The key of the dictionary object.
      Parameters:
      key - the key to set
    • getType

      public StiResourceType getType()
      The key of the dictionary object.
      Returns:
      the type
    • isAvailableInTheViewer

      public boolean isAvailableInTheViewer()
      Returns:
      the availableInTheViewer
    • setAvailableInTheViewer

      public void setAvailableInTheViewer(boolean availableInTheViewer)
      Parameters:
      availableInTheViewer - the availableInTheViewer to set
    • setType

      public void setType(StiResourceType type)
      The key of the dictionary object.
      Parameters:
      type - the type to set
    • getResourceAsImage

      public StiImage getResourceAsImage()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • createFileDatabase

      public StiFileDatabase createFileDatabase()
    • createFileDatabase

      public static StiFileDatabase createFileDatabase(StiResourceType type)
    • serialize

      public String serialize()
      Specified by:
      serialize in interface IStiSerializableToString
    • deserialize

      public void deserialize(String strObject)
      Specified by:
      deserialize in interface IStiSerializableToString
    • getFileExt

      public String getFileExt()
    • getContentType

      public String getContentType()