1 9 package org.jboss.portal.core.plugins.security; 10 11 import org.jboss.portal.core.metadata.AccessControllerMetaData; 12 import org.jboss.portal.common.metadata.MetaData; 13 import org.jboss.portal.common.plugin.Plugin; 14 import org.jboss.portal.server.plugins.PluginService; 15 16 import java.util.Set ; 17 import java.util.HashSet ; 18 import java.util.Collections ; 19 20 26 public class AccessController 27 extends PluginService 28 implements Plugin 29 { 30 31 32 private AccessControllerMetaData metaData; 33 34 35 private boolean unchecked; 36 37 38 private Set roles; 39 40 public AccessController() 41 { 42 this.metaData = null; 43 this.unchecked = false; 44 this.roles = Collections.EMPTY_SET; 45 } 46 47 public void setMetaData(MetaData metaData) 48 { 49 this.metaData = (AccessControllerMetaData)metaData; 50 } 51 52 public MetaData getMetaData() 53 { 54 return metaData; 55 } 56 57 public void create() 58 { 59 unchecked = metaData.isUnchecked(); 60 roles = Collections.unmodifiableSet(new HashSet (metaData.getRoles())); 61 } 62 63 public boolean isUnchecked() 64 { 65 return unchecked; 66 } 67 68 public Set getRoles() 69 { 70 return roles; 71 } 72 } 73 | Popular Tags |