package org.buddycloud.channelserver.pubsub.publishmodel;

public enum PublishModels {
	
    publishers,
    subscribers,
    open;

	public static PublishModels createFromString(String asString) {
		
		if("publishers".equals(asString)) {
			return publishers;
		} else if ("subscribers".equals(asString)) {
			return subscribers;
		} else if ("open".equals(asString)) {
			return open;
		}
		return publishers;
	}
		
}

@@ -82,16 +82,42 @@
 els %7B%0A%09%0A
+    owner,%0A    moderator,%0A
     publ
@@ -125,38 +125,36 @@
 sher
-s
 ,%0A    
-subscri
+mem
 ber
-s
 ,%0A    o
-pen
+utcast
 ;%0A
+%09
 %0A%09pu
@@ -226,20 +226,78 @@
 %09%09if
+ 
 (%22
-publishers
+owner%22.equals(asString)) %7B%0A%09%09%09return owner;%0A%09%09%7D else if (%22moderator
 %22.eq
@@ -324,26 +324,25 @@
 %09return 
-publishers
+moderator
 ;%0A%09%09%7D el
@@ -349,27 +349,25 @@
 se if (%22
-subscrib
+publish
 er
-s
 %22.equals
@@ -394,19 +394,17 @@
 urn 
-subscrib
+publish
 er
-s
 ;%0A%09%09
@@ -416,19 +416,22 @@
 e if (%22o
-pen
+utcast
 %22.equals
@@ -459,11 +459,14 @@
 rn o
-pen
+utcast
 ;%0A%09%09
@@ -480,18 +480,14 @@
 urn 
-publish
+memb
 er
-s
 ;%0A%09%7D

Create channels with correct default affiliations