Java Doc for StructuredArtifactDefinitionManagerImpl.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » metaobj » shared » mgt » 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.sakaiproject.metaobj.shared.mgt.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.sakaiproject.metaobj.shared.mgt.impl.StructuredArtifactDefinitionManagerImpl

StructuredArtifactDefinitionManagerImpl
public class StructuredArtifactDefinitionManagerImpl extends HibernateDaoSupport implements StructuredArtifactDefinitionManager,DuplicatableToolService,DownloadableManager,FormConsumer(Code)

author:
   chmaurer
author:
   jbush



Constructor Summary
public  StructuredArtifactDefinitionManagerImpl()
    

Method Summary
public  voidaddConsumer(FormConsumer consumer)
    
protected  StringcalculateSchemaHash(StructuredArtifactDefinitionBean bean)
    
public  booleancheckFormConsumption(Id formId)
    
public  StructuredArtifactHomeInterfaceconvertToHome(StructuredArtifactDefinitionBean sad)
    
public  ElementcreateFormViewXml(String formId, String returnUrl)
    
public  ElementcreateFormViewXml(Artifact art, String returnUrl)
    
public  ElementcreateFormViewXml(ElementBean bean, String returnUrl)
    
protected  StringcreateResource(String resourceLocation, String name, String description, String type, boolean replace, boolean pubview)
    
public  voiddelete(StructuredArtifactDefinitionBean sad)
    
public  DocumentexportSADAsXML(StructuredArtifactDefinitionBean bean)
     Given a bean this method will convert it into a new XML document.
protected  StructuredArtifactDefinitionBeanfindBean(StructuredArtifactDefinitionBean bean)
    
public  ListfindBySchema(ContentResource resource)
    
public  MapfindCategorizedHomes(boolean includeHidden)
    
public  ListfindGlobalHomes()
    
public  ListfindHomes()
    
public  ListfindHomes(boolean includeHidden)
    
public  ListfindHomes(boolean includeGlobal, boolean includeHidden)
    
protected  ListfindHomes(List sites, boolean includeGlobal, boolean includeHidden)
    
public  ListfindHomes(Id currentWorksiteId)
    
protected  ListfindHomes(Id currentWorksiteId, String queryName)
    
public  ListfindHomes(Id currentWorksiteId, boolean includeHidden)
    
public  ListfindHomes(Id currentWorksiteId, boolean includeHidden, boolean includeGlobal)
    
public  ArtifactFindergetArtifactFinder()
    
public  AuthenticationManagergetAuthManager()
    
public  AuthorizationFacadegetAuthzManager()
    
public  ContentHostingServicegetContentHosting()
    
protected  SitegetCurrentSite()
    
public  intgetExpressionMax()
    
public  ListgetFormConsumers()
    
public  ListgetGlobalSiteTypes()
    
public  ListgetGlobalSites()
    
public  MapgetHomes()
    
public  IdManagergetIdManager()
    
public  CollectiongetRootElements(StructuredArtifactDefinitionBean sad)
    
public  SecurityServicegetSecurityService()
    
public  ArtifactFindergetStructuredArtifactFinder()
    
protected  ElementgetStructuredArtifactRootElement(StructuredArtifactDefinition sad, StructuredArtifact artifact)
    
protected  IdgetToolId()
    
public  ToolManagergetToolManager()
    
public  InputStreamgetTransformer(String type, boolean readOnly)
    
public  MapgetWorksiteHomes(Id worksiteId)
    
public  MapgetWorksiteHomes(Id worksiteId, boolean includeHidden)
    
public  WorksiteManagergetWorksiteManager()
    
public  booleanhasHomes()
    
public  voidimportResources(String fromContext, String toContext, List resourceIds)
    
public  booleanimportSADResource(Id worksiteId, String resourceId, boolean findExisting)
     Given a resource id, this parses out the Form from its input stream.
public  StructuredArtifactDefinitionBeanimportSad(Id worksiteId, InputStream in, boolean findExisting, boolean publish)
    
public  StructuredArtifactDefinitionBeanimportSad(Id worksiteId, InputStream in, boolean findExisting, boolean publish, boolean foundThrowsException)
    
protected  voidinit()
    
public  booleanisAutoDdl()
    
public  booleanisGlobal()
    
protected  booleanisGlobal(String siteId)
    
public  booleanisReplaceViews()
    
public  StructuredArtifactDefinitionBeanloadHome(String type)
    
public  StructuredArtifactDefinitionBeanloadHome(Id id)
    
public  StructuredArtifactDefinitionBeanloadHomeByExternalType(String externalType, Id worksiteId)
    
protected  SchemaNodeloadNode(StructuredArtifactDefinitionBean sad)
    
protected  ByteArrayOutputStreamloadResource(String name)
    
public  StringpackageForDownload(Map params, OutputStream out)
    
public  voidpackageFormForExport(String formId, OutputStream os)
     This is the default method for exporting a form into a stream.
public  voidpackageFormForExport(String formId, OutputStream os, boolean checkPermission)
     This method will export a form into a stream.
public  StructuredArtifactDefinitionBeanreadSADfromZip(ZipInputStream zis, String worksite, boolean publish)
    
protected  booleansadExists(StructuredArtifactDefinitionBean sad)
    
public  StructuredArtifactDefinitionBeansave(StructuredArtifactDefinitionBean bean)
    
public  StructuredArtifactDefinitionBeansave(StructuredArtifactDefinitionBean bean, boolean updateModTime)
    
protected  voidsaveAll(StructuredArtifactDefinition sad, Collection artifacts)
    
public  voidsetArtifactFinder(ArtifactFinder artifactFinder)
    
public  voidsetAuthzManager(AuthorizationFacade authzManager)
    
public  voidsetAutoDdl(boolean autoDdl)
    
public  voidsetContentHosting(ContentHostingService contentHosting)
    
public  voidsetExpressionMax(int expressionMax)
    
public  voidsetFormConsumers(List formConsumers)
    
public  voidsetGlobalSiteTypes(List globalSiteTypes)
    
public  voidsetGlobalSites(List globalSites)
    
public  voidsetIdManager(IdManager idManager)
    
public  voidsetReplaceViews(boolean replaceViews)
    
public  voidsetSecurityService(SecurityService securityService)
    
public  voidsetStructuredArtifactFinder(ArtifactFinder structuredArtifactFinder)
    
public  voidsetToolManager(ToolManager toolManager)
    
public  voidsetWorksiteManager(WorksiteManager worksiteManager)
    
protected  voidtransform(StructuredArtifactDefinition sad, StructuredArtifact artifact)
    
protected  voidupdateExistingArtifacts(StructuredArtifactDefinition sad)
     Uses the submitted xsl file to transform the existing artifacts into the schema.
protected  voidupdateSchemaHash()
    
protected  voidvalidateAfterTransform(StructuredArtifactDefinition sad, StructuredArtifact artifact)
    
public  voidvalidateSchema(StructuredArtifactDefinitionBean sad)
    
public  voidwriteSADasXMLtoStream(StructuredArtifactDefinitionBean bean, OutputStream os)
    
public  voidwriteSADtoZip(StructuredArtifactDefinitionBean bean, ZipOutputStream zos)
    
public  voidwriteSADtoZip(StructuredArtifactDefinitionBean bean, ZipOutputStream zos, String path)
    


Constructor Detail
StructuredArtifactDefinitionManagerImpl
public StructuredArtifactDefinitionManagerImpl()(Code)




Method Detail
addConsumer
public void addConsumer(FormConsumer consumer)(Code)



calculateSchemaHash
protected String calculateSchemaHash(StructuredArtifactDefinitionBean bean)(Code)



checkFormConsumption
public boolean checkFormConsumption(Id formId)(Code)



convertToHome
public StructuredArtifactHomeInterface convertToHome(StructuredArtifactDefinitionBean sad)(Code)



createFormViewXml
public Element createFormViewXml(String formId, String returnUrl)(Code)



createFormViewXml
public Element createFormViewXml(Artifact art, String returnUrl)(Code)



createFormViewXml
public Element createFormViewXml(ElementBean bean, String returnUrl)(Code)



createResource
protected String createResource(String resourceLocation, String name, String description, String type, boolean replace, boolean pubview)(Code)



delete
public void delete(StructuredArtifactDefinitionBean sad)(Code)



exportSADAsXML
public Document exportSADAsXML(StructuredArtifactDefinitionBean bean)(Code)
Given a bean this method will convert it into a new XML document. This does not put the schema into XML
Parameters:
  bean - StructuredArtifactDefinitionBean Document - XML



findBean
protected StructuredArtifactDefinitionBean findBean(StructuredArtifactDefinitionBean bean)(Code)

Parameters:
  bean -



findBySchema
public List findBySchema(ContentResource resource)(Code)



findCategorizedHomes
public Map findCategorizedHomes(boolean includeHidden)(Code)



findGlobalHomes
public List findGlobalHomes()(Code)
list of all published globals or global sad owned by current user or waiting for approval



findHomes
public List findHomes()(Code)
list of published sads or sads owned by current user



findHomes
public List findHomes(boolean includeHidden)(Code)



findHomes
public List findHomes(boolean includeGlobal, boolean includeHidden)(Code)



findHomes
protected List findHomes(List sites, boolean includeGlobal, boolean includeHidden)(Code)



findHomes
public List findHomes(Id currentWorksiteId)(Code)

Parameters:
  currentWorksiteId - list of globally published sads or published sad in currentWorksiteId or sads incurrentWorksiteId owned by current user



findHomes
protected List findHomes(Id currentWorksiteId, String queryName)(Code)



findHomes
public List findHomes(Id currentWorksiteId, boolean includeHidden)(Code)



findHomes
public List findHomes(Id currentWorksiteId, boolean includeHidden, boolean includeGlobal)(Code)



getArtifactFinder
public ArtifactFinder getArtifactFinder()(Code)



getAuthManager
public AuthenticationManager getAuthManager()(Code)



getAuthzManager
public AuthorizationFacade getAuthzManager()(Code)



getContentHosting
public ContentHostingService getContentHosting()(Code)



getCurrentSite
protected Site getCurrentSite()(Code)



getExpressionMax
public int getExpressionMax()(Code)



getFormConsumers
public List getFormConsumers()(Code)



getGlobalSiteTypes
public List getGlobalSiteTypes()(Code)



getGlobalSites
public List getGlobalSites()(Code)



getHomes
public Map getHomes()(Code)



getIdManager
public IdManager getIdManager()(Code)
Returns the idManager.



getRootElements
public Collection getRootElements(StructuredArtifactDefinitionBean sad)(Code)



getSecurityService
public SecurityService getSecurityService()(Code)



getStructuredArtifactFinder
public ArtifactFinder getStructuredArtifactFinder()(Code)



getStructuredArtifactRootElement
protected Element getStructuredArtifactRootElement(StructuredArtifactDefinition sad, StructuredArtifact artifact)(Code)



getToolId
protected Id getToolId()(Code)



getToolManager
public ToolManager getToolManager()(Code)



getTransformer
public InputStream getTransformer(String type, boolean readOnly)(Code)



getWorksiteHomes
public Map getWorksiteHomes(Id worksiteId)(Code)

Parameters:
  worksiteId - a map with all worksite and global homes



getWorksiteHomes
public Map getWorksiteHomes(Id worksiteId, boolean includeHidden)(Code)



getWorksiteManager
public WorksiteManager getWorksiteManager()(Code)



hasHomes
public boolean hasHomes()(Code)



importResources
public void importResources(String fromContext, String toContext, List resourceIds)(Code)



importSADResource
public boolean importSADResource(Id worksiteId, String resourceId, boolean findExisting) throws IOException, ServerOverloadException, PermissionException, IdUnusedException, ImportException, UnsupportedFileTypeException(Code)
Given a resource id, this parses out the Form from its input stream. Once the enties are found, they are inserted into the given worksite.
Parameters:
  worksiteId - Id
Parameters:
  resourceId - an String
Parameters:
  findExisting -



importSad
public StructuredArtifactDefinitionBean importSad(Id worksiteId, InputStream in, boolean findExisting, boolean publish) throws IOException, ImportException(Code)



importSad
public StructuredArtifactDefinitionBean importSad(Id worksiteId, InputStream in, boolean findExisting, boolean publish, boolean foundThrowsException) throws IOException, ImportException(Code)



init
protected void init() throws Exception(Code)



isAutoDdl
public boolean isAutoDdl()(Code)



isGlobal
public boolean isGlobal()(Code)



isGlobal
protected boolean isGlobal(String siteId)(Code)



isReplaceViews
public boolean isReplaceViews()(Code)



loadHome
public StructuredArtifactDefinitionBean loadHome(String type)(Code)



loadHome
public StructuredArtifactDefinitionBean loadHome(Id id)(Code)



loadHomeByExternalType
public StructuredArtifactDefinitionBean loadHomeByExternalType(String externalType, Id worksiteId)(Code)



loadNode
protected SchemaNode loadNode(StructuredArtifactDefinitionBean sad) throws TypeException, IdUnusedException, PermissionException, ServerOverloadException(Code)



loadResource
protected ByteArrayOutputStream loadResource(String name)(Code)



packageForDownload
public String packageForDownload(Map params, OutputStream out) throws IOException(Code)



packageFormForExport
public void packageFormForExport(String formId, OutputStream os) throws IOException(Code)
This is the default method for exporting a form into a stream. This method does check the form export permission.
Parameters:
  formId - String
Parameters:
  os - OutputStream
throws:
  IOException -



packageFormForExport
public void packageFormForExport(String formId, OutputStream os, boolean checkPermission) throws IOException(Code)
This method will export a form into a stream. It has the ability to turn off checking for the export form permission.
Parameters:
  formId - String
Parameters:
  os - OutputStream
Parameters:
  checkPermission - boolean
throws:
  IOException -



readSADfromZip
public StructuredArtifactDefinitionBean readSADfromZip(ZipInputStream zis, String worksite, boolean publish) throws IOException(Code)



sadExists
protected boolean sadExists(StructuredArtifactDefinitionBean sad) throws PersistenceException(Code)



save
public StructuredArtifactDefinitionBean save(StructuredArtifactDefinitionBean bean)(Code)



save
public StructuredArtifactDefinitionBean save(StructuredArtifactDefinitionBean bean, boolean updateModTime)(Code)



saveAll
protected void saveAll(StructuredArtifactDefinition sad, Collection artifacts)(Code)



setArtifactFinder
public void setArtifactFinder(ArtifactFinder artifactFinder)(Code)



setAuthzManager
public void setAuthzManager(AuthorizationFacade authzManager)(Code)



setAutoDdl
public void setAutoDdl(boolean autoDdl)(Code)



setContentHosting
public void setContentHosting(ContentHostingService contentHosting)(Code)



setExpressionMax
public void setExpressionMax(int expressionMax)(Code)



setFormConsumers
public void setFormConsumers(List formConsumers)(Code)



setGlobalSiteTypes
public void setGlobalSiteTypes(List globalSiteTypes)(Code)



setGlobalSites
public void setGlobalSites(List globalSites)(Code)



setIdManager
public void setIdManager(IdManager idManager)(Code)

Parameters:
  idManager - The idManager to set.



setReplaceViews
public void setReplaceViews(boolean replaceViews)(Code)



setSecurityService
public void setSecurityService(SecurityService securityService)(Code)



setStructuredArtifactFinder
public void setStructuredArtifactFinder(ArtifactFinder structuredArtifactFinder)(Code)



setToolManager
public void setToolManager(ToolManager toolManager)(Code)



setWorksiteManager
public void setWorksiteManager(WorksiteManager worksiteManager)(Code)



transform
protected void transform(StructuredArtifactDefinition sad, StructuredArtifact artifact) throws IOException, TransformerException, JDOMException(Code)



updateExistingArtifacts
protected void updateExistingArtifacts(StructuredArtifactDefinition sad) throws OspException(Code)
Uses the submitted xsl file to transform the existing artifacts into the schema. This process puts the artifact home into system only start while is does its work. This is necessary so that users won't be able to update artifacts while this is going on. The system transforms every object in memory and validates before writing any artifact back out. This way if something fails the existing data will stay intact.

TODO possible memory issues TODO all this work need to be atomic
Parameters:
  sad -
throws:
  OspException -




updateSchemaHash
protected void updateSchemaHash()(Code)



validateAfterTransform
protected void validateAfterTransform(StructuredArtifactDefinition sad, StructuredArtifact artifact) throws OspException(Code)

Parameters:
  sad -
Parameters:
  artifact -
throws:
  OspException - if artifact doesn't validate



validateSchema
public void validateSchema(StructuredArtifactDefinitionBean sad)(Code)



writeSADasXMLtoStream
public void writeSADasXMLtoStream(StructuredArtifactDefinitionBean bean, OutputStream os) throws IOException(Code)
Given a bean, this method puts it into a stream via UTF-8 encoding
Parameters:
  bean - StructuredArtifactDefinitionBean
Parameters:
  os - OutputStream
throws:
  IOException -



writeSADtoZip
public void writeSADtoZip(StructuredArtifactDefinitionBean bean, ZipOutputStream zos) throws IOException(Code)



writeSADtoZip
public void writeSADtoZip(StructuredArtifactDefinitionBean bean, ZipOutputStream zos, String path) throws IOException(Code)



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