com.stimulsoft.report.dictionary
Class StiResource

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

public class StiResource
extends java.lang.Object
implements IStiName, IStiInherited, IStiJsonReportObject, IStiSerializableToString

Copyright Stimulsoft


Nested Class Summary
static class StiResource.Order
           
 
Field Summary
 byte[] content
           
 boolean inherited
           
 java.lang.String key
           
 StiResourceType type
           
 
Constructor Summary
StiResource()
          Creates an object of the type StiResource.
StiResource(java.lang.String name, StiResourceType type, byte[] content)
          Creates an object of the type StiResource.
StiResource(java.lang.String name, java.lang.String alias, boolean inherited, StiResourceType type, byte[] content)
           
StiResource(java.lang.String name, java.lang.String alias, boolean inherited, StiResourceType type, byte[] content, boolean availableInTheViewer)
          Creates an object of the type StiResource.
StiResource(java.lang.String name, java.lang.String alias, StiResourceType type, byte[] content)
          Creates an object of the type StiResource.
 
Method Summary
 void deserialize(java.lang.String strObject)
          Десериализация объекта из строки.
 java.lang.String getAlias()
          An alias of the file.
 StiComponentId getComponentId()
           
 byte[] getContent()
           
 boolean getInherited()
           
 java.lang.String getKey()
          The key of the dictionary object.
 java.lang.String getName()
          A name of the file.
 java.lang.String getPropName()
           
 StiImage getResourceAsImage()
           
 StiResourceType getType()
          The key of the dictionary object.
 boolean isAvailableInTheViewer()
           
 void LoadFromJsonObject(JSONObject jObject)
           
 JSONObject SaveToJsonObject(StiJsonSaveMode mode)
           
 java.lang.String serialize()
          Сериализация объекта в строку.
 void setAlias(java.lang.String alias)
          An alias of the file.
 void setAvailableInTheViewer(boolean availableInTheViewer)
           
 void setContent(byte[] content)
           
 void setInherited(boolean inherited)
           
 void setKey(java.lang.String key)
          The key of the dictionary object.
 void setName(java.lang.String value)
          A name of the file.
 void setType(StiResourceType type)
          The key of the dictionary object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

inherited

public boolean inherited

content

public byte[] content

key

public java.lang.String key

type

public StiResourceType type
Constructor Detail

StiResource

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


StiResource

public StiResource(java.lang.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(java.lang.String name,
                   java.lang.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(java.lang.String name,
                   java.lang.String alias,
                   boolean inherited,
                   StiResourceType type,
                   byte[] content)

StiResource

public StiResource(java.lang.String name,
                   java.lang.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 Detail

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 java.lang.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 java.lang.String getName()
A name of the file.

Specified by:
getName in interface IStiName
Returns:
the name

setName

public void setName(java.lang.String value)
A name of the file.

Specified by:
setName in interface IStiName
Parameters:
name - the name to set

getAlias

public java.lang.String getAlias()
An alias of the file.

Returns:
the alias

setAlias

public void setAlias(java.lang.String alias)
An alias of the file.

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

getKey

public java.lang.String getKey()
The key of the dictionary object.

Returns:
the key

setKey

public void setKey(java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object

serialize

public java.lang.String serialize()
Description copied from interface: IStiSerializableToString
Сериализация объекта в строку.

Specified by:
serialize in interface IStiSerializableToString
Returns:
строковое представление объекта

deserialize

public void deserialize(java.lang.String strObject)
Description copied from interface: IStiSerializableToString
Десериализация объекта из строки. Все свойства объекта устанавливаются за счет распарсивания строки.

Specified by:
deserialize in interface IStiSerializableToString