|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.dynalivery.repository.util.ReportRepository
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 |
public static final java.lang.String GLOBAL_PROPERTY_SERVER_PORT
public static final java.lang.String GLOBAL_PROPERTY_RETRY_LIMIT
public static final java.lang.String GLOBAL_PROPERTY_RETRY_DELAY
public static final java.lang.String GLOBAL_PROPERTY_LOGGING
public static final java.lang.String GLOBAL_PROPERTY_BLOB_BUFFER_BYTE_LENGTH
public static final java.lang.String PROPERTIES_FILENAME
| Constructor Detail |
public ReportRepository()
public ReportRepository(java.util.Properties properties)
Properties - object for this repository| Method Detail |
public static ReportRepository createRepository(java.lang.String vendor)
throws InvalidParameterException
vendor - application server vendor String
public static ReportRepository createRepository(java.lang.String vendor,
java.lang.String port)
throws InvalidParameterException
vendor - application server vendor Stringport - application server port String to override properties
public static ReportRepository createRepository(java.lang.String vendor,
java.util.Properties properties)
throws InvalidParameterException
vendor - application server vendor Stringproperties - the repository properties
public final void login(java.lang.String servername,
java.lang.String username,
java.lang.String password)
throws InvalidParameterException,
AuthenticationException,
RepositorySecurityException,
UnexpectedServerException,
ServerUnavailableException
servername - the hostname string of the report repository serverusername - the username string for the current userpassword - the password string for the current user in clear text
public final void login(java.lang.String username,
java.lang.String password)
throws AuthenticationException,
RepositorySecurityException,
ServerUnavailableException,
InvalidParameterException
username - the username string for the current userpassword - the password string for the current user in clear textpublic abstract void logout()
public abstract FolderRef[] getAllTopLevelFolders()
public abstract FolderRef[] getAllNestedFolders(FolderRef folderRef)
throws RepositorySecurityException,
InvalidPathnameException
folderRef - the repository folder reference
public abstract FolderRef createFolder(java.lang.String pathname,
FolderOptions folderOptions)
throws RepositorySecurityException,
DuplicateObjectException,
InvalidPathnameException,
InvalidParameterException
pathname - the repository pathname for the folder to be createdfolderOptions - the FolderOptions object which describes the new folder to be created
public abstract FolderRef createFolder(FolderRef parentFolderRef,
java.lang.String folderName,
FolderOptions folderOptions)
throws RepositorySecurityException,
DuplicateObjectException,
InvalidPathnameException,
InvalidParameterException
parentFolderRef - the parent FolderRef if not a top-level folderfolderName - the folder name StringfolderOptions - the FolderOptions object which describes the new folder to be created
public void deleteFolder(FolderRef folderRef)
throws RepositorySecurityException,
InvalidPathnameException,
PinnedFileException
folderRef - the repository folder reference
public abstract void deleteFolder(FolderRef folderRef,
ProgressReporter progressReporter)
throws OperationCanceledException,
RepositorySecurityException,
InvalidPathnameException,
PinnedFileException
folderRef - the repository folder referenceprogressReporter - an optional ProgressReporter object to report the operation progress
public abstract void deleteMultiple(RepositoryRef[] refs,
ProgressReporter progressReporter)
throws OperationCanceledException,
RepositorySecurityException,
InvalidPathnameException,
PinnedFileException
refs - the RepositoryRef array of repository object referencesprogressReporter - an optional ProgressReporter object to report the operation progress
public void deleteMultiple(RepositoryRef[] refs)
throws RepositorySecurityException,
InvalidPathnameException,
PinnedFileException
refs - the RepositoryRef array of repository object references
public abstract boolean folderExists(FolderRef folderRef)
throws RepositorySecurityException
folderRef - the repository folder reference
public abstract FolderProperties getFolderProperties(FolderRef folderRef)
throws RepositorySecurityException,
InvalidPathnameException
folderRef - the repository folder reference
public abstract void modifyFolderOptions(FolderRef folderRef,
FolderOptions folderOptions)
throws RepositorySecurityException,
InvalidPathnameException,
InvalidParameterException
folderRef - the repository folder referencefolderOptions - the modified FolderOptions for the folder
public abstract FolderRef moveFolder(FolderRef folderRef,
FolderRef destinationFolderRef)
throws RepositorySecurityException,
DuplicateObjectException,
InvalidPathnameException,
InvalidOperationException
folderRef - the repository folder referencedestinationFolderRef - the folder to receive the specified folder
public abstract FolderRef renameFolder(FolderRef folderRef,
java.lang.String newFolderName)
throws RepositorySecurityException,
DuplicateObjectException,
InvalidPathnameException,
InvalidParameterException
folderRef - the repository folder referencenewFolderName - the new folder name String
public abstract TemplateRef[] getNestedTemplates(FolderRef folderRef)
throws RepositorySecurityException,
InvalidPathnameException
folderRef - the repository folder reference
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
templateRef - the TemplateRef object which uniquely identifies the report templatetemplateByteArray - entire design template in a byte arrayfileOptions - the FileOptions for this template, optional on subsequent checkinscomment - optional comment string describing this checkinvalidate - true if template should be validated firstalwaysOverwrite - true if template should be overwritten when even validation failscreateFolders - if true, any missing folders in the pathname will be created
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
templateRef - the TemplateRef object which uniquely identifies the report templatetemplateFile - the report template FilefileOptions - the FileOptions for this templatecomment - optional comment string describing this checkinvalidate - true if template should be validated firstalwaysOverwrite - true if template should be overwritten when even validation failscreateFolders - if true, any missing folders in the pathname will be createdprogressReporter - an optional ProgressReporter object to report the operation progress
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
templateRef - the TemplateRef object which uniquely identifies the report templatetemplateFile - the report template FilefileOptions - the FileOptions for this templatecomment - optional comment string describing this checkinvalidate - true if template should be validated firstalwaysOverwrite - true if template should be overwritten when even validation failscreateFolders - if true, any missing folders in the pathname will be created
public abstract byte[] checkoutTemplate(TemplateRef templateRef)
throws IncompleteBLOBException,
RepositorySecurityException,
InvalidPathnameException,
AlreadyCheckedOutException
templateRef - the TemplateRef object which uniquely identifies the report template
public abstract int checkoutTemplate(TemplateRef templateRef,
java.io.File outputFile,
ProgressReporter progressReporter)
throws OperationCanceledException,
java.io.IOException,
IncompleteBLOBException,
RepositorySecurityException,
InvalidPathnameException,
AlreadyCheckedOutException
templateRef - the TemplateRef object which uniquely identifies the report templateoutputFile - the File to which the data should be writtenprogressReporter - an optional ProgressReporter object to report the operation progress
public int checkoutTemplate(TemplateRef templateRef,
java.io.File outputFile)
throws java.io.IOException,
IncompleteBLOBException,
RepositorySecurityException,
InvalidPathnameException,
AlreadyCheckedOutException
templateRef - the TemplateRef object which uniquely identifies the report templateoutputFile - the File to which the data should be written
public abstract TemplateRef[] getAncestorTemplates(TemplateRef templateRef)
throws RepositorySecurityException,
InvalidPathnameException
templateRef - the TemplateRef object which uniquely identifies the report template
public abstract byte[] getTemplate(TemplateRef templateRef)
throws IncompleteBLOBException,
RepositorySecurityException,
InvalidPathnameException
templateRef - the TemplateRef object which uniquely identifies the report template
public abstract int getTemplate(TemplateRef templateRef,
java.io.File outputFile,
ProgressReporter progressReporter)
throws OperationCanceledException,
java.io.IOException,
IncompleteBLOBException,
RepositorySecurityException,
InvalidPathnameException
templateRef - the TemplateRef object which uniquely identifies the report templateoutputFile - the File to which the data should be writtenprogressReporter - an optional ProgressReporter object to report the operation progress
public int getTemplate(TemplateRef templateRef,
java.io.File outputFile)
throws java.io.IOException,
IncompleteBLOBException,
RepositorySecurityException,
InvalidPathnameException
templateRef - the TemplateRef object which uniquely identifies the report templateoutputFile - the File to which the data should be written
public abstract byte[] getTemplateForExecution(TemplateRef templateRef)
throws IncompleteBLOBException,
RepositorySecurityException,
InvalidPathnameException
templateRef - the TemplateRef object which uniquely identifies the report template
public abstract int getTemplateForExecution(TemplateRef templateRef,
java.io.File outputFile,
ProgressReporter progressReporter)
throws OperationCanceledException,
java.io.IOException,
IncompleteBLOBException,
RepositorySecurityException,
InvalidPathnameException
templateRef - the TemplateRef object which uniquely identifies the report templateoutputFile - the File to which the data should be writtenprogressReporter - an optional ProgressReporter object to report the operation progress