Package org.kie.workbench.common.dmn.api
Interface DMNContentService
-
public interface DMNContentService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetContent(org.uberfire.backend.vfs.Path path)Returns the content of a file as string.List<org.uberfire.backend.vfs.Path>getDMNModelsPaths(org.guvnor.common.services.project.model.WorkspaceProject workspaceProject)This method loads all DMN paths from a given project.List<org.uberfire.backend.vfs.Path>getModelsPaths(org.guvnor.common.services.project.model.WorkspaceProject workspaceProject)This method loads all paths (DMN and PMML) from a given project.List<org.uberfire.backend.vfs.Path>getPMMLModelsPaths(org.guvnor.common.services.project.model.WorkspaceProject workspaceProject)This method loads all PMML paths from a given project.DMNContentResourcegetProjectContent(org.uberfire.backend.vfs.Path path, String defSetId)Returns the content as string and the metadata of a file in a project.PMMLDocumentMetadataloadPMMLDocumentMetadata(org.uberfire.backend.vfs.Path path)This method loads aPMMLDocumentMetadatafor a given path.voidsaveContent(org.uberfire.backend.vfs.Path path, String content, org.guvnor.common.services.shared.metadata.model.Metadata metadata, String comment)Save the content as string and the metadata into the specified path.
-
-
-
Method Detail
-
getContent
String getContent(org.uberfire.backend.vfs.Path path)
Returns the content of a file as string.- Parameters:
path- The file path.- Returns:
- a string with the content of file.
-
getProjectContent
DMNContentResource getProjectContent(org.uberfire.backend.vfs.Path path, String defSetId)
Returns the content as string and the metadata of a file in a project.- Parameters:
path- The file path.defSetId- The diagram's and graph Definition Set identifier, persisted into the metadata.- Returns:
- a
DMNContentResourceinstance with the file content and the metadata
-
saveContent
void saveContent(org.uberfire.backend.vfs.Path path, String content, org.guvnor.common.services.shared.metadata.model.Metadata metadata, String comment)Save the content as string and the metadata into the specified path.- Parameters:
path- The file path.content- The content of the file.metadata- The metadata of the file.comment- The commit message.
-
getModelsPaths
List<org.uberfire.backend.vfs.Path> getModelsPaths(org.guvnor.common.services.project.model.WorkspaceProject workspaceProject)
This method loads all paths (DMN and PMML) from a given project.- Parameters:
workspaceProject- represents the project that will be scanned.- Returns:
- all
Paths from a given project.
-
getDMNModelsPaths
List<org.uberfire.backend.vfs.Path> getDMNModelsPaths(org.guvnor.common.services.project.model.WorkspaceProject workspaceProject)
This method loads all DMN paths from a given project.- Parameters:
workspaceProject- represents the project that will be scanned.- Returns:
- all DMN
Paths from a given project.
-
getPMMLModelsPaths
List<org.uberfire.backend.vfs.Path> getPMMLModelsPaths(org.guvnor.common.services.project.model.WorkspaceProject workspaceProject)
This method loads all PMML paths from a given project.- Parameters:
workspaceProject- represents the project that will be scanned.- Returns:
- all PMML
Paths from a given project.
-
loadPMMLDocumentMetadata
PMMLDocumentMetadata loadPMMLDocumentMetadata(org.uberfire.backend.vfs.Path path)
This method loads aPMMLDocumentMetadatafor a given path.- Parameters:
path- represents the path of the PMML model that will be loaded as aPMMLDocumentMetadata.- Returns:
- the
PMMLDocumentMetadatafor a given path.
-
-