1 16 17 package org.apache.jetspeed.services.security; 18 19 import org.apache.jetspeed.portal.Portlet; 21 import org.apache.jetspeed.om.profile.Entry; 22 import org.apache.jetspeed.om.registry.RegistryEntry; 23 24 import java.io.Serializable ; 25 31 public class PortalResource implements Serializable 32 { 33 public static final int TYPE_PORTLET = 100; 34 public static final int TYPE_ENTRY = 200; 35 public static final int TYPE_ENTRY_PARAMETER = 201; 36 public static final int TYPE_REGISTRY = 300; 37 public static final int TYPE_REGISTRY_PARAMETER = 301; 38 39 private int resourceType = 0; 40 41 private Entry entry = null; 42 private org.apache.jetspeed.om.profile.Parameter entryParameter = null; 43 private Portlet portlet = null; 44 private org.apache.jetspeed.om.registry.Parameter registryParameter = null; 45 private RegistryEntry registryEntry = null; 46 47 48 private String owner; 49 50 54 public PortalResource(Entry entry) 55 { 56 resourceType = TYPE_ENTRY; 57 this.entry = entry; 58 } 59 60 65 public PortalResource(Entry entry, org.apache.jetspeed.om.profile.Parameter parameter) 66 { 67 resourceType = TYPE_ENTRY_PARAMETER; 68 this.entry = entry; 69 this.entryParameter = parameter; 70 } 71 72 76 public PortalResource(Portlet portlet) 77 { 78 resourceType = TYPE_PORTLET; 79 this.portlet = portlet; 80 } 81 82 87 public PortalResource(RegistryEntry registryEntry) 88 { 89 resourceType = TYPE_REGISTRY; 90 this.registryEntry = registryEntry; 91 } 92 93 98 public PortalResource(RegistryEntry registryEntry, org.apache.jetspeed.om.registry.Parameter parameter) 99 { 100 resourceType = TYPE_REGISTRY_PARAMETER; 101 this.registryEntry = registryEntry; 102 this.registryParameter = parameter; 103 } 104 105 109 public int getResourceType() 110 { 111 return resourceType; 112 } 113 114 118 public Entry getEntry() 119 { 120 return entry; 121 } 122 123 127 public org.apache.jetspeed.om.profile.Parameter getEntryParameter() 128 { 129 return entryParameter; 130 } 131 132 136 public Portlet getPortlet() 137 { 138 return portlet; 139 } 140 141 145 public RegistryEntry getRegistryEntry() 146 { 147 return registryEntry; 148 } 149 150 154 public org.apache.jetspeed.om.registry.Parameter getRegistryParameter() 155 { 156 return registryParameter; 157 } 158 159 162 public String getOwner() 163 { 164 return this.owner; 165 } 166 167 170 public void setOwner(String owner) 171 { 172 this.owner = owner; 173 } 174 175 } 176 | Popular Tags |