public class ReportAdminService extends AppService implements ReportAdminServiceRemote
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_VIEWERURL |
OUTPUT_FORMAT_HTML, OUTPUT_FORMAT_PDF, OUTPUT_FORMAT_XLS, OUTPUT_FORMAT_XLS_SPUDSOFT, OUTPUT_FORMAT_XLSX
APPLOGGER, CRONTASKLOGGER, CRONTASKMGRLOGGER, CRONTASKMGRSQLLOGGER, DBCONNECTIONLOGGER, DDLOGGER, DMLOGGER, EVENTLOGGER, EXCEPTIONLOGGER, MAILLOGGER, MAXIMOLOGGER, MTLOGGER, NULLMBOPOINTER, SECURITY, SENDFAILEDLOGGER, SERVICELOGGER, SQLLOGGER
appenderPrefix, LOGGERNAME_APP, LOGGERNAME_CRONTASK, LOGGERNAME_CRONTASKMGR, LOGGERNAME_DBCONNECTION, LOGGERNAME_DD, LOGGERNAME_DM, LOGGERNAME_DMPREVIEW, LOGGERNAME_EVENT, LOGGERNAME_EXCEPTION, LOGGERNAME_MAIL, LOGGERNAME_MAXIMO, LOGGERNAME_MT, LOGGERNAME_NULLMBOPOINTER, LOGGERNAME_SECURITY, LOGGERNAME_SENDFAILED, LOGGERNAME_SERVICE, LOGGERNAME_SQL, LOGGERNAME_SQL_CRONTASKMGR, LOGGERNAME_TXN, loggerPrefix
Constructor and Description |
---|
ReportAdminService(MXServer mxServer)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.Long |
addActiveThread(java.lang.String threadName,
java.lang.String reportName,
java.lang.String appName,
java.lang.String userName,
boolean scheduledJob)
Adds active thread information to the list of actively
running report threads.
|
void |
cancelReportJob(long reportJobId)
Cancels a report job identified by the reportJobId
|
void |
cancelReportJobOnThisServer(long reportJobId)
Cancels a report job identified by the reportJobId on this instance only
|
void |
cleanupReportResources(ReportRunInfo reportRunInfo)
Removes all the temporary files created as part of the
prepareReportForRun method call.
|
static java.lang.String |
createBROSUniqueTempFolder(java.lang.String parentFolderName) |
void |
createReportDesign(UserInfo userInfo,
CreateReportInputInfo reportInputInfo)
Creates a report based on the input provided.
|
void |
createReportUsageLog(UserInfo userInfo,
ReportUsageLogInfo usageLogInfo)
Creates a report usage log entry based on the information provided.
|
byte[] |
createResourcesZip(java.io.File[] files) |
static java.lang.String |
createUniqueTempFolder(java.lang.String parentFolderName) |
void |
destroy()
If the Report Queue Manager Task is available, marks the
task to shutdown and makes it available.
|
java.lang.String |
exportLibraryImportInputInfo(UserInfo userInfo,
java.lang.String reportName)
Exports the information to be used as input to import the report library in XML format.
|
byte[] |
exportReport(UserInfo userInfo,
java.lang.String reportName,
java.lang.String appName)
Exports the report design and all resources.
|
java.lang.String |
exportReportImportInputInfo(UserInfo userInfo,
java.lang.String reportName,
java.lang.String appName)
Exports the information to be used as input to import the report in XML format.
|
byte[] |
exportReportLibrary(UserInfo userInfo,
java.lang.String reportName)
Exports the report library design and all resources.
|
void |
exportTransientQBRContent(java.lang.String brosId,
MXSession session) |
void |
extractResourcesFromByteArray(java.io.ByteArrayInputStream resources,
java.lang.String outputFolder) |
java.lang.String |
getDateFormat(UserInfo userInfo) |
java.lang.String |
getDateTimeFormat(UserInfo userInfo) |
java.lang.String |
getDateTimeFormat(UserInfo userInfo,
java.lang.String objectName,
java.lang.String attributeName) |
java.lang.String |
getDecimalFormat(UserInfo userInfo,
int fractionDigits) |
java.lang.String |
getExportReportFolder(UserInfo userInfo,
java.lang.String reportName,
java.lang.String appName)
Returns the folder name to be used to export the report.
|
byte[] |
getFileContent(java.lang.String fileName) |
java.lang.String |
getNumberFormat(UserInfo userInfo) |
java.lang.String |
getNumberFormat(UserInfo userInfo,
java.lang.String objectName,
java.lang.String attributeName) |
MboRemote |
getReport(UserInfo userInfo,
java.lang.String reportName,
java.lang.String appName)
Given the userInfo, reportName, and appName, return the report instance.
|
int |
getReportEngineState()
Returns the state of the report engine based on current activity and
the max concurrent reports setting.
|
java.util.ArrayList<java.lang.String> |
getReportLibraryNameList(UserInfo userInfo)
Returns a list of the report library names.
|
java.util.TreeMap<java.lang.String,java.util.List> |
getReportNameList(UserInfo userInfo)
Returns list of report names.
|
java.util.TreeMap<java.lang.String,java.util.List> |
getReportNameList(UserInfo userInfo,
int reportType)
Returns list of report names.
|
java.lang.String |
getReportViewerURL()
Returns the report viewer URL.
|
java.lang.String |
getTimeFormat(UserInfo userInfo) |
MboSetRemote |
getTransientQBRParamsMboSet(java.lang.String brosId,
MXSession session) |
void |
importReport(UserInfo userInfo,
ReportImportInfo reportImportInfo,
boolean fromUI)
Imports the report information into appropriate tables in the database.
|
void |
importReportLibrary(UserInfo userInfo,
ReportImportInfo reportImportInfo)
Imports the report library information into appropriate tables in the database.
|
void |
init()
Initializes the Report Queue Manager Task.
|
boolean |
isAuthorizedToRunReport(UserInfo userInfo,
java.lang.String reportName,
java.lang.String appName)
Returns whether the report is authorized for run or not.
|
boolean |
isOverloaded()
Returns whether the report engine is overloaded or not
(as set by the max concurrent reports setting).
|
boolean |
isReportJobCancelled(long reportJobId)
Returns true if the request report job is canceled, otherwise false.
|
ReportRunInfo |
prepareReportDesignForRun(UserInfo userInfo,
java.lang.String reportName,
boolean extractAll)
Prepares the report for run.
|
ReportRunInfo |
prepareReportDesignForRun(UserInfo userInfo,
java.lang.String reportName,
boolean extractAll,
boolean forExport)
Prepares the report for run.
|
ReportRunInfo |
prepareReportForRun(UserInfo userInfo,
java.lang.String reportName,
java.lang.String appName)
Prepares a report for run.
|
ReportRunInfo |
prepareReportLibraryForExport(UserInfo userInfo,
java.lang.String reportName)
Prepares the report library for export.
|
void |
removeActiveThread(java.lang.String threadName)
Removes the active thread information from the list of actively
running report threads.
|
void |
removeBROSReport(java.lang.String brosId) |
void |
renewActiveThread(java.lang.String threadName)
Renews the lease information on the active thread.
|
byte[] |
runReport(UserInfo userInfo,
java.lang.String reportName,
java.lang.String appName,
ReportParameterData parameterData,
java.lang.String outputFileName,
java.lang.String outputFormat)
Executes the report and returns the report output in the appropriate
format.
|
byte[] |
runReport(UserInfo userInfo,
java.lang.String reportName,
java.lang.String appName,
ReportParameterData parameterData,
java.lang.String outputFileName,
java.lang.String outputFormat,
java.util.Map<java.lang.String,java.lang.Object> additionalInfoMap)
Executes the report and returns the report output in the appropriate
format.
|
byte[] |
runReport(UserInfo userInfo,
java.lang.String reportName,
java.lang.String appName,
ReportParameterData parameterData,
java.lang.String outputFileName,
java.lang.String outputFormat,
java.util.Map<java.lang.String,java.lang.Object> additionalInfoMap,
boolean scheduled)
Executes the report and returns the report output in the appropriate
format.
|
byte[] |
runReportInImmediateMode(UserInfo userInfo,
java.lang.String reportName,
java.lang.String appName,
ReportParameterData parameterData,
java.lang.String outputFileName,
java.lang.String outputFormat)
Executes the report and returns the report output in the appropriate
format.
|
byte[] |
runReportInImmediateMode(UserInfo userInfo,
java.lang.String reportName,
java.lang.String appName,
ReportParameterData parameterData,
java.lang.String outputFileName,
java.lang.String outputFormat,
java.util.Map<java.lang.String,java.lang.Object> additionalInfoMap)
Executes the report and returns the report output in the appropriate
format.
|
void |
sendEmail(MXLogger logger,
UserInfo userInfo,
java.lang.String templateID,
java.lang.String[] to,
java.lang.String from,
MboRemote report,
TextReplacement replacer)
Sends and email using the given Comm Template Id for the provided userInfo and scheduled report instance.
|
void |
startBatchReportImport()
Import all reports which are not already imported.
|
byte[] |
updateReportDesign(UserInfo userInfo,
java.lang.String reportName,
java.lang.String appName,
boolean saveChanges)
Updates the report design with all identified fixes.
|
byte[] |
updateReportDesign(UserInfo userInfo,
java.lang.String reportName,
java.lang.String appName,
boolean saveChanges,
java.lang.String updateType)
Updates the report design with the identified fix, or all fixes if no update type
is provided.
|
checkSecurity, configure, freeDBConnection, freeMboSet, getCriteria, getCurrentState, getDBConnection, getLiveObjCount, getLoad, getMaximoDD, getMaxVar, getMboSet, getMXServer, getName, getProfile, getProxy, getSchemaOwner, getServiceInfo, getServiceLogger, getSetForRelationship, getSetFromKeys, getStateCmdList, getStateList, getURL, initCriteriaList, isAppService, isRunning, isSingletonService, restart, setProxy, setRunning, setURL, verifyUser, verifyUser
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkSecurity, getCriteria, getCurrentState, getLiveObjCount, getMboSet, getName, getSchemaOwner, getSetForRelationship, getSetFromKeys, getStateCmdList, getStateList, getURL, verifyUser, verifyUser
isAppService, isSingletonService, restart
public static final java.lang.String PROPERTY_VIEWERURL
public ReportAdminService(MXServer mxServer) throws java.rmi.RemoteException
mxServer
- java.rmi.RemoteException
public void init()
init
in interface Service
init
in class AppService
Service
public void startBatchReportImport() throws java.rmi.RemoteException
startBatchReportImport
in interface ReportAdminServiceRemote
java.rmi.RemoteException
public void destroy()
destroy
in interface Service
destroy
in class AppService
Service
public byte[] updateReportDesign(UserInfo userInfo, java.lang.String reportName, java.lang.String appName, boolean saveChanges) throws MXException, java.rmi.RemoteException
updateReportDesign
in interface ReportAdminServiceRemote
userInfo
- user informationreportName
- name of the reportappName
- application name that the report belongs tosaveChanges
- should the update design be saved to the reportdesign tableMXException
java.rmi.RemoteException
public byte[] updateReportDesign(UserInfo userInfo, java.lang.String reportName, java.lang.String appName, boolean saveChanges, java.lang.String updateType) throws MXException, java.rmi.RemoteException
updateReportDesign
in interface ReportAdminServiceRemote
userInfo
- user informationreportName
- name of the reportappName
- application name that the report belongs tosaveChanges
- should the update design be saved to the reportdesign tableupdateType
- the specific update to be applied, or all updates if nullMXException
java.rmi.RemoteException
public void importReport(UserInfo userInfo, ReportImportInfo reportImportInfo, boolean fromUI) throws MXException, java.rmi.RemoteException
importReport
in interface ReportAdminServiceRemote
userInfo
- user informationreportImportInfo
- report import information to be usedfromUI
- was this import initiated from the Report Administration application?MXException
java.rmi.RemoteException
public void importReportLibrary(UserInfo userInfo, ReportImportInfo reportImportInfo) throws MXException, java.rmi.RemoteException
importReportLibrary
in interface ReportAdminServiceRemote
userInfo
- user informationreportImportInfo
- report import information to be usedMXException
java.rmi.RemoteException
public ReportRunInfo prepareReportForRun(UserInfo userInfo, java.lang.String reportName, java.lang.String appName) throws MXException, java.rmi.RemoteException
prepareReportForRun
in interface ReportAdminServiceRemote
userInfo
- user informationreportName
- report nameappName
- application name that the report belongs toMXException
java.rmi.RemoteException
public void cleanupReportResources(ReportRunInfo reportRunInfo) throws MXException, java.rmi.RemoteException
cleanupReportResources
in interface ReportAdminServiceRemote
reportRunInfo
- report run informationMXException
java.rmi.RemoteException
public ReportRunInfo prepareReportLibraryForExport(UserInfo userInfo, java.lang.String reportName) throws MXException, java.rmi.RemoteException
userInfo
- reportName
- MXException
java.rmi.RemoteException
public ReportRunInfo prepareReportDesignForRun(UserInfo userInfo, java.lang.String reportName, boolean extractAll) throws MXException, java.rmi.RemoteException
userInfo
- reportName
- extractAll
- MXException
java.rmi.RemoteException
public ReportRunInfo prepareReportDesignForRun(UserInfo userInfo, java.lang.String reportName, boolean extractAll, boolean forExport) throws MXException, java.rmi.RemoteException
userInfo
- reportName
- extractAll
- forExport
- true if the report is being exported, false if it is being executedMXException
java.rmi.RemoteException
public static java.lang.String createUniqueTempFolder(java.lang.String parentFolderName)
public void extractResourcesFromByteArray(java.io.ByteArrayInputStream resources, java.lang.String outputFolder) throws java.io.IOException
java.io.IOException
public byte[] exportReport(UserInfo userInfo, java.lang.String reportName, java.lang.String appName) throws MXException, java.rmi.RemoteException
exportReport
in interface ReportAdminServiceRemote
userInfo
- user informationreportName
- report name to exportappName
- application name that the report belongs toMXException
java.rmi.RemoteException
public java.lang.String getExportReportFolder(UserInfo userInfo, java.lang.String reportName, java.lang.String appName) throws MXException, java.rmi.RemoteException
getExportReportFolder
in interface ReportAdminServiceRemote
userInfo
- user informationreportName
- report nameappName
- application name that the report belongs toMXException
java.rmi.RemoteException
public byte[] exportReportLibrary(UserInfo userInfo, java.lang.String reportName) throws MXException, java.rmi.RemoteException
exportReportLibrary
in interface ReportAdminServiceRemote
userInfo
- user informationreportName
- report library name to exportMXException
java.rmi.RemoteException
public java.util.ArrayList<java.lang.String> getReportLibraryNameList(UserInfo userInfo) throws MXException, java.rmi.RemoteException
getReportLibraryNameList
in interface ReportAdminServiceRemote
userInfo
- user informationMXException
java.rmi.RemoteException
public java.util.TreeMap<java.lang.String,java.util.List> getReportNameList(UserInfo userInfo) throws MXException, java.rmi.RemoteException
getReportNameList
in interface ReportAdminServiceRemote
userInfo
- user informationMXException
java.rmi.RemoteException
public java.util.TreeMap<java.lang.String,java.util.List> getReportNameList(UserInfo userInfo, int reportType) throws MXException, java.rmi.RemoteException
getReportNameList
in interface ReportAdminServiceRemote
userInfo
- user informationreportType
- the report type: REPORTTYPE_REPORT, REPORTTYPE_QBR, or REPORTTYPE_REPORT_AND_QBRMXException
java.rmi.RemoteException
public java.lang.String getDateFormat(UserInfo userInfo) throws java.lang.Exception
java.lang.Exception
public java.lang.String getTimeFormat(UserInfo userInfo) throws java.lang.Exception
java.lang.Exception
public java.lang.String getDateTimeFormat(UserInfo userInfo) throws java.lang.Exception
java.lang.Exception
public java.lang.String getDateTimeFormat(UserInfo userInfo, java.lang.String objectName, java.lang.String attributeName) throws java.lang.Exception
java.lang.Exception
public java.lang.String getNumberFormat(UserInfo userInfo) throws java.lang.Exception
java.lang.Exception
public java.lang.String getDecimalFormat(UserInfo userInfo, int fractionDigits) throws java.lang.Exception
java.lang.Exception
public java.lang.String getNumberFormat(UserInfo userInfo, java.lang.String objectName, java.lang.String attributeName) throws java.lang.Exception
java.lang.Exception
public byte[] runReportInImmediateMode(UserInfo userInfo, java.lang.String reportName, java.lang.String appName, ReportParameterData parameterData, java.lang.String outputFileName, java.lang.String outputFormat) throws MXException, java.rmi.RemoteException
runReportInImmediateMode
in interface ReportAdminServiceRemote
userInfo
- user informationreportName
- report nameappName
- application name that the report belongs toparameterData
- parameter data to be used for the reportoutputFileName
- output file nameoutputFormat
- output formatMXException
java.rmi.RemoteException
public byte[] runReportInImmediateMode(UserInfo userInfo, java.lang.String reportName, java.lang.String appName, ReportParameterData parameterData, java.lang.String outputFileName, java.lang.String outputFormat, java.util.Map<java.lang.String,java.lang.Object> additionalInfoMap) throws MXException, java.rmi.RemoteException
runReportInImmediateMode
in interface ReportAdminServiceRemote
userInfo
- user informationreportName
- report nameappName
- application name that the report belongs toparameterData
- parameter data to be used for the reportoutputFileName
- output file nameoutputFormat
- output formatadditionalInfoMap
- additional information to be passed to the report.MXException
java.rmi.RemoteException
public byte[] runReport(UserInfo userInfo, java.lang.String reportName, java.lang.String appName, ReportParameterData parameterData, java.lang.String outputFileName, java.lang.String outputFormat) throws MXException, java.rmi.RemoteException
runReport
in interface ReportAdminServiceRemote
userInfo
- user informationreportName
- report nameappName
- application name that the report belongs toparameterData
- parameter data to be used for the reportoutputFileName
- output file nameoutputFormat
- output format (OUTPUT_FORMAT_PDF or OUTPUT_FORMAT_HTML)MXException
java.rmi.RemoteException
public byte[] runReport(UserInfo userInfo, java.lang.String reportName, java.lang.String appName, ReportParameterData parameterData, java.lang.String outputFileName, java.lang.String outputFormat, java.util.Map<java.lang.String,java.lang.Object> additionalInfoMap) throws MXException, java.rmi.RemoteException
runReport
in interface ReportAdminServiceRemote
userInfo
- user informationreportName
- report nameappName
- application name that the report belongs toparameterData
- parameter data to be used for the reportoutputFileName
- output file nameoutputFormat
- output format (OUTPUT_FORMAT_PDF or OUTPUT_FORMAT_HTML)additionalInfoMap
- additional information to be passed to the report.MXException
java.rmi.RemoteException
public byte[] runReport(UserInfo userInfo, java.lang.String reportName, java.lang.String appName, ReportParameterData parameterData, java.lang.String outputFileName, java.lang.String outputFormat, java.util.Map<java.lang.String,java.lang.Object> additionalInfoMap, boolean scheduled) throws MXException, java.rmi.RemoteException
userInfo
- user informationreportName
- report nameappName
- application name that the report belongs toparameterData
- parameter data to be used for the reportoutputFileName
- output file nameoutputFormat
- output format (OUTPUT_FORMAT_PDF or OUTPUT_FORMAT_HTML)additionalInfoMap
- additional information to be passed to the report.MXException
java.rmi.RemoteException
public void createReportUsageLog(UserInfo userInfo, ReportUsageLogInfo usageLogInfo) throws MXException, java.rmi.RemoteException
createReportUsageLog
in interface ReportAdminServiceRemote
userInfo
- user informationusageLogInfo
- report usage log informationMXException
java.rmi.RemoteException
public boolean isOverloaded() throws MXException, java.rmi.RemoteException
isOverloaded
in interface ReportAdminServiceRemote
MXException
java.rmi.RemoteException
public int getReportEngineState() throws MXException, java.rmi.RemoteException
getReportEngineState
in interface ReportAdminServiceRemote
MXException
java.rmi.RemoteException
public java.lang.Long addActiveThread(java.lang.String threadName, java.lang.String reportName, java.lang.String appName, java.lang.String userName, boolean scheduledJob) throws MXException, java.rmi.RemoteException
addActiveThread
in interface ReportAdminServiceRemote
threadName
- name of the threadreportName
- report name being executed by the threadappName
- application name that the report belongs touserName
- user name (context in which the report is executed)scheduledJob
- a flag to indicate whether this is a scheduled job or not.MXException
java.rmi.RemoteException
public void removeActiveThread(java.lang.String threadName) throws MXException, java.rmi.RemoteException
removeActiveThread
in interface ReportAdminServiceRemote
threadName
- name of the thread.MXException
java.rmi.RemoteException
public void renewActiveThread(java.lang.String threadName) throws MXException, java.rmi.RemoteException
renewActiveThread
in interface ReportAdminServiceRemote
threadName
- name of the threadMXException
java.rmi.RemoteException
public java.lang.String exportReportImportInputInfo(UserInfo userInfo, java.lang.String reportName, java.lang.String appName) throws MXException, java.rmi.RemoteException
exportReportImportInputInfo
in interface ReportAdminServiceRemote
userInfo
- user informationreportName
- report nameappName
- application name that the report belongs toMXException
java.rmi.RemoteException
public java.lang.String exportLibraryImportInputInfo(UserInfo userInfo, java.lang.String reportName) throws MXException, java.rmi.RemoteException
exportLibraryImportInputInfo
in interface ReportAdminServiceRemote
userInfo
- user informationreportName
- report nameMXException
java.rmi.RemoteException
public void createReportDesign(UserInfo userInfo, CreateReportInputInfo reportInputInfo) throws MXException, java.rmi.RemoteException
createReportDesign
in interface ReportAdminServiceRemote
userInfo
- user informationreportInputInfo
- input to create the reportMXException
java.rmi.RemoteException
public byte[] getFileContent(java.lang.String fileName) throws java.io.IOException
java.io.IOException
public byte[] createResourcesZip(java.io.File[] files) throws java.lang.Exception
java.lang.Exception
public boolean isAuthorizedToRunReport(UserInfo userInfo, java.lang.String reportName, java.lang.String appName) throws MXException, java.rmi.RemoteException
isAuthorizedToRunReport
in interface ReportAdminServiceRemote
userInfo
- user informationreportName
- name of the reportappName
- application for which the report belongsMXException
java.rmi.RemoteException
public java.lang.String getReportViewerURL() throws MXException, java.rmi.RemoteException
getReportViewerURL
in interface ReportAdminServiceRemote
MXException
java.rmi.RemoteException
public void cancelReportJob(long reportJobId) throws MXException, java.rmi.RemoteException
cancelReportJob
in interface ReportAdminServiceRemote
reportJobId
- MXException
java.rmi.RemoteException
public void cancelReportJobOnThisServer(long reportJobId) throws MXException, java.rmi.RemoteException
cancelReportJobOnThisServer
in interface ReportAdminServiceRemote
reportJobId
- MXException
java.rmi.RemoteException
public boolean isReportJobCancelled(long reportJobId) throws MXException, java.rmi.RemoteException
isReportJobCancelled
in interface ReportAdminServiceRemote
reportJobId
- MXException
java.rmi.RemoteException
public void exportTransientQBRContent(java.lang.String brosId, MXSession session)
public MboSetRemote getTransientQBRParamsMboSet(java.lang.String brosId, MXSession session)
public void removeBROSReport(java.lang.String brosId) throws java.rmi.RemoteException, MXException
java.rmi.RemoteException
MXException
public static java.lang.String createBROSUniqueTempFolder(java.lang.String parentFolderName)
public void sendEmail(MXLogger logger, UserInfo userInfo, java.lang.String templateID, java.lang.String[] to, java.lang.String from, MboRemote report, TextReplacement replacer) throws java.rmi.RemoteException, MXException
sendEmail
in interface ReportAdminServiceRemote
logger
- logger to use for logging, can be null.userInfo
- templateID
- Comm Template Idto
- from
- report
- Scheduled Report Instancereplacer
- Optional TextReplacement
instancejava.rmi.RemoteException
MXException
public MboRemote getReport(UserInfo userInfo, java.lang.String reportName, java.lang.String appName) throws java.rmi.RemoteException, MXException
getReport
in interface ReportAdminServiceRemote
userInfo
- reportName
- appName
- java.rmi.RemoteException
MXException