Java Doc for ReportsManagerImpl.java in  » ERP-CRM-Financial » sakai » org » theospi » portfolio » reports » model » impl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » sakai » org.theospi.portfolio.reports.model.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.theospi.portfolio.reports.model.impl.ReportsManagerImpl

ReportsManagerImpl
public class ReportsManagerImpl extends HibernateDaoSupport implements ReportsManager,BeanFactoryAware(Code)
This class is a singleton that manages the reports on a general basis

When getting the reports a user can run this class checks the "osp.reports.useWarehouse" sakai.properties property. 0 is no reports. 1 is the warehouse reports. 2 is live data reports. and 3 is both warehouse and live data reports. The default is 1. The default report has a setting of operating on the warehouse.

The dataSource is for the data warehouse data source. If it is set then that source is used. If it is not set then the code tries to load in the data warehouse dataSource. It does this because that is the default dw dataSource. The data warehouse is not deployed then the dw dataSource won't exist. If it is referenced in the components.xml then there would be errors at startup. Thus we don't reference it there and programmatically pull it. This way it could be null (when dw is not deployed) and then the dataSource falls back to the sakai dataSource.

the sakai.properties property "osp.reports.forceColumnLabelUppercase" is used to standardize the column label. MySQL will keep the column titles exactly as specified in the query. Oracle on the other hand seems to make all the column labels uppercase. This makes writing a query and an xsl that works in both databases more difficult. This defaults to 1 (otherwise know as true) Set this property to 0 and the column titles will pass through like the old behavior
author:
   andersjb



Field Summary
protected  BeanFactorybeanFactory
    
public  ListdefinedDefintions
    


Method Summary
protected  booleancan(String function)
    
public  voidcheckEditAccess()
    
protected  voidcheckPermission(String function)
    
public  voidcheckReportAccess(String id, String ref)
    
public  voidcloseConnection(Connection connection)
     This closes the database connection if it was pulled from the data warehouse.
public  ReportcreateReport(ReportDefinition reportDefinition)
    
public  voidcreateReportParameters(Report report)
    
protected  StringcreateResource(ByteArrayOutputStream bos, String name, String description, String type)
    
public  voiddeleteReport(Report report, boolean deactivate)
    
public  voiddeleteReportDefXmlFile(ReportDefinition reportDef)
    
public  voiddeleteReportResult(ReportResult result)
    
public  voidexecute(JobExecutionContext jobExecutionContext)
    
protected  voidexecuteQuery(StringBuffer query, List reportParams, Report report, Element reportElement, ReportResult rr, ReportDefinition rd, boolean isFirstResult)
    
public  ReportDefinitionfindReportDefinition(String Id)
    
public  ReportResultgenerateResults(Report report)
    
public  StringgenerateSQLParameterValue(ReportParam reportParam)
     gathers the data for dropdown/list box.
public  AuthenticationManagergetAuthnManager()
    
public  MapgetAuthorizationsMap()
    
public  AuthorizationFacadegetAuthzManager()
    
public  BeanFactorygetBeanFactory()
    
public  ConnectiongetConnection(Boolean useWarehouse)
     This function generates the sql connection. If the dataSource connection fails then we want to fail over to the hibernate session connection.
public  ContentHostingServicegetContentHosting()
    
public  ReportResultgetCurrentResult()
    
public  ListgetCurrentUserResults()
    
public  DataSourcegetDataSource()
    
public  DataSourcegetDataSourceUseWarehouse(boolean useWarehouse)
    
public  ListgetDefinedDefintions()
    
public  BooleangetForceColumnLabelUppercase()
    
public  IdManagergetIdManager()
    
public  JobBeanWrappergetJobBeanWrapper()
    
public  org.theospi.portfolio.security.AuthorizationFacadegetOspAuthzManager()
    
public  ReportgetReportById(String id)
    
public  ReportDefinitiongetReportDefBean(ListableBeanFactory beanFactory)
    
public  ReportDefinitionXmlFilegetReportDefinition(String id)
    
public  ListgetReportDefinitions()
    
public  StringgetReportResultKey(ReportResult result, String ref)
    
 ListgetReportResults(Id resultId)
    
public  ListgetReportsByViewer()
    
public  DataSourcegetSakaiDataSource()
    
public  SchedulerManagergetSchedulerManager()
    
public  StringgetSecretKey()
    
public  SecurityServicegetSecurityService()
    
protected  ContentCollectiongetUserCollection()
    
protected  booleanhasWarehouseSetting(Boolean usesWarehouse)
     Given the param of whether or not the report is using the warehouse, should it be displayed is returned. This works off the "osp.reports.useWarehouse" sakai.properties property.
public  booleanimportResource(Id worksiteId, String nodeId)
    
protected  voidinit()
     Called on after the startup of the singleton.
protected  voidinitDefinedReportDefinitions()
    
public  booleanisAutoDdl()
    
public  booleanisMaintaner()
    
public  booleanisValidRole(String roleStr)
    
public  booleanisValidWorksiteType(String typesStr)
    
public  ReportResultloadResult(ReportResult result)
    
public  InputStreamloadXslFromDB(ReportXsl reportXsl)
    
public  StringpackageForDownload(Map params, OutputStream out)
     gets the xsl tranform file, does the transform on the Results, then applies the post processor.
protected  ReportResultpostProcessResult(ReportDefinition rd, ReportResult rr)
    
public  JobDetailprocessCreateJob(Report report)
    
protected  ReportDefinitionXmlFileprocessDefinedDefinition(ReportsDefinitionWrapper wrapper)
    
public  voidprocessDeleteJobs(JobDetail jobDetail)
    
public  StringprocessSaveResultsToResources(ReportResult reportResult)
    
public  SetprocessXSLFiles(ReportDefinition reportDef, ReportDefinitionXmlFile xmlFile)
    
public  StringBufferreplaceForMultiSet(StringBuffer inQuery, List reportParams)
    
public  StringreplaceSystemValues(String inString)
    
public  voidsaveReport(Report report)
    
public  voidsaveReportDef(ReportDefinitionXmlFile xmlFile, ListableBeanFactory beanFactory)
    
public  voidsaveReportResult(ReportResult result)
    
public  voidsaveXslFile(ReportXslFile reportXslFile)
    
public  voidsetAuthnManager(AuthenticationManager authnManager)
    
public  voidsetAuthzManager(AuthorizationFacade authzManager)
    
public  voidsetAutoDdl(boolean autoDdl)
    
public  voidsetBeanFactory(BeanFactory beanFactory)
    
public  voidsetContentHosting(ContentHostingService contentHosting)
    
public  voidsetCurrentResult(ReportResult result)
    
public  voidsetDataSource(DataSource dataSource)
    
public  voidsetDefinedDefintions(List definedDefintions)
    
public  voidsetForceColumnLabelUppercase(Boolean forceColumnLabelUppercase)
    
public  voidsetIdManager(IdManager idManager)
    
public  voidsetJobBeanWrapper(JobBeanWrapper jobBeanWrapper)
    
public  voidsetOspAuthzManager(org.theospi.portfolio.security.AuthorizationFacade ospAuthzManager)
    
public  voidsetParentBeanFactory(BeanFactory beanFactory)
    
public  voidsetReportDefinitions(List reportDefinitions)
    
public  voidsetSakaiDataSource(DataSource sakaiDataSource)
    
public  voidsetSchedulerManager(SchedulerManager schedulerManager)
    
public  voidsetSecretKey(String secretKey)
    
public  voidsetSecurityService(SecurityService securityService)
    
public  Stringtransform(ReportResult reportResult, ReportXsl reportXsl)
    
protected  voidupdateDefinition(ReportsDefinitionWrapper wrapper, ReportDefinitionXmlFile def)
    
public  booleanvalidateParameters(Collection parameters)
     Does a test to ensure that the parameters are valid One can get to the parameter definitions through the report parameter.

Field Detail
beanFactory
protected BeanFactory beanFactory(Code)



definedDefintions
public List definedDefintions(Code)





Method Detail
can
protected boolean can(String function)(Code)



checkEditAccess
public void checkEditAccess()(Code)



checkPermission
protected void checkPermission(String function)(Code)



checkReportAccess
public void checkReportAccess(String id, String ref)(Code)



closeConnection
public void closeConnection(Connection connection) throws SQLException(Code)
This closes the database connection if it was pulled from the data warehouse. (IOW, doesn't close if the connection came from the hibernate session)
Parameters:
  connection -
throws:
  SQLException -



createReport
public Report createReport(ReportDefinition reportDefinition)(Code)



createReportParameters
public void createReportParameters(Report report)(Code)



createResource
protected String createResource(ByteArrayOutputStream bos, String name, String description, String type)(Code)



deleteReport
public void deleteReport(Report report, boolean deactivate)(Code)



deleteReportDefXmlFile
public void deleteReportDefXmlFile(ReportDefinition reportDef)(Code)



deleteReportResult
public void deleteReportResult(ReportResult result)(Code)



execute
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException(Code)



executeQuery
protected void executeQuery(StringBuffer query, List reportParams, Report report, Element reportElement, ReportResult rr, ReportDefinition rd, boolean isFirstResult)(Code)
executes the query converting the results into xml and updating the report
Parameters:
  query -
Parameters:
  reportParams -
Parameters:
  report -
Parameters:
  reportElement -
Parameters:
  rr -
Parameters:
  rd -
Parameters:
  isFirstResult - - true if this is the first sql query in the report, otherwise this should be false



findReportDefinition
public ReportDefinition findReportDefinition(String Id)(Code)
Given an id, this method finds and returns the ReportDefinition
Parameters:
  Id - ReportDefinition



generateResults
public ReportResult generateResults(Report report) throws ReportExecutionException(Code)



generateSQLParameterValue
public String generateSQLParameterValue(ReportParam reportParam)(Code)
gathers the data for dropdown/list box. String



getAuthnManager
public AuthenticationManager getAuthnManager()(Code)



getAuthorizationsMap
public Map getAuthorizationsMap()(Code)



getAuthzManager
public AuthorizationFacade getAuthzManager()(Code)



getBeanFactory
public BeanFactory getBeanFactory()(Code)



getConnection
public Connection getConnection(Boolean useWarehouse) throws HibernateException, SQLException(Code)
This function generates the sql connection. If the dataSource connection fails then we want to fail over to the hibernate session connection. If the usesWarehouse param is null then the connection should default to use the warehouse Connection
throws:
  HibernateException -
throws:
  SQLException -



getContentHosting
public ContentHostingService getContentHosting()(Code)



getCurrentResult
public ReportResult getCurrentResult()(Code)
Pulls the ReportResults out of the session ReportResult



getCurrentUserResults
public List getCurrentUserResults()(Code)



getDataSource
public DataSource getDataSource()(Code)



getDataSourceUseWarehouse
public DataSource getDataSourceUseWarehouse(boolean useWarehouse)(Code)



getDefinedDefintions
public List getDefinedDefintions()(Code)



getForceColumnLabelUppercase
public Boolean getForceColumnLabelUppercase()(Code)



getIdManager
public IdManager getIdManager()(Code)
This is the getter for the idManager IdManager



getJobBeanWrapper
public JobBeanWrapper getJobBeanWrapper()(Code)



getOspAuthzManager
public org.theospi.portfolio.security.AuthorizationFacade getOspAuthzManager()(Code)



getReportById
public Report getReportById(String id)(Code)



getReportDefBean
public ReportDefinition getReportDefBean(ListableBeanFactory beanFactory)(Code)



getReportDefinition
public ReportDefinitionXmlFile getReportDefinition(String id)(Code)



getReportDefinitions
public List getReportDefinitions()(Code)



getReportResultKey
public String getReportResultKey(ReportResult result, String ref)(Code)



getReportResults
List getReportResults(Id resultId)(Code)



getReportsByViewer
public List getReportsByViewer()(Code)



getSakaiDataSource
public DataSource getSakaiDataSource()(Code)



getSchedulerManager
public SchedulerManager getSchedulerManager()(Code)



getSecretKey
public String getSecretKey()(Code)



getSecurityService
public SecurityService getSecurityService()(Code)



getUserCollection
protected ContentCollection getUserCollection() throws TypeException, IdUnusedException, PermissionException(Code)



hasWarehouseSetting
protected boolean hasWarehouseSetting(Boolean usesWarehouse)(Code)
Given the param of whether or not the report is using the warehouse, should it be displayed is returned. This works off the "osp.reports.useWarehouse" sakai.properties property. If there is no property then we will only show the warehouse reports.

If the input is null, then we automatically assume that it is using the warehouse (set to true).

If the property is 0 then we don't show any report. If bit 0 of the property is set then show the data warehouse reports. If bit 1 of the property is set then show the direct reports. aka. 0=no reports, 1= warehouse reports, 2= live data reports, 3= warehouse and live data reports
Parameters:
  usesWarehouse -




importResource
public boolean importResource(Id worksiteId, String nodeId) throws UnsupportedFileTypeException, ImportException, OspException(Code)



init
protected void init() throws Exception(Code)
Called on after the startup of the singleton. This sets the global list of functions which will have permission managed by sakai
throws:
  Exception -



initDefinedReportDefinitions
protected void initDefinedReportDefinitions()(Code)



isAutoDdl
public boolean isAutoDdl()(Code)



isMaintaner
public boolean isMaintaner()(Code)



isValidRole
public boolean isValidRole(String roleStr)(Code)



isValidWorksiteType
public boolean isValidWorksiteType(String typesStr)(Code)



loadResult
public ReportResult loadResult(ReportResult result)(Code)



loadXslFromDB
public InputStream loadXslFromDB(ReportXsl reportXsl)(Code)



packageForDownload
public String packageForDownload(Map params, OutputStream out) throws IOException(Code)
gets the xsl tranform file, does the transform on the Results, then applies the post processor.

The result is a file being placed into the output Stream.
Parameters:
  params -
Parameters:
  out -
throws:
  IOException -




postProcessResult
protected ReportResult postProcessResult(ReportDefinition rd, ReportResult rr)(Code)
applies all the post processing filters and returns the processed results
Parameters:
  rd -
Parameters:
  rr - results



processCreateJob
public JobDetail processCreateJob(Report report)(Code)



processDefinedDefinition
protected ReportDefinitionXmlFile processDefinedDefinition(ReportsDefinitionWrapper wrapper)(Code)



processDeleteJobs
public void processDeleteJobs(JobDetail jobDetail)(Code)



processSaveResultsToResources
public String processSaveResultsToResources(ReportResult reportResult) throws IOException(Code)



processXSLFiles
public Set processXSLFiles(ReportDefinition reportDef, ReportDefinitionXmlFile xmlFile) throws OspException(Code)



replaceForMultiSet
public StringBuffer replaceForMultiSet(StringBuffer inQuery, List reportParams)(Code)



replaceSystemValues
public String replaceSystemValues(String inString)(Code)



saveReport
public void saveReport(Report report)(Code)



saveReportDef
public void saveReportDef(ReportDefinitionXmlFile xmlFile, ListableBeanFactory beanFactory) throws OspException(Code)



saveReportResult
public void saveReportResult(ReportResult result)(Code)



saveXslFile
public void saveXslFile(ReportXslFile reportXslFile)(Code)



setAuthnManager
public void setAuthnManager(AuthenticationManager authnManager)(Code)



setAuthzManager
public void setAuthzManager(AuthorizationFacade authzManager)(Code)



setAutoDdl
public void setAutoDdl(boolean autoDdl)(Code)



setBeanFactory
public void setBeanFactory(BeanFactory beanFactory) throws BeansException(Code)



setContentHosting
public void setContentHosting(ContentHostingService contentHosting)(Code)



setCurrentResult
public void setCurrentResult(ReportResult result)(Code)



setDataSource
public void setDataSource(DataSource dataSource)(Code)
This is the setter for the idManager



setDefinedDefintions
public void setDefinedDefintions(List definedDefintions)(Code)



setForceColumnLabelUppercase
public void setForceColumnLabelUppercase(Boolean forceColumnLabelUppercase)(Code)



setIdManager
public void setIdManager(IdManager idManager)(Code)
This is the setter for the idManager



setJobBeanWrapper
public void setJobBeanWrapper(JobBeanWrapper jobBeanWrapper)(Code)



setOspAuthzManager
public void setOspAuthzManager(org.theospi.portfolio.security.AuthorizationFacade ospAuthzManager)(Code)



setParentBeanFactory
public void setParentBeanFactory(BeanFactory beanFactory)(Code)



setReportDefinitions
public void setReportDefinitions(List reportDefinitions)(Code)



setSakaiDataSource
public void setSakaiDataSource(DataSource sakaiDataSource)(Code)



setSchedulerManager
public void setSchedulerManager(SchedulerManager schedulerManager)(Code)



setSecretKey
public void setSecretKey(String secretKey)(Code)



setSecurityService
public void setSecurityService(SecurityService securityService)(Code)



transform
public String transform(ReportResult reportResult, ReportXsl reportXsl)(Code)



updateDefinition
protected void updateDefinition(ReportsDefinitionWrapper wrapper, ReportDefinitionXmlFile def)(Code)



validateParameters
public boolean validateParameters(Collection parameters)(Code)
Does a test to ensure that the parameters are valid One can get to the parameter definitions through the report parameter.
Parameters:
  parameters - a Collection of ReportParam



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.