| org.sakaiproject.metaobj.shared.mgt.impl.StructuredArtifactDefinitionManagerImpl
Method Summary | |
public void | addConsumer(FormConsumer consumer) | protected String | calculateSchemaHash(StructuredArtifactDefinitionBean bean) | public boolean | checkFormConsumption(Id formId) | public StructuredArtifactHomeInterface | convertToHome(StructuredArtifactDefinitionBean sad) | public Element | createFormViewXml(String formId, String returnUrl) | public Element | createFormViewXml(Artifact art, String returnUrl) | public Element | createFormViewXml(ElementBean bean, String returnUrl) | protected String | createResource(String resourceLocation, String name, String description, String type, boolean replace, boolean pubview) | public void | delete(StructuredArtifactDefinitionBean sad) | public Document | exportSADAsXML(StructuredArtifactDefinitionBean bean) Given a bean this method will convert it into a new XML document. | protected StructuredArtifactDefinitionBean | findBean(StructuredArtifactDefinitionBean bean) | public List | findBySchema(ContentResource resource) | public Map | findCategorizedHomes(boolean includeHidden) | public List | findGlobalHomes() | public List | findHomes() | public List | findHomes(boolean includeHidden) | public List | findHomes(boolean includeGlobal, boolean includeHidden) | protected List | findHomes(List sites, boolean includeGlobal, boolean includeHidden) | public List | findHomes(Id currentWorksiteId) | protected List | findHomes(Id currentWorksiteId, String queryName) | public List | findHomes(Id currentWorksiteId, boolean includeHidden) | public List | findHomes(Id currentWorksiteId, boolean includeHidden, boolean includeGlobal) | public ArtifactFinder | getArtifactFinder() | public AuthenticationManager | getAuthManager() | public AuthorizationFacade | getAuthzManager() | public ContentHostingService | getContentHosting() | protected Site | getCurrentSite() | public int | getExpressionMax() | public List | getFormConsumers() | public List | getGlobalSiteTypes() | public List | getGlobalSites() | public Map | getHomes() | public IdManager | getIdManager() | public Collection | getRootElements(StructuredArtifactDefinitionBean sad) | public SecurityService | getSecurityService() | public ArtifactFinder | getStructuredArtifactFinder() | protected Element | getStructuredArtifactRootElement(StructuredArtifactDefinition sad, StructuredArtifact artifact) | protected Id | getToolId() | public ToolManager | getToolManager() | public InputStream | getTransformer(String type, boolean readOnly) | public Map | getWorksiteHomes(Id worksiteId) | public Map | getWorksiteHomes(Id worksiteId, boolean includeHidden) | public WorksiteManager | getWorksiteManager() | public boolean | hasHomes() | public void | importResources(String fromContext, String toContext, List resourceIds) | public boolean | importSADResource(Id worksiteId, String resourceId, boolean findExisting) Given a resource id, this parses out the Form from its input stream. | public StructuredArtifactDefinitionBean | importSad(Id worksiteId, InputStream in, boolean findExisting, boolean publish) | public StructuredArtifactDefinitionBean | importSad(Id worksiteId, InputStream in, boolean findExisting, boolean publish, boolean foundThrowsException) | protected void | init() | public boolean | isAutoDdl() | public boolean | isGlobal() | protected boolean | isGlobal(String siteId) | public boolean | isReplaceViews() | public StructuredArtifactDefinitionBean | loadHome(String type) | public StructuredArtifactDefinitionBean | loadHome(Id id) | public StructuredArtifactDefinitionBean | loadHomeByExternalType(String externalType, Id worksiteId) | protected SchemaNode | loadNode(StructuredArtifactDefinitionBean sad) | protected ByteArrayOutputStream | loadResource(String name) | public String | packageForDownload(Map params, OutputStream out) | public void | packageFormForExport(String formId, OutputStream os) This is the default method for exporting a form into a stream. | public void | packageFormForExport(String formId, OutputStream os, boolean checkPermission) This method will export a form into a stream. | public StructuredArtifactDefinitionBean | readSADfromZip(ZipInputStream zis, String worksite, boolean publish) | protected boolean | sadExists(StructuredArtifactDefinitionBean sad) | public StructuredArtifactDefinitionBean | save(StructuredArtifactDefinitionBean bean) | public StructuredArtifactDefinitionBean | save(StructuredArtifactDefinitionBean bean, boolean updateModTime) | protected void | saveAll(StructuredArtifactDefinition sad, Collection artifacts) | public void | setArtifactFinder(ArtifactFinder artifactFinder) | public void | setAuthzManager(AuthorizationFacade authzManager) | public void | setAutoDdl(boolean autoDdl) | public void | setContentHosting(ContentHostingService contentHosting) | public void | setExpressionMax(int expressionMax) | public void | setFormConsumers(List formConsumers) | public void | setGlobalSiteTypes(List globalSiteTypes) | public void | setGlobalSites(List globalSites) | public void | setIdManager(IdManager idManager) | public void | setReplaceViews(boolean replaceViews) | public void | setSecurityService(SecurityService securityService) | public void | setStructuredArtifactFinder(ArtifactFinder structuredArtifactFinder) | public void | setToolManager(ToolManager toolManager) | public void | setWorksiteManager(WorksiteManager worksiteManager) | protected void | transform(StructuredArtifactDefinition sad, StructuredArtifact artifact) | protected void | updateExistingArtifacts(StructuredArtifactDefinition sad) Uses the submitted xsl file to transform the existing artifacts into the schema. | protected void | updateSchemaHash() | protected void | validateAfterTransform(StructuredArtifactDefinition sad, StructuredArtifact artifact) | public void | validateSchema(StructuredArtifactDefinitionBean sad) | public void | writeSADasXMLtoStream(StructuredArtifactDefinitionBean bean, OutputStream os) | public void | writeSADtoZip(StructuredArtifactDefinitionBean bean, ZipOutputStream zos) | public void | writeSADtoZip(StructuredArtifactDefinitionBean bean, ZipOutputStream zos, String path) |
StructuredArtifactDefinitionManagerImpl | public StructuredArtifactDefinitionManagerImpl()(Code) | | |
checkFormConsumption | public boolean checkFormConsumption(Id formId)(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 |
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 | public List findHomes(Id currentWorksiteId, boolean includeHidden)(Code) | | |
findHomes | public List findHomes(Id currentWorksiteId, boolean includeHidden, boolean includeGlobal)(Code) | | |
getCurrentSite | protected Site getCurrentSite()(Code) | | |
getExpressionMax | public int getExpressionMax()(Code) | | |
getFormConsumers | public List getFormConsumers()(Code) | | |
getGlobalSiteTypes | public List getGlobalSiteTypes()(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) | | |
hasHomes | public boolean hasHomes()(Code) | | |
isAutoDdl | public boolean isAutoDdl()(Code) | | |
isGlobal | public boolean isGlobal()(Code) | | |
isReplaceViews | public boolean isReplaceViews()(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 - |
setAutoDdl | public void setAutoDdl(boolean autoDdl)(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) | | |
setStructuredArtifactFinder | public void setStructuredArtifactFinder(ArtifactFinder structuredArtifactFinder)(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) | | |
|
|