]>
git.argeo.org Git - gpl/argeo-slc.git/blob - plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/model/WorkspaceElem.java
95226855c946547ff20013ff25544a8af2bb64a1
1 package org
.argeo
.slc
.client
.ui
.dist
.model
;
3 /** Abstracts a workspace that contains a given distribution */
4 public class WorkspaceElem
extends DistParentElem
{
5 private final RepoElem repoElem
;
6 private String workspaceName
;
10 * Helper to display only version when the workspace name is well formatted
12 private static String
formatName(String name
) {
13 if (name
!= null && name
.lastIndexOf('-') > 0)
14 return name
.substring(name
.lastIndexOf('-') + 1);
19 public WorkspaceElem(RepoElem repoElem
, String workspaceName
) {
20 this.repoElem
= repoElem
;
21 this.workspaceName
= workspaceName
;
22 this.label
= formatName(workspaceName
);
25 public String
getWorkspaceName() {
29 public RepoElem
getRepoElem() {
33 public boolean isReadOnly() {
34 return repoElem
.isReadOnly();
37 public boolean hasChildren() {
41 public Object
[] getChildren() {
46 public String
getLabel() {