Class GuidedRuleEditorServiceImpl

  • All Implemented Interfaces:
    org.drools.workbench.screens.guided.rule.service.GuidedRuleEditorService, org.guvnor.common.services.shared.validation.ValidationService<org.drools.workbench.models.datamodel.rule.RuleModel>, org.kie.workbench.common.services.shared.source.ViewSourceService<org.drools.workbench.models.datamodel.rule.RuleModel>, org.uberfire.ext.editor.commons.service.support.SupportsCopy, org.uberfire.ext.editor.commons.service.support.SupportsCreate<org.drools.workbench.models.datamodel.rule.RuleModel>, org.uberfire.ext.editor.commons.service.support.SupportsDelete, org.uberfire.ext.editor.commons.service.support.SupportsRead<org.drools.workbench.models.datamodel.rule.RuleModel>, org.uberfire.ext.editor.commons.service.support.SupportsRename, org.uberfire.ext.editor.commons.service.support.SupportsSaveAndRename<org.drools.workbench.models.datamodel.rule.RuleModel,​org.guvnor.common.services.shared.metadata.model.Metadata>, org.uberfire.ext.editor.commons.service.support.SupportsUpdate<org.drools.workbench.models.datamodel.rule.RuleModel,​org.guvnor.common.services.shared.metadata.model.Metadata>

    @ApplicationScoped
    public class GuidedRuleEditorServiceImpl
    extends org.kie.workbench.common.services.backend.service.KieService<org.drools.workbench.screens.guided.rule.model.GuidedEditorContent>
    implements org.drools.workbench.screens.guided.rule.service.GuidedRuleEditorService
    • Field Summary

      • Fields inherited from class org.kie.workbench.common.services.backend.service.KieService

        logger, metadataService, moduleService, overviewLoader, pathResolver, projectService, sourceServices
    • Constructor Summary

      Constructors 
      Constructor Description
      GuidedRuleEditorServiceImpl()  
      GuidedRuleEditorServiceImpl​(org.uberfire.rpc.SessionInfo sessionInfo, javax.enterprise.inject.Instance<org.drools.workbench.models.commons.backend.rule.RuleModelIActionPersistenceExtension> persistenceExtensionInstance)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.drools.workbench.screens.guided.rule.model.GuidedEditorContent constructContent​(org.uberfire.backend.vfs.Path path, org.guvnor.common.services.shared.metadata.model.Overview overview)  
      org.uberfire.backend.vfs.Path copy​(org.uberfire.backend.vfs.Path path, String newName, String comment)  
      org.uberfire.backend.vfs.Path copy​(org.uberfire.backend.vfs.Path path, String newName, org.uberfire.backend.vfs.Path targetDirectory, String comment)  
      org.uberfire.backend.vfs.Path create​(org.uberfire.backend.vfs.Path context, String fileName, org.drools.workbench.models.datamodel.rule.RuleModel model, String comment)  
      void delete​(org.uberfire.backend.vfs.Path path, String comment)  
      void init()  
      org.drools.workbench.models.datamodel.rule.RuleModel load​(org.uberfire.backend.vfs.Path path)  
      org.drools.workbench.screens.guided.rule.model.GuidedEditorContent loadContent​(org.uberfire.backend.vfs.Path path)  
      org.uberfire.backend.vfs.Path rename​(org.uberfire.backend.vfs.Path path, String newName, String comment)  
      org.uberfire.backend.vfs.Path save​(org.uberfire.backend.vfs.Path resource, org.drools.workbench.models.datamodel.rule.RuleModel model, org.guvnor.common.services.shared.metadata.model.Metadata metadata, String comment)  
      org.uberfire.backend.vfs.Path saveAndRename​(org.uberfire.backend.vfs.Path path, String newFileName, org.guvnor.common.services.shared.metadata.model.Metadata metadata, org.drools.workbench.models.datamodel.rule.RuleModel content, String comment)  
      String toSource​(org.uberfire.backend.vfs.Path path, org.drools.workbench.models.datamodel.rule.RuleModel model)  
      List<org.guvnor.common.services.shared.validation.model.ValidationMessage> validate​(org.uberfire.backend.vfs.Path path, org.drools.workbench.models.datamodel.rule.RuleModel content)  
      • Methods inherited from class org.kie.workbench.common.services.backend.service.KieService

        getSource
    • Constructor Detail

      • GuidedRuleEditorServiceImpl

        public GuidedRuleEditorServiceImpl()
      • GuidedRuleEditorServiceImpl

        @Inject
        public GuidedRuleEditorServiceImpl​(org.uberfire.rpc.SessionInfo sessionInfo,
                                           javax.enterprise.inject.Instance<org.drools.workbench.models.commons.backend.rule.RuleModelIActionPersistenceExtension> persistenceExtensionInstance)
    • Method Detail

      • create

        public org.uberfire.backend.vfs.Path create​(org.uberfire.backend.vfs.Path context,
                                                    String fileName,
                                                    org.drools.workbench.models.datamodel.rule.RuleModel model,
                                                    String comment)
        Specified by:
        create in interface org.uberfire.ext.editor.commons.service.support.SupportsCreate<org.drools.workbench.models.datamodel.rule.RuleModel>
      • load

        public org.drools.workbench.models.datamodel.rule.RuleModel load​(org.uberfire.backend.vfs.Path path)
        Specified by:
        load in interface org.uberfire.ext.editor.commons.service.support.SupportsRead<org.drools.workbench.models.datamodel.rule.RuleModel>
      • loadContent

        public org.drools.workbench.screens.guided.rule.model.GuidedEditorContent loadContent​(org.uberfire.backend.vfs.Path path)
        Specified by:
        loadContent in interface org.drools.workbench.screens.guided.rule.service.GuidedRuleEditorService
        Overrides:
        loadContent in class org.kie.workbench.common.services.backend.service.KieService<org.drools.workbench.screens.guided.rule.model.GuidedEditorContent>
      • constructContent

        protected org.drools.workbench.screens.guided.rule.model.GuidedEditorContent constructContent​(org.uberfire.backend.vfs.Path path,
                                                                                                      org.guvnor.common.services.shared.metadata.model.Overview overview)
        Specified by:
        constructContent in class org.kie.workbench.common.services.backend.service.KieService<org.drools.workbench.screens.guided.rule.model.GuidedEditorContent>
      • save

        public org.uberfire.backend.vfs.Path save​(org.uberfire.backend.vfs.Path resource,
                                                  org.drools.workbench.models.datamodel.rule.RuleModel model,
                                                  org.guvnor.common.services.shared.metadata.model.Metadata metadata,
                                                  String comment)
        Specified by:
        save in interface org.uberfire.ext.editor.commons.service.support.SupportsUpdate<org.drools.workbench.models.datamodel.rule.RuleModel,​org.guvnor.common.services.shared.metadata.model.Metadata>
      • delete

        public void delete​(org.uberfire.backend.vfs.Path path,
                           String comment)
        Specified by:
        delete in interface org.uberfire.ext.editor.commons.service.support.SupportsDelete
      • rename

        public org.uberfire.backend.vfs.Path rename​(org.uberfire.backend.vfs.Path path,
                                                    String newName,
                                                    String comment)
        Specified by:
        rename in interface org.uberfire.ext.editor.commons.service.support.SupportsRename
      • copy

        public org.uberfire.backend.vfs.Path copy​(org.uberfire.backend.vfs.Path path,
                                                  String newName,
                                                  String comment)
        Specified by:
        copy in interface org.uberfire.ext.editor.commons.service.support.SupportsCopy
      • copy

        public org.uberfire.backend.vfs.Path copy​(org.uberfire.backend.vfs.Path path,
                                                  String newName,
                                                  org.uberfire.backend.vfs.Path targetDirectory,
                                                  String comment)
        Specified by:
        copy in interface org.uberfire.ext.editor.commons.service.support.SupportsCopy
      • toSource

        public String toSource​(org.uberfire.backend.vfs.Path path,
                               org.drools.workbench.models.datamodel.rule.RuleModel model)
        Specified by:
        toSource in interface org.kie.workbench.common.services.shared.source.ViewSourceService<org.drools.workbench.models.datamodel.rule.RuleModel>
      • validate

        public List<org.guvnor.common.services.shared.validation.model.ValidationMessage> validate​(org.uberfire.backend.vfs.Path path,
                                                                                                   org.drools.workbench.models.datamodel.rule.RuleModel content)
        Specified by:
        validate in interface org.guvnor.common.services.shared.validation.ValidationService<org.drools.workbench.models.datamodel.rule.RuleModel>
      • saveAndRename

        public org.uberfire.backend.vfs.Path saveAndRename​(org.uberfire.backend.vfs.Path path,
                                                           String newFileName,
                                                           org.guvnor.common.services.shared.metadata.model.Metadata metadata,
                                                           org.drools.workbench.models.datamodel.rule.RuleModel content,
                                                           String comment)
        Specified by:
        saveAndRename in interface org.uberfire.ext.editor.commons.service.support.SupportsSaveAndRename<org.drools.workbench.models.datamodel.rule.RuleModel,​org.guvnor.common.services.shared.metadata.model.Metadata>