Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2005-03-08 07:58:27 +0000
committerslewis2005-03-08 07:58:27 +0000
commit4e4e47eab7a8120a10909827ebbed213c1cc2938 (patch)
tree65f75227e59dbcf5b67668602390389c4a13d17e
parent9ca2068e3d95131bf84d26ac8f6280467b63bc95 (diff)
downloadorg.eclipse.ecf-4e4e47eab7a8120a10909827ebbed213c1cc2938.tar.gz
org.eclipse.ecf-4e4e47eab7a8120a10909827ebbed213c1cc2938.tar.xz
org.eclipse.ecf-4e4e47eab7a8120a10909827ebbed213c1cc2938.zip
Added handling of namespace to joingroupwizardpage
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizard.java6
-rw-r--r--examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizardPage.java21
2 files changed, 22 insertions, 5 deletions
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizard.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizard.java
index 18d9d74d1..fa1463f3a 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizard.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizard.java
@@ -61,8 +61,12 @@ public class JoinGroupWizard extends Wizard {
String nickName = mainPage.getNicknameText();
String containerType = mainPage.getContainerType();
String password = mainPage.getPasswordText();
+ String namespace = mainPage.getNamespace();
try {
- ID groupID = IDFactory.makeStringID(groupName);
+ ID groupID = null;
+ if (namespace != null) {
+ groupID = IDFactory.makeID(namespace,new Object[] { groupName });
+ } else groupID = IDFactory.makeStringID(groupName);
client = new ClientConnectAction();
client.setProject(project);
client.setUsername(nickName);
diff --git a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizardPage.java b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizardPage.java
index 3c29ad06b..6446f152b 100644
--- a/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizardPage.java
+++ b/examples/bundles/org.eclipse.ecf.example.collab/src/org/eclipse/ecf/example/collab/ui/JoinGroupWizardPage.java
@@ -42,6 +42,7 @@ public class JoinGroupWizardPage extends WizardPage {
protected static final String USENICKNAME_PROP_NAME = CLASSNAME+".usenickname";
protected static final String URLPREFIX_NAME = CLASSNAME+".urlprefix";
protected static final String GROUPIDLABEL_PROP_NAME = CLASSNAME+".groupIDLabel";
+ protected static final String NAMESPACE_PROP_NAME = CLASSNAME+".namespace";
protected static final String PAGE_DESCRIPTION = "Join ECF Collaboration Group";
protected static final String JOINGROUP_FIELDNAME = "Group ID:";
@@ -73,6 +74,8 @@ public class JoinGroupWizardPage extends WizardPage {
protected List containerDescriptions = new ArrayList();
protected String urlPrefix = "";
protected Label groupIDLabel;
+
+ protected String namespace = null;
protected void modifyUI(Map props) {
if (props != null) {
@@ -81,6 +84,7 @@ public class JoinGroupWizardPage extends WizardPage {
String defaultgroupid = (String) props.get(DEFAULTGROUPID_PROP_NAME);
String useNickname = (String) props.get(USENICKNAME_PROP_NAME);
urlPrefix = (String) props.get(URLPREFIX_NAME);
+ namespace = (String) props.get(NAMESPACE_PROP_NAME);
if (urlPrefix == null) urlPrefix = "";
String groupLabel = (String) props.get(GROUPIDLABEL_PROP_NAME);
if (groupLabel != null) {
@@ -222,10 +226,15 @@ public class JoinGroupWizardPage extends WizardPage {
public String getJoinGroupText() {
String textValue = joingroup_text.getText().trim();
- if (!urlPrefix.equals("") && !textValue.startsWith(urlPrefix)) {
- textValue = urlPrefix+textValue;
- }
- return textValue;
+ String namespace = getNamespace();
+ if (namespace != null) {
+ return textValue;
+ } else {
+ if (!urlPrefix.equals("") && !textValue.startsWith(urlPrefix)) {
+ textValue = urlPrefix+textValue;
+ }
+ return textValue;
+ }
}
public String getNicknameText() {
@@ -245,4 +254,8 @@ public class JoinGroupWizardPage extends WizardPage {
return desc.getName();
}
}
+
+ public String getNamespace() {
+ return namespace;
+ }
}

Back to the top