예제 #1
0
  public CloneWorkspace(Workspace r) {
    this.id = r.getId().toString();
    this.name = r.getName();

    this.parentId = null;
    if (r.getParentItem() != null && r.getParentItem().getId() != null) {
      this.parentId = r.getParentItem().getId();
    }

    this.defaultWorkspace = !r.isShared();
    this.localLastUpdate = r.getLatestRevision();
    this.remoteLastUpdate = r.getLatestRevision();
    this.swiftContainer = r.getSwiftContainer();
    this.swiftStorageURL = r.getSwiftUrl();
    this.owner = r.getOwner().getId().toString();
    this.pathWorkspace = generatePath();
    this.encrypted = true;

    if (!defaultWorkspace) this.encrypted = r.isEncrypted();
  }