org.guvnor.common.services.shared.metadata.model.Metadata.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(8.0k)|赞(0)|评价(0)|浏览(135)

本文整理了Java中org.guvnor.common.services.shared.metadata.model.Metadata.<init>()方法的一些代码示例,展示了Metadata.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Metadata.<init>()方法的具体详情如下:
包路径:org.guvnor.common.services.shared.metadata.model.Metadata
类名称:Metadata
方法名:<init>

Metadata.<init>介绍

暂无

代码示例

代码示例来源:origin: org.guvnor/guvnor-services-backend

public Metadata build() {
    return new Metadata(path,
              realPath,
              checkinComment,
              lastContributor,
              creator,
              lastModified,
              dateCreated,
              subject,
              type,
              externalRelation,
              externalSource,
              description,
              tags,
              discussion,
              version,
              lockInfo,
              generated);
  }
}

代码示例来源:origin: kiegroup/appformer

public Metadata build() {
    return new Metadata(path,
              realPath,
              checkinComment,
              lastContributor,
              creator,
              lastModified,
              dateCreated,
              subject,
              type,
              externalRelation,
              externalSource,
              description,
              tags,
              discussion,
              version,
              lockInfo,
              generated);
  }
}

代码示例来源:origin: kiegroup/drools-wb

@Test
public void save() throws Exception {
  final Path returnPath = service.save(this.path,
                     new ScenarioSimulationModel(),
                     new Metadata(),
                     "Commit comment");
  assertNotNull(returnPath);
  verify(ioService).write(any(org.uberfire.java.nio.file.Path.class),
              anyString(),
              anyMap(),
              any(CommentedOption.class));
}

代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend

whiteList.add( "org.drools" );
whiteList.add( "org.guvnor" );
final Metadata metadata = new Metadata();
final String comment = "comment";

代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-editor-backend

@Test
public void testPOMSave() throws Exception {
  final ProjectScreenModel model = new ProjectScreenModel();
  final POM pom = new POM();
  model.setPOM(pom);
  final Metadata pomMetaData = new Metadata();
  model.setPOMMetaData(pomMetaData);
  saver.save(pathToPom,
        model,
        DeploymentMode.FORCED,
        "message");
  verify(pomService).save(eq(pathToPom),
              eq(pom),
              eq(pomMetaData),
              eq("message"));
}

代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-editor-backend

@Test
public void testKModuleSave() throws Exception {
  final ProjectScreenModel model = new ProjectScreenModel();
  final KModuleModel kModule = new KModuleModel();
  model.setKModule(kModule);
  final Path pathToKModule = mock(Path.class);
  model.setPathToKModule(pathToKModule);
  final Metadata metadata = new Metadata();
  model.setKModuleMetaData(metadata);
  saver.save(pathToPom,
        model,
        DeploymentMode.FORCED,
        "message kmodule");
  verify(kModuleService).save(eq(pathToKModule),
                eq(kModule),
                eq(metadata),
                eq("message kmodule"));
}

代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-editor-backend

@Test
public void testImportsSave() throws Exception {
  final ProjectScreenModel model = new ProjectScreenModel();
  final ProjectImports projectImports = new ProjectImports();
  model.setProjectImports(projectImports);
  final Path pathToImports = mock(Path.class);
  model.setPathToImports(pathToImports);
  final Metadata metadata = new Metadata();
  model.setProjectImportsMetaData(metadata);
  saver.save(pathToPom,
        model,
        DeploymentMode.FORCED,
        "message imports");
  verify(importsService).save(eq(pathToImports),
                eq(projectImports),
                eq(metadata),
                eq("message imports"));
}

代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend

@Test
public void testSave() throws Exception {
  final PackageNameWhiteListService service = makeService("");
  final Path path = mock(Path.class);
  final WhiteList whiteList = new WhiteList();
  final Metadata metadata = new Metadata();
  final String comment = "comment";
  service.save(path,
         whiteList,
         metadata,
         comment);
  verify(saver).save(path,
            whiteList,
            metadata,
            comment);
}

代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-editor-backend

@Test
  public void testWhiteListSave() throws Exception {
    final ProjectScreenModel model = new ProjectScreenModel();
    final WhiteList whiteList = new WhiteList();
    model.setWhiteList(whiteList);
    final Path pathToWhiteList = mock(Path.class);
    model.setPathToWhiteList(pathToWhiteList);
    final Metadata metadata = new Metadata();
    model.setWhiteListMetaData(metadata);

    saver.save(pathToPom,
          model,
          DeploymentMode.FORCED,
          "message white list");

    verify(whiteListService).save(eq(pathToWhiteList),
                   eq(whiteList),
                   eq(metadata),
                   eq("message white list"));
  }
}

代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-editor-backend

@Test
public void checkPOMSaveInvalidatesPomModelCache() {
  // See https://issues.jboss.org/browse/RHBRMS-2822
  // Saving the pom.xml (eventually) triggers an InvalidateDMOProjectCacheEvent once VFS's WatchService
  // has observed the file change after the batch has been committed. The InvalidateDMOProjectCacheEvent then
  // invalidates the PomModelCache. The PomModelCache is used to find the Project's GAV when the Project is
  // "Built (& Deployed)" and if it's content is stale can lead to the generated KJAR containing the
  // wrong GAV. Therefore invalidate the PomModelCache as soon as the save starts.
  final ProjectScreenModel model = new ProjectScreenModel();
  final Metadata pomMetaData = new Metadata();
  final POM pom = new POM();
  model.setPOM(pom);
  model.setPOMMetaData(pomMetaData);
  KieModule module = mock(KieModule.class);
  when(moduleService.resolveModule(pathToPom)).thenReturn(module);
  saver.save(pathToPom,
        model,
        DeploymentMode.FORCED,
        "message");
  verify(pomModelCache).invalidateCache(module);
}

代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-editor-backend

@Test
public void testWhiteList() throws Exception {
  final WhiteList whiteList = new WhiteList();
  when(whiteListService.load(packageNamesWhiteListPath)).thenReturn(whiteList);
  final Metadata metadata = new Metadata();
  when(metadataService.getMetadata(packageNamesWhiteListPath)).thenReturn(metadata);
  ProjectScreenModel model = loader.load(pathToPom);
  assertEquals(packageNamesWhiteListPath,
         model.getPathToWhiteList());
  assertEquals(whiteList,
         model.getWhiteList());
  assertEquals(metadata,
         model.getWhiteListMetaData());
}

代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-editor-backend

@Test
public void testKModule() throws Exception {
  final KModuleModel kModuleModel = new KModuleModel();
  when(kModuleService.load(kmoduleXMLPath)).thenReturn(kModuleModel);
  final Metadata metadata = new Metadata();
  when(metadataService.getMetadata(kmoduleXMLPath)).thenReturn(metadata);
  ProjectScreenModel model = loader.load(pathToPom);
  assertEquals(kmoduleXMLPath,
         model.getPathToKModule());
  assertEquals(kModuleModel,
         model.getKModule());
  assertEquals(metadata,
         model.getKModuleMetaData());
}

代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-editor-backend

@Test
public void testLoadPom() throws Exception {
  final POM pom = new POM();
  when(pomService.load(pathToPom)).thenReturn(pom);
  final Metadata metadata = new Metadata();
  when(metadataService.getMetadata(pathToPom)).thenReturn(metadata);
  ProjectScreenModel model = loader.load(pathToPom);
  assertEquals(pathToPom,
         model.getPathToPOM());
  assertEquals(pom,
         model.getPOM());
  assertEquals(metadata,
         model.getPOMMetaData());
}

代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-editor-backend

@Test
public void testImports() throws Exception {
  final ProjectImports projectImports = new ProjectImports();
  when(projectImportsService.load(importsPath)).thenReturn(projectImports);
  final Metadata metadata = new Metadata();
  when(metadataService.getMetadata(importsPath)).thenReturn(metadata);
  ProjectScreenModel model = loader.load(pathToPom);
  assertEquals(importsPath,
         model.getPathToImports());
  assertEquals(projectImports,
         model.getProjectImports());
  assertEquals(metadata,
         model.getProjectImportsMetaData());
}

代码示例来源:origin: org.uberfire/uberfire-services-api

@Test
public void checkLockInfoDoesNotAffectHashCode() {
  this.metadata = new Metadata(path,
                 path,
                 "checkinComment",

代码示例来源:origin: org.guvnor/guvnor-services-api

@Test
public void checkLockInfoDoesNotAffectHashCode() {
  this.metadata = new Metadata(path,
                 path,
                 "checkinComment",

代码示例来源:origin: kiegroup/appformer

@Test
public void checkLockInfoDoesNotAffectHashCode() {
  this.metadata = new Metadata(path,
                 path,
                 "checkinComment",

代码示例来源:origin: org.kie.workbench.screens/kie-wb-common-project-editor-api

repository.setUrl("http://localhost/maven2/");
model.getPOM().addRepository(repository);
model.setPOMMetaData(new Metadata());
model.setKModuleMetaData(new Metadata());
model.setProjectTagsMetaData(new Metadata());
model.setProjectImportsMetaData(new Metadata());

相关文章