ibi.broker.api.data.library
Class Version

java.lang.Object
  extended by ibi.broker.api.data.content.ContentObject
      extended by ibi.broker.api.data.library.Version
All Implemented Interfaces:
java.io.Serializable

public class Version
extends ibi.broker.api.data.content.ContentObject
implements java.io.Serializable

 The Version class provides a means of organizing (by version) 
 Report Library content, which exists as a result of scheduled distributions to the library. 
 In addition to the Version class, other classes involved in the hierarchical 
 organization of Report Library content are Category and 
 Content whereby Category exists at the top of the hierarchy (i.e., the 
 parent), followed by Content, and then finally nested below that the actual 
 Versions.
 It is important to note that some methods contained in this class involve functions
 generally owned by the Distribution Server. 
 While the programmer may have the ability through the use 
 of the ReportCaster API to reset actions taken by the Distribution Server, 
 such actions should be done with extreme caution.
 A code example illustrating the use of Version is below. This is taken from
 the samples directory packaged with the product.

 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 +  Copyright (c) 2004 Information Builders, Inc. All  Rights Reserved.     +
 +                                                                          +
 +  Information Builders offers sample API programs as a heuristic device.  +
 +  They are not intended, as is, for production use. Licensed users are    +
 +  welcome to alter and extend these samples and deploy them in other      +
 +  environments, or alternate configurations, as they see fit.             +
 +  Information Builders will support the documented functionality of       +
 +  its API classes and methods. However, Information Builders is not       +
 +  responsible for functionality or behavior of products built with        +
 +  its API unless the documented behavior of its discrete classes and      +
 +  methods is different than the actual results.                           +
 +                                                                          +
 +  Redistributions of IBI source code and documentation must be within     +
 +  the scope of the Information Builders Software License Agreement.       +
 +                                                                          +
 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 

 String getLatestReportId(String contentId) throws CasterException {
       Content content = contentManager.getAccessibleContentInfo(contentId);
       Version[] versionList = content.getVersionList();
       if(versionList==null || versionList.length ==0){
           System.out.println("No versioned report available.");
           return null;
       }
       //version is already sorted by number.
       return versionList[versionList.length-1].getId();
   }
 

See Also:
Serialized Form

Field Summary
static java.lang.String AHTML
          String constant representing one of the valid formats for versions of content in the Report Library.
static java.lang.String EXCEL_TEMPLATE
          This is one of the valid values of the property format.
static java.lang.String EXL2K_PIVOT
          String constant representing one of the valid formats for versions of content in the Report Library.
static java.lang.String FORMAT_ALPHA
          String constant representing one of the valid formats for versions of content in the Report Library.
static java.lang.String FORMAT_COM
           
static java.lang.String FORMAT_COMMA
          String constant representing one of the valid formats for versions of content in the Report Library.
static java.lang.String FORMAT_COMT
          This is one of the valid values of the property format.
static java.lang.String FORMAT_DOC
          String constant representing one of the valid formats for versions of content in the Report Library.
static java.lang.String FORMAT_EXCEL
          String constant representing one of the valid formats for versions of content in the Report Library.
static java.lang.String FORMAT_EXL2K
          String constant representing one of the valid formats for versions of content in the Report Library.
static java.lang.String FORMAT_EXL2K_FORMULA
          String constant representing one of the valid formats for versions of content in the Report Library.
static java.lang.String FORMAT_EXL97
          This is one of the valid values of the property format.
static java.lang.String FORMAT_GIF
          String constant representing one of the valid formats for versions of content in the Report Library.
static java.lang.String FORMAT_HTML
          This is one of the valid values of the property format.
static java.lang.String FORMAT_PDF
          String constant representing one of the valid formats for versions of content in the Report Library.
static java.lang.String FORMAT_PPT
           
static java.lang.String FORMAT_PPTX
           
static java.lang.String FORMAT_PS
          String constant representing one of the valid formats for versions of content in the Report Library.
static java.lang.String FORMAT_TABT
          String constant representing one of the valid formats for versions of content in the Report Library.
static java.lang.String FORMAT_WK1
          String constant representing one of the valid formats for versions of content in the Report Library.
static java.lang.String FORMAT_WP
          String constant representing one of the valid formats for versions of content in the Report Library.
static java.lang.String FORMAT_XML
          String constant representing one of the valid formats for versions of content in the Report Library.
static java.lang.String PNG
          This is one of the valid values of the property format.
static java.lang.String SVG
          This is one of the valid values of the property format.
 
Fields inherited from class ibi.broker.api.data.content.ContentObject
id
 
Constructor Summary
Version()
           
 
Method Summary
 java.lang.String getCompressFormat()
           
 long getCompressSize()
           
 java.util.Calendar getCreateDate()
          Obtains the creation date for this version of Report Library content.
 java.util.Calendar getExpireDate()
          Obtains the expiration date for this version of Report Library content.
 java.lang.String getFormat()
          Obtains the format of this version of Report Library content as a String constant.
 long getSize()
          Obtains the size of this version of Report Library content.
 int getVersionNumber()
          Specifies an integer version number to content in ReportCaster's Report Library database.
 void setCompressFormat(java.lang.String compressFormat)
           
 void setCompressSize(long compressSize)
           
 void setCreateDate(java.util.Calendar createDate)
          Assigns the creation date for this version of Report Library content.
 void setExpireDate(java.util.Calendar expireDate)
          Assigns the expiration date for this version of Report Library content.
 void setFormat(java.lang.String format)
          Assigns the format of this version of Report Library content as a String constant.
 void setSize(long size)
          Assigns the size of this version of Report Library content.
 void setVersionNumber(int versionNumber)
          Assigns an integer version number to the content in ReportCaster's Report Library database.
 void validate(java.lang.String parentName)
          Assists in validating arguments
 
Methods inherited from class ibi.broker.api.data.content.ContentObject
equals, getId, hashCode, setId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AHTML

public static final java.lang.String AHTML
String constant representing one of the valid formats for versions of content in the Report Library.

See Also:
setFormat(java.lang.String), Constant Field Values

FORMAT_HTML

public static final java.lang.String FORMAT_HTML
This is one of the valid values of the property format.

See Also:
setFormat(String format), Constant Field Values

FORMAT_PDF

public static final java.lang.String FORMAT_PDF
String constant representing one of the valid formats for versions of content in the Report Library.

See Also:
setFormat(java.lang.String), Constant Field Values

FORMAT_GIF

public static final java.lang.String FORMAT_GIF
String constant representing one of the valid formats for versions of content in the Report Library.

See Also:
setFormat(java.lang.String), Constant Field Values

FORMAT_XML

public static final java.lang.String FORMAT_XML
String constant representing one of the valid formats for versions of content in the Report Library.

See Also:
setFormat(java.lang.String), Constant Field Values

FORMAT_PS

public static final java.lang.String FORMAT_PS
String constant representing one of the valid formats for versions of content in the Report Library.

See Also:
setFormat(java.lang.String), Constant Field Values

FORMAT_DOC

public static final java.lang.String FORMAT_DOC
String constant representing one of the valid formats for versions of content in the Report Library.

See Also:
setFormat(java.lang.String), Constant Field Values

FORMAT_WP

public static final java.lang.String FORMAT_WP
String constant representing one of the valid formats for versions of content in the Report Library.

See Also:
setFormat(java.lang.String), Constant Field Values

FORMAT_EXCEL

public static final java.lang.String FORMAT_EXCEL
String constant representing one of the valid formats for versions of content in the Report Library.

See Also:
setFormat(java.lang.String), Constant Field Values

FORMAT_EXL2K

public static final java.lang.String FORMAT_EXL2K
String constant representing one of the valid formats for versions of content in the Report Library.

See Also:
setFormat(java.lang.String), Constant Field Values

FORMAT_EXL2K_FORMULA

public static final java.lang.String FORMAT_EXL2K_FORMULA
String constant representing one of the valid formats for versions of content in the Report Library.

See Also:
setFormat(java.lang.String), Constant Field Values

EXL2K_PIVOT

public static final java.lang.String EXL2K_PIVOT
String constant representing one of the valid formats for versions of content in the Report Library.

See Also:
setFormat(java.lang.String), Constant Field Values

EXCEL_TEMPLATE

public static final java.lang.String EXCEL_TEMPLATE
This is one of the valid values of the property format.

See Also:
setFormat(String format), Constant Field Values

FORMAT_EXL97

public static final java.lang.String FORMAT_EXL97
This is one of the valid values of the property format.

See Also:
setFormat(String format), Constant Field Values

FORMAT_WK1

public static final java.lang.String FORMAT_WK1
String constant representing one of the valid formats for versions of content in the Report Library.

See Also:
setFormat(java.lang.String), Constant Field Values

FORMAT_ALPHA

public static final java.lang.String FORMAT_ALPHA
String constant representing one of the valid formats for versions of content in the Report Library.

See Also:
setFormat(java.lang.String), Constant Field Values

FORMAT_TABT

public static final java.lang.String FORMAT_TABT
String constant representing one of the valid formats for versions of content in the Report Library.

See Also:
setFormat(java.lang.String), Constant Field Values

FORMAT_COMMA

public static final java.lang.String FORMAT_COMMA
String constant representing one of the valid formats for versions of content in the Report Library.

See Also:
setFormat(java.lang.String), Constant Field Values

FORMAT_COMT

public static final java.lang.String FORMAT_COMT
This is one of the valid values of the property format.

See Also:
setFormat(String format), Constant Field Values

PNG

public static final java.lang.String PNG
This is one of the valid values of the property format.

See Also:
setFormat(String format), Constant Field Values

SVG

public static final java.lang.String SVG
This is one of the valid values of the property format.

See Also:
setFormat(String format), Constant Field Values

FORMAT_PPT

public static final java.lang.String FORMAT_PPT
See Also:
Constant Field Values

FORMAT_PPTX

public static final java.lang.String FORMAT_PPTX
See Also:
Constant Field Values

FORMAT_COM

public static final java.lang.String FORMAT_COM
See Also:
Constant Field Values
Constructor Detail

Version

public Version()
Method Detail

setVersionNumber

public void setVersionNumber(int versionNumber)
Assigns an integer version number to the content in ReportCaster's Report Library database. A version indicates a new execution of an existing scheduled report. The version number is originally set at the time of report distribution.

Parameters:
versionNumber - The version number as an integer.

getVersionNumber

public int getVersionNumber()
Specifies an integer version number to content in ReportCaster's Report Library database. A version indicates a new execution of an existing scheduled report. The version number is originally set at the time of report distribution.

Returns:
The version number as an integer.
See Also:
setVersionNumber(int)

setCreateDate

public void setCreateDate(java.util.Calendar createDate)
Assigns the creation date for this version of Report Library content. The creation date is a Calendar object and is originally set at the time of report distribution.

Parameters:
createDate - The creation date as a Calendar object.

getCreateDate

public java.util.Calendar getCreateDate()
Obtains the creation date for this version of Report Library content. The creation date is a Calendar object and is originally set at the time of report distribution.

Returns:
The creation date as a Calendar object.
See Also:
setCreateDate(Calendar)

setExpireDate

public void setExpireDate(java.util.Calendar expireDate)
Assigns the expiration date for this version of Report Library content. The expiration date is a Calendar object and is originally set at the time of report distribution.

Parameters:
expireDate - Calendar object represeneting the expiration date.
See Also:
getExpireDate()

getExpireDate

public java.util.Calendar getExpireDate()
Obtains the expiration date for this version of Report Library content. The expiration date is a Calendar object and is originally set at the time of report distribution.

Returns:
The expiration date as a Calendar object.
See Also:
setExpireDate(Calendar)

setSize

public void setSize(long size)
Assigns the size of this version of Report Library content. The size is a long number and is originally set at the time of report distribution.

Parameters:
size - The size of the report version as a long number.
See Also:
setSize(long)

getSize

public long getSize()
Obtains the size of this version of Report Library content. The size is long number and is originally set at the time of report distribution.

Returns:
The size of the report version as a long number
See Also:
setSize(long)

setFormat

public void setFormat(java.lang.String format)
Assigns the format of this version of Report Library content as a String constant. All of the supported formats are defined as String constants in the field summary table above.

Parameters:
format - String constant representing the format.
See Also:
getFormat()

getFormat

public java.lang.String getFormat()
Obtains the format of this version of Report Library content as a String constant. All of the supported formats are defined as string constants in the field summary table above.

Returns:
The format as a String constant.
See Also:
setFormat(String)

getCompressFormat

public java.lang.String getCompressFormat()

setCompressFormat

public void setCompressFormat(java.lang.String compressFormat)

getCompressSize

public long getCompressSize()

setCompressSize

public void setCompressSize(long compressSize)

validate

public void validate(java.lang.String parentName)
              throws CasterException
Assists in validating arguments

Parameters:
parentName - represented parent of this object.
Throws:
CasterException


Copyright © 2006 Information Builders, Incorporated.