com.dynalivery.repository.util
Class ReportRepository

java.lang.Object
  |
  +--com.dynalivery.repository.util.ReportRepository
Direct Known Subclasses:
EJBReportRepository

public abstract class ReportRepository
extends java.lang.Object

This is the interface class for the Dynalivery Report Repository. This interface allows other components to store/retrieve report design templates, associated binary files and report output instances. This class will attempt to hide the underlying implementation which may use the file system directly or an enterprise java bean server. This is an abstract class instead of an interface as it may be possible to implement some of the common inheritance and validation in this class directly.


Field Summary
static java.lang.String GLOBAL_PROPERTY_BLOB_BUFFER_BYTE_LENGTH
          key string for BLOB buffer limit
static java.lang.String GLOBAL_PROPERTY_LOGGING
          key string for logging flag
static java.lang.String GLOBAL_PROPERTY_RETRY_DELAY
          key string for retry delay
static java.lang.String GLOBAL_PROPERTY_RETRY_LIMIT
          key string for retry limit
static java.lang.String GLOBAL_PROPERTY_SERVER_PORT
          key string for JNDI server port number
static java.lang.String PROPERTIES_FILENAME
          the report repository properties filename
 
Constructor Summary
ReportRepository()
          construct a report repository with no specified properties
ReportRepository(java.util.Properties properties)
          construct a report repository with the specified properties
 
Method Summary
abstract  BinaryRef checkinBinary(BinaryRef binaryRef, byte[] reportBinary, FileOptions fileOptions, java.lang.String comment, boolean createFolders)
          Check a report binary file into the repository.
 BinaryRef checkinBinary(BinaryRef binaryRef, java.io.File binaryFile, FileOptions fileOptions, java.lang.String comment, boolean createFolders)
          Check a report binary file into the repository.
abstract  BinaryRef checkinBinary(BinaryRef binaryRef, java.io.File binaryFile, FileOptions fileOptions, java.lang.String comment, boolean createFolders, ProgressReporter progressReporter)
          Check a report binary file into the repository.
abstract  OutputRef checkinOutput(OutputRef outputRef, byte[] reportOutput, OutputOptions outputOptions, boolean createFolders, boolean overwrite)
          Check a report output file into the repository.
 OutputRef checkinOutput(OutputRef outputRef, java.io.File outputFile, OutputOptions outputOptions, boolean createFolders, boolean overwrite)
          Check a report output file into the repository.
abstract  OutputRef checkinOutput(OutputRef outputRef, java.io.File outputFile, OutputOptions outputOptions, boolean createFolders, boolean overwrite, ProgressReporter progressReporter)
          Check a report output file into the repository.
abstract  boolean checkIntegrity()
          Perform repository integrity check
abstract  TemplateRef checkinTemplate(TemplateRef templateRef, byte[] templateByteArray, FileOptions fileOptions, java.lang.String comment, boolean validate, boolean alwaysOverwrite, boolean createFolders)
          Checkin a report design template into the repository.
 TemplateRef checkinTemplate(TemplateRef templateRef, java.io.File templateFile, FileOptions fileOptions, java.lang.String comment, boolean validate, boolean alwaysOverwrite, boolean createFolders)
          Checkin a report design template into the repository.
abstract  TemplateRef checkinTemplate(TemplateRef templateRef, java.io.File templateFile, FileOptions fileOptions, java.lang.String comment, boolean validate, boolean alwaysOverwrite, boolean createFolders, ProgressReporter progressReporter)
          Checkin a report design template into the repository.
abstract  byte[] checkoutBinary(BinaryRef binaryRef)
          Checkout the specified report binary and marks it as checked out by the current user.
 int checkoutBinary(BinaryRef binaryRef, java.io.File outputFile)
          Checkout the specified report binary and marks it as checked out by the current user.
abstract  int checkoutBinary(BinaryRef binaryRef, java.io.File outputFile, ProgressReporter progressReporter)
          Checkout the specified report binary and marks it as checked out by the current user.
abstract  byte[] checkoutTemplate(TemplateRef templateRef)
          Returns the specified report design template and marks it as checked out by the current user.
 int checkoutTemplate(TemplateRef templateRef, java.io.File outputFile)
          Returns the specified report design template and marks it as checked out by the current user.
abstract  int checkoutTemplate(TemplateRef templateRef, java.io.File outputFile, ProgressReporter progressReporter)
          Returns the specified report design template and marks it as checked out by the current user.
abstract  FolderRef createFolder(FolderRef parentFolderRef, java.lang.String folderName, FolderOptions folderOptions)
          Creates a new repository folder
abstract  FolderRef createFolder(java.lang.String pathname, FolderOptions folderOptions)
          Creates a new repository folder
static ReportRepository createRepository(java.lang.String vendor)
          Create a report repository for the specified vendor.
static ReportRepository createRepository(java.lang.String vendor, java.util.Properties properties)
          Create a report repository for the specified vendor.
static ReportRepository createRepository(java.lang.String vendor, java.lang.String port)
          Create a report repository for the specified vendor.
abstract  boolean currentUserIsAdmin()
          Returns true if the current user is a member of the repository admin user group.
abstract  boolean currentUserIsMember(java.lang.String ACLString)
          Returns true if current user is a member of specified access control list (ACL).
abstract  void deleteBinary(BinaryRef binaryRef)
          Deletes the specified report binary from the repository.
 void deleteExpiredOutputs()
          Deletes all report outputs with an expiration timestamp less than or equal to the current time.
abstract  void deleteExpiredOutputs(ProgressReporter progressReporter)
          Deletes all report outputs with an expiration timestamp less than or equal to the current time.
 void deleteExpiredOutputs(java.sql.Timestamp expirationTimestamp)
          Deletes all report outputs with an expiration timestamp less than or equal to that specified.
abstract  void deleteExpiredOutputs(java.sql.Timestamp expirationTimestamp, ProgressReporter progressReporter)
          Deletes all report outputs with an expiration timestamp less than or equal to that specified.
 void deleteFolder(FolderRef folderRef)
          Delete a folder and all associated files.
abstract  void deleteFolder(FolderRef folderRef, ProgressReporter progressReporter)
          Delete a folder and all associated files.
 void deleteMultiple(RepositoryRef[] refs)
          Delete multiple folders and/or files in one operation.
abstract  void deleteMultiple(RepositoryRef[] refs, ProgressReporter progressReporter)
          Delete multiple folders and/or files in one operation.
abstract  void deleteOutput(OutputRef outputRef)
          Deletes the specified report output from the repository.
abstract  void deleteTemplate(TemplateRef templateRef)
          Deletes the specified report design template from the repository.
abstract  boolean folderExists(FolderRef folderRef)
          Tests if folder exists
abstract  FolderRef[] getAllNestedFolders(FolderRef folderRef)
          Returns a FolderRef array of all nested folders in the specified folder
abstract  FolderRef[] getAllTopLevelFolders()
          Returns a FolderRef array of all top-level folders in the repository
abstract  TemplateRef[] getAncestorTemplates(TemplateRef templateRef)
          Returns the ancestors of the specified template
 java.lang.String getAppServerVendorString()
          Returns the application server vendor String or null if none
abstract  BinaryRef[] getBinariesForTemplate(TemplateRef templateRef)
          Returns a BinaryRef array of binaries referred to by the specified template
abstract  byte[] getBinary(BinaryRef binaryRef)
          Returns the report binary matching the specified reference
 int getBinary(BinaryRef binaryRef, java.io.File outputFile)
          Returns the report binary matching the specified reference
abstract  int getBinary(BinaryRef binaryRef, java.io.File outputFile, ProgressReporter progressReporter)
          Returns the report binary matching the specified reference
abstract  RevisionInfo[] getBinaryHistory(BinaryRef binaryRef)
          Returns the revision history for the specified report binary.
abstract  BinaryProperties getBinaryProperties(BinaryRef binaryRef)
          Returns the properties for the specified report binary file
abstract  TemplateRef[] getChildTemplates(TemplateRef parent)
          Returns a TemplateRef array for all report design templates which are children of (extend) the specified template.
 Version getClientVersion()
          Returns the client Version object
abstract  java.lang.String getCurrentUsername()
          Returns the username string as interpreted by the server.
abstract  OutputRef[] getExpiredOutputs()
          Returns an OutputRef array of all saved report outputs in the repository that have an expiration timestamp less than or equal to the current time.
abstract  OutputRef[] getExpiredOutputs(java.sql.Timestamp expirationTimestamp)
          Returns an OutputRef array of all saved report outputs in the repository that have an expiration timestamp less than or equal to that specified.
abstract  FolderProperties getFolderProperties(FolderRef folderRef)
          Get the properties for a folder
abstract  BinaryRef[] getNestedBinaries(FolderRef folderRef)
          Returns a BinaryRef array for all report binaries in the specified folder
abstract  OutputRef[] getNestedOutputs(FolderRef folderRef)
          Returns an OutputRef array of saved report outputs in the specified folder.
abstract  TemplateRef[] getNestedTemplates(FolderRef folderRef)
          Returns a TemplateRef array for all report design templates in the specified folder.
abstract  byte[] getOutput(OutputRef outputRef)
          Returns the report output matching the specified reference.
 int getOutput(OutputRef outputRef, java.io.File outputFile)
          Returns the report output matching the specified reference.
abstract  int getOutput(OutputRef outputRef, java.io.File outputFile, ProgressReporter progressReporter)
          Returns the report output matching the specified reference.
abstract  OutputProperties getOutputProperties(OutputRef outputRef)
          Returns the the report output properties matching the specified reference
 java.lang.String getServerName()
          Returns the server name
abstract  Version getServerVersion()
          Returns the server Version object
abstract  Statistics getStatistics()
          Returns the Statistics object for the repository
abstract  byte[] getTemplate(TemplateRef templateRef)
          Returns the specified report design template
 int getTemplate(TemplateRef templateRef, java.io.File outputFile)
          Returns the specified report design template
abstract  int getTemplate(TemplateRef templateRef, java.io.File outputFile, ProgressReporter progressReporter)
          Returns the specified report design template
abstract  byte[] getTemplateForExecution(TemplateRef templateRef)
          Returns the specified report design template for execution.
 int getTemplateForExecution(TemplateRef templateRef, java.io.File outputFile)
          Returns the specified report design template for execution.
abstract  int getTemplateForExecution(TemplateRef templateRef, java.io.File outputFile, ProgressReporter progressReporter)
          Returns the specified report design template for execution.
abstract  RevisionInfo[] getTemplateHistory(TemplateRef templateRef)
          Returns the revision history for the specified template.
abstract  TemplateProperties getTemplateProperties(TemplateRef templateRef)
          Returns the properties for the specified report design template
abstract  TemplateRef[] getTemplatesForBinary(BinaryRef binaryRef)
          Returns a TemplateRef array for templates which refer to the specified binary file
 java.lang.String getUsername()
          Returns the current logged in username, if any
abstract  boolean isSecurityEnabled()
          Returns true if security is enabled on the server.
 void login(java.lang.String username, java.lang.String password)
          Login into the report repository on the local machine.
 void login(java.lang.String servername, java.lang.String username, java.lang.String password)
          Login into the report repository on the specified server.
abstract  void logout()
          Logs out of the report repository.
abstract  void modifyBinaryOptions(BinaryRef binaryRef, FileOptions fileOptions)
          Modifies the options for the specified report binary.
abstract  void modifyFolderOptions(FolderRef folderRef, FolderOptions folderOptions)
          Modify the options for a folder.
abstract  void modifyOutputOptions(OutputRef outputRef, OutputOptions outputOptions)
          Modifies the options for the specified report output.
abstract  void modifyTemplateOptions(TemplateRef templateRef, FileOptions fileOptions)
          Modifies the options for the specified report design template.
abstract  BinaryRef moveBinary(BinaryRef binaryRef, FolderRef destinationFolderRef)
          Move the specified binary
abstract  FolderRef moveFolder(FolderRef folderRef, FolderRef destinationFolderRef)
          Move the specified folder
abstract  OutputRef moveOutput(OutputRef outputRef, FolderRef destinationFolderRef)
          Move the specified report output
abstract  TemplateRef moveTemplate(TemplateRef templateRef, FolderRef destinationFolderRef)
          Move the specified report design template
static java.util.Properties readProperties(java.util.Properties defaultProperties)
          Read the repository properties file.
abstract  BinaryRef renameBinary(BinaryRef binaryRef, java.lang.String newFilename)
          Rename the specified binary
abstract  FolderRef renameFolder(FolderRef folderRef, java.lang.String newFolderName)
          Rename the specified folder
abstract  OutputRef renameOutput(OutputRef outputRef, java.lang.String newFilename)
          Rename the specified report output
abstract  TemplateRef renameTemplate(TemplateRef templateRef, java.lang.String newFilename)
          Rename the specified report design template
static void setLogging(boolean enableLogging)
          Enables client side logging
static void writeProperties(java.util.Properties properties)
          Write the repository properties file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GLOBAL_PROPERTY_SERVER_PORT

public static final java.lang.String GLOBAL_PROPERTY_SERVER_PORT
key string for JNDI server port number

GLOBAL_PROPERTY_RETRY_LIMIT

public static final java.lang.String GLOBAL_PROPERTY_RETRY_LIMIT
key string for retry limit

GLOBAL_PROPERTY_RETRY_DELAY

public static final java.lang.String GLOBAL_PROPERTY_RETRY_DELAY
key string for retry delay

GLOBAL_PROPERTY_LOGGING

public static final java.lang.String GLOBAL_PROPERTY_LOGGING
key string for logging flag

GLOBAL_PROPERTY_BLOB_BUFFER_BYTE_LENGTH

public static final java.lang.String GLOBAL_PROPERTY_BLOB_BUFFER_BYTE_LENGTH
key string for BLOB buffer limit

PROPERTIES_FILENAME

public static final java.lang.String PROPERTIES_FILENAME
the report repository properties filename
Constructor Detail

ReportRepository

public ReportRepository()
construct a report repository with no specified properties

ReportRepository

public ReportRepository(java.util.Properties properties)
construct a report repository with the specified properties
Parameters:
Properties - object for this repository
Method Detail

createRepository

public static ReportRepository createRepository(java.lang.String vendor)
                                         throws InvalidParameterException
Create a report repository for the specified vendor. To handle differences between J2EE server vendors, we create a vendor specific class to handle all interaction with the Dynalivery Report Repository. This method allows the server port value to be overriden
Parameters:
vendor - application server vendor String
Returns:
reference to ReportRepository that was created

createRepository

public static ReportRepository createRepository(java.lang.String vendor,
                                                java.lang.String port)
                                         throws InvalidParameterException
Create a report repository for the specified vendor. To handle differences between J2EE server vendors, we create a vendor specific class to handle all interaction with the Dynalivery Report Repository. This method allows the server port value to be overriden
Parameters:
vendor - application server vendor String
port - application server port String to override properties
Returns:
reference to ReportRepository that was created

createRepository

public static ReportRepository createRepository(java.lang.String vendor,
                                                java.util.Properties properties)
                                         throws InvalidParameterException
Create a report repository for the specified vendor. To handle differences between J2EE server vendors, we create a vendor specific class to handle all interaction with the Dynalivery Report Repository.
Parameters:
vendor - application server vendor String
properties - the repository properties
Returns:
reference to ReportRepository that was created

login

public final void login(java.lang.String servername,
                        java.lang.String username,
                        java.lang.String password)
                 throws InvalidParameterException,
                        AuthenticationException,
                        RepositorySecurityException,
                        UnexpectedServerException,
                        ServerUnavailableException
Login into the report repository on the specified server.
Parameters:
servername - the hostname string of the report repository server
username - the username string for the current user
password - the password string for the current user in clear text
Throws:
com.dynalivery.repository.AuthenticationException - thrown if username/password is invalid
com.dynalivery.repository.ServerUnavailableException - thrown if specified server is not available
com.dynalivery.repository.RepositorySecurityException - thrown if the specified user is not granted access to the report repository
InvalidParameterException - thrown if any of the parameters to this method are invalid

login

public final void login(java.lang.String username,
                        java.lang.String password)
                 throws AuthenticationException,
                        RepositorySecurityException,
                        ServerUnavailableException,
                        InvalidParameterException
Login into the report repository on the local machine.
Parameters:
username - the username string for the current user
password - the password string for the current user in clear text
Throws:
com.dynalivery.repository.AuthenticationException - thrown if username/password is invalid
com.dynalivery.repository.ServerUnavailableException - thrown if specified server is not available
com.dynalivery.repository.RepositorySecurityException - thrown if the specified user is not granted access to the report repository
InvalidParameterException - thrown if any of the parameters to this method are invalid

logout

public abstract void logout()
Logs out of the report repository. May only be needed if GUI tools want to support re-logging in under a different username/password.

getAllTopLevelFolders

public abstract FolderRef[] getAllTopLevelFolders()
Returns a FolderRef array of all top-level folders in the repository
Returns:
a FolderRef array of all top-level folders in the repository

getAllNestedFolders

public abstract FolderRef[] getAllNestedFolders(FolderRef folderRef)
                                         throws RepositorySecurityException,
                                                InvalidPathnameException
Returns a FolderRef array of all nested folders in the specified folder
Parameters:
folderRef - the repository folder reference
Returns:
a FolderRef array of all nested folders in the specified folder
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the folder is invalid

createFolder

public abstract FolderRef createFolder(java.lang.String pathname,
                                       FolderOptions folderOptions)
                                throws RepositorySecurityException,
                                       DuplicateObjectException,
                                       InvalidPathnameException,
                                       InvalidParameterException
Creates a new repository folder
Parameters:
pathname - the repository pathname for the folder to be created
folderOptions - the FolderOptions object which describes the new folder to be created
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the folder is invalid
DuplicateObjectException - thrown if folder already exists
InvalidParameterException - thrown if any of the parameters to this method are invalid

createFolder

public abstract FolderRef createFolder(FolderRef parentFolderRef,
                                       java.lang.String folderName,
                                       FolderOptions folderOptions)
                                throws RepositorySecurityException,
                                       DuplicateObjectException,
                                       InvalidPathnameException,
                                       InvalidParameterException
Creates a new repository folder
Parameters:
parentFolderRef - the parent FolderRef if not a top-level folder
folderName - the folder name String
folderOptions - the FolderOptions object which describes the new folder to be created
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the folder is invalid
DuplicateObjectException - thrown if folder already exists
InvalidParameterException - thrown if any of the parameters to this method are invalid

deleteFolder

public void deleteFolder(FolderRef folderRef)
                  throws RepositorySecurityException,
                         InvalidPathnameException,
                         PinnedFileException
Delete a folder and all associated files.
Parameters:
folderRef - the repository folder reference
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the folder is invalid
PinnedFileException - thrown if binary is referenced by one or more templates

deleteFolder

public abstract void deleteFolder(FolderRef folderRef,
                                  ProgressReporter progressReporter)
                           throws OperationCanceledException,
                                  RepositorySecurityException,
                                  InvalidPathnameException,
                                  PinnedFileException
Delete a folder and all associated files.
Parameters:
folderRef - the repository folder reference
progressReporter - an optional ProgressReporter object to report the operation progress
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the folder is invalid
PinnedFileException - thrown if binary is referenced by one or more templates
OperationCanceledException - thrown if the operation is canceled via the ProgressReporter

deleteMultiple

public abstract void deleteMultiple(RepositoryRef[] refs,
                                    ProgressReporter progressReporter)
                             throws OperationCanceledException,
                                    RepositorySecurityException,
                                    InvalidPathnameException,
                                    PinnedFileException
Delete multiple folders and/or files in one operation.
Parameters:
refs - the RepositoryRef array of repository object references
progressReporter - an optional ProgressReporter object to report the operation progress
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to any of the objects is invalid
PinnedFileException - thrown if binary is referenced by one or more templates
OperationCanceledException - thrown if the operation is canceled via the ProgressReporter

deleteMultiple

public void deleteMultiple(RepositoryRef[] refs)
                    throws RepositorySecurityException,
                           InvalidPathnameException,
                           PinnedFileException
Delete multiple folders and/or files in one operation.
Parameters:
refs - the RepositoryRef array of repository object references
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to any of the objects is invalid
PinnedFileException - thrown if binary is referenced by one or more templates

folderExists

public abstract boolean folderExists(FolderRef folderRef)
                              throws RepositorySecurityException
Tests if folder exists
Parameters:
folderRef - the repository folder reference
Returns:
true if folder exists false otherwise
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation

getFolderProperties

public abstract FolderProperties getFolderProperties(FolderRef folderRef)
                                              throws RepositorySecurityException,
                                                     InvalidPathnameException
Get the properties for a folder
Parameters:
folderRef - the repository folder reference
Returns:
the FolderProperties object for the specified folder
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the folder is invalid

modifyFolderOptions

public abstract void modifyFolderOptions(FolderRef folderRef,
                                         FolderOptions folderOptions)
                                  throws RepositorySecurityException,
                                         InvalidPathnameException,
                                         InvalidParameterException
Modify the options for a folder.
Parameters:
folderRef - the repository folder reference
folderOptions - the modified FolderOptions for the folder
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if path to folder is invalid
InvalidParameterException - thrown if any of the parameters to this method are invalid

moveFolder

public abstract FolderRef moveFolder(FolderRef folderRef,
                                     FolderRef destinationFolderRef)
                              throws RepositorySecurityException,
                                     DuplicateObjectException,
                                     InvalidPathnameException,
                                     InvalidOperationException
Move the specified folder
Parameters:
folderRef - the repository folder reference
destinationFolderRef - the folder to receive the specified folder
Returns:
the updated folder reference
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the folder or destination is invalid
InvalidOperationException - thrown if illegal move requested (parent->descendant)
DuplicateObjectException - thrown if a folder with same name already exists

renameFolder

public abstract FolderRef renameFolder(FolderRef folderRef,
                                       java.lang.String newFolderName)
                                throws RepositorySecurityException,
                                       DuplicateObjectException,
                                       InvalidPathnameException,
                                       InvalidParameterException
Rename the specified folder
Parameters:
folderRef - the repository folder reference
newFolderName - the new folder name String
Returns:
the updated folder reference
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the folder is invalid
InvalidParameterException - thrown if new folder name is invalid
DuplicateObjectException - thrown if a folder with same name already exists

getNestedTemplates

public abstract TemplateRef[] getNestedTemplates(FolderRef folderRef)
                                          throws RepositorySecurityException,
                                                 InvalidPathnameException
Returns a TemplateRef array for all report design templates in the specified folder.
Parameters:
folderRef - the repository folder reference
Returns:
a TemplateRef array for all report design templates in the specified folder
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the folder is invalid

checkinTemplate

public abstract TemplateRef checkinTemplate(TemplateRef templateRef,
                                            byte[] templateByteArray,
                                            FileOptions fileOptions,
                                            java.lang.String comment,
                                            boolean validate,
                                            boolean alwaysOverwrite,
                                            boolean createFolders)
                                     throws RepositorySecurityException,
                                            NotCheckedOutException,
                                            ValidationException,
                                            MissingParentException,
                                            InvalidPathnameException,
                                            InvalidParameterException
Checkin a report design template into the repository.
Parameters:
templateRef - the TemplateRef object which uniquely identifies the report template
templateByteArray - entire design template in a byte array
fileOptions - the FileOptions for this template, optional on subsequent checkins
comment - optional comment string describing this checkin
validate - true if template should be validated first
alwaysOverwrite - true if template should be overwritten when even validation fails
createFolders - if true, any missing folders in the pathname will be created
Returns:
TemplateRef for checked in file
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
NotCheckedOutException - thrown if template exists but is not checked out to this user
ValidationException - thrown if validation fails
MissingParentException - thrown if parent is not found in the repository
InvalidPathnameException - thrown if the path to the template is invalid
InvalidParameterException - thrown if any of the parameters to this method are invalid

checkinTemplate

public abstract TemplateRef checkinTemplate(TemplateRef templateRef,
                                            java.io.File templateFile,
                                            FileOptions fileOptions,
                                            java.lang.String comment,
                                            boolean validate,
                                            boolean alwaysOverwrite,
                                            boolean createFolders,
                                            ProgressReporter progressReporter)
                                     throws OperationCanceledException,
                                            java.io.IOException,
                                            ValidationException,
                                            MissingParentException,
                                            NotCheckedOutException,
                                            RepositorySecurityException,
                                            InvalidPathnameException,
                                            InvalidParameterException
Checkin a report design template into the repository.
Parameters:
templateRef - the TemplateRef object which uniquely identifies the report template
templateFile - the report template File
fileOptions - the FileOptions for this template
comment - optional comment string describing this checkin
validate - true if template should be validated first
alwaysOverwrite - true if template should be overwritten when even validation fails
createFolders - if true, any missing folders in the pathname will be created
progressReporter - an optional ProgressReporter object to report the operation progress
Returns:
TemplateRef for checked in file
Throws:
java.io.IOException - thrown if there is a problem opening or reading from the specified file
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
NotCheckedOutException - thrown if template exists but is not checked out to this user
ValidationException - thrown if validation fails
MissingParentException - thrown if parent is not found in the repository
InvalidPathnameException - thrown if the path to the template is invalid
InvalidParameterException - thrown if any of the parameters to this method are invalid
OperationCanceledException - thrown if the operation is canceled via the ProgressReporter

checkinTemplate

public TemplateRef checkinTemplate(TemplateRef templateRef,
                                   java.io.File templateFile,
                                   FileOptions fileOptions,
                                   java.lang.String comment,
                                   boolean validate,
                                   boolean alwaysOverwrite,
                                   boolean createFolders)
                            throws java.io.IOException,
                                   ValidationException,
                                   MissingParentException,
                                   NotCheckedOutException,
                                   RepositorySecurityException,
                                   InvalidPathnameException,
                                   InvalidParameterException
Checkin a report design template into the repository.
Parameters:
templateRef - the TemplateRef object which uniquely identifies the report template
templateFile - the report template File
fileOptions - the FileOptions for this template
comment - optional comment string describing this checkin
validate - true if template should be validated first
alwaysOverwrite - true if template should be overwritten when even validation fails
createFolders - if true, any missing folders in the pathname will be created
Returns:
TemplateRef for checked in file
Throws:
java.io.IOException - thrown if there is a problem opening or reading from the specified file
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
NotCheckedOutException - thrown if template exists but is not checked out to this user
ValidationException - thrown if validation fails
MissingParentException - thrown if parent is not found in the repository
InvalidPathnameException - thrown if the path to the template is invalid
InvalidParameterException - thrown if any of the parameters to this method are invalid

checkoutTemplate

public abstract byte[] checkoutTemplate(TemplateRef templateRef)
                                 throws IncompleteBLOBException,
                                        RepositorySecurityException,
                                        InvalidPathnameException,
                                        AlreadyCheckedOutException
Returns the specified report design template and marks it as checked out by the current user.
Parameters:
templateRef - the TemplateRef object which uniquely identifies the report template
Returns:
the report design template as a byte array
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the template is invalid
AlreadyCheckedOutException - thrown if file is already checked out by another user
IncompleteBLOBException - thrown if last checkin to this file was incomplete

checkoutTemplate

public abstract int checkoutTemplate(TemplateRef templateRef,
                                     java.io.File outputFile,
                                     ProgressReporter progressReporter)
                              throws OperationCanceledException,
                                     java.io.IOException,
                                     IncompleteBLOBException,
                                     RepositorySecurityException,
                                     InvalidPathnameException,
                                     AlreadyCheckedOutException
Returns the specified report design template and marks it as checked out by the current user.
Parameters:
templateRef - the TemplateRef object which uniquely identifies the report template
outputFile - the File to which the data should be written
progressReporter - an optional ProgressReporter object to report the operation progress
Returns:
the total integer byte length of the output file
Throws:
java.io.IOException - thrown if there is a problem opening or writing to the specified file
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the template is invalid
AlreadyCheckedOutException - thrown if file is already checked out by another user
IncompleteBLOBException - thrown if last checkin to this file was incomplete
OperationCanceledException - thrown if the operation is canceled via the ProgressReporter

checkoutTemplate

public int checkoutTemplate(TemplateRef templateRef,
                            java.io.File outputFile)
                     throws java.io.IOException,
                            IncompleteBLOBException,
                            RepositorySecurityException,
                            InvalidPathnameException,
                            AlreadyCheckedOutException
Returns the specified report design template and marks it as checked out by the current user.
Parameters:
templateRef - the TemplateRef object which uniquely identifies the report template
outputFile - the File to which the data should be written
Returns:
the total integer byte length of the output file
Throws:
java.io.IOException - thrown if there is a problem opening or writing to the specified file
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the template is invalid
AlreadyCheckedOutException - thrown if file is already checked out by another user
IncompleteBLOBException - thrown if last checkin to this file was incomplete

getAncestorTemplates

public abstract TemplateRef[] getAncestorTemplates(TemplateRef templateRef)
                                            throws RepositorySecurityException,
                                                   InvalidPathnameException
Returns the ancestors of the specified template
Parameters:
templateRef - the TemplateRef object which uniquely identifies the report template
Returns:
a TemplateRef array for the templates that the specified template derives from
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the template is invalid

getTemplate

public abstract byte[] getTemplate(TemplateRef templateRef)
                            throws IncompleteBLOBException,
                                   RepositorySecurityException,
                                   InvalidPathnameException
Returns the specified report design template
Parameters:
templateRef - the TemplateRef object which uniquely identifies the report template
Returns:
the report design template as a byte array
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the template is invalid
IncompleteBLOBException - thrown if last checkin to this file was incomplete

getTemplate

public abstract int getTemplate(TemplateRef templateRef,
                                java.io.File outputFile,
                                ProgressReporter progressReporter)
                         throws OperationCanceledException,
                                java.io.IOException,
                                IncompleteBLOBException,
                                RepositorySecurityException,
                                InvalidPathnameException
Returns the specified report design template
Parameters:
templateRef - the TemplateRef object which uniquely identifies the report template
outputFile - the File to which the data should be written
progressReporter - an optional ProgressReporter object to report the operation progress
Returns:
the total integer byte length of the output file
Throws:
java.io.IOException - thrown if there is a problem opening or writing to the specified file
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the template is invalid
IncompleteBLOBException - thrown if last checkin to this file was incomplete
OperationCanceledException - thrown if the operation is canceled via the ProgressReporter

getTemplate

public int getTemplate(TemplateRef templateRef,
                       java.io.File outputFile)
                throws java.io.IOException,
                       IncompleteBLOBException,
                       RepositorySecurityException,
                       InvalidPathnameException
Returns the specified report design template
Parameters:
templateRef - the TemplateRef object which uniquely identifies the report template
outputFile - the File to which the data should be written
Returns:
the total integer byte length of the output file
Throws:
java.io.IOException - thrown if there is a problem opening or writing to the specified file
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the template is invalid
IncompleteBLOBException - thrown if last checkin to this file was incomplete

getTemplateForExecution

public abstract byte[] getTemplateForExecution(TemplateRef templateRef)
                                        throws IncompleteBLOBException,
                                               RepositorySecurityException,
                                               InvalidPathnameException
Returns the specified report design template for execution.
Parameters:
templateRef - the TemplateRef object which uniquely identifies the report template
Returns:
the report design template as a byte array
Throws:
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the template is invalid
IncompleteBLOBException - thrown if last checkin to this file was incomplete

getTemplateForExecution

public abstract int getTemplateForExecution(TemplateRef templateRef,
                                            java.io.File outputFile,
                                            ProgressReporter progressReporter)
                                     throws OperationCanceledException,
                                            java.io.IOException,
                                            IncompleteBLOBException,
                                            RepositorySecurityException,
                                            InvalidPathnameException
Returns the specified report design template for execution.
Parameters:
templateRef - the TemplateRef object which uniquely identifies the report template
outputFile - the File to which the data should be written
progressReporter - an optional ProgressReporter object to report the operation progress
Returns:
the total integer byte length of the output file
Throws:
java.io.IOException - thrown if there is a problem opening or writing to the specified file
RepositorySecurityException - thrown if current user is not granted the authority to perform this operation
InvalidPathnameException - thrown if the path to the template is invalid
IncompleteBLOBException - thrown if last checkin to this file was incomplete
OperationCanceledException - thrown if the operation is canceled via the ProgressReporter