Ejemplo n.º 1
0
  public void updateDemo(String demoWorkspaceName, String username) {

    Assert.notNull(demoWorkspaceName);
    Assert.notNull(username);

    Workspace demoWS = workspaceRepository.findByName(demoWorkspaceName, DEMO_MASTER);
    Workspace originWS = demoWS.getOrigin();

    demoWS.setLastMod(Calendar.getInstance().getTime());
    demoWS.setDescription(originWS.getDescription());
    updateVersion(originWS);
    demoWS.setWsVersion(originWS.getWsVersion());

    workspaceRepository.saveAndFlush(demoWS);
  }
Ejemplo n.º 2
0
 public void updateVersion(Workspace w) {
   int wsVersion = w.getWsVersion() + 1;
   w.setWsVersion(wsVersion);
   workspaceRepository.saveAndFlush(w);
 }