1 10 package org.mmbase.datatypes; 11 12 import java.util.*; 13 import org.mmbase.bridge.*; 14 import org.mmbase.util.*; 15 import org.mmbase.util.logging.*; 16 17 24 public class SecurityContextDataType extends StringDataType { 25 26 private static final long serialVersionUID = 1L; 28 32 public SecurityContextDataType(String name) { 33 super(name); 34 } 35 36 public Iterator getEnumerationValues(final Locale locale, final Cloud cloud, final Node node, final Field field) { 37 if (node == null && cloud == null) return null; return new Iterator() { 39 StringList list = node == null ? cloud.getPossibleContexts() : node.getPossibleContexts(); 40 StringIterator iterator = list.stringIterator(); 41 public boolean hasNext() { 42 return iterator.hasNext(); 43 } 44 public Object next() { 45 String val = iterator.nextString(); 46 return new Entry(val, val); 47 } 48 public void remove() { 49 throw new UnsupportedOperationException (); 50 } 51 }; 52 } 53 58 59 } 60 | Popular Tags |