1 17 package org.alfresco.repo.security.permissions.noop; 18 19 import java.util.HashSet ; 20 import java.util.Set ; 21 22 import org.alfresco.repo.security.permissions.NodePermissionEntry; 23 import org.alfresco.repo.security.permissions.PermissionEntry; 24 import org.alfresco.repo.security.permissions.PermissionReference; 25 import org.alfresco.repo.security.permissions.PermissionServiceSPI; 26 import org.alfresco.service.cmr.repository.NodeRef; 27 import org.alfresco.service.cmr.security.AccessPermission; 28 import org.alfresco.service.cmr.security.AccessStatus; 29 import org.alfresco.service.namespace.QName; 30 31 32 36 public class PermissionServiceNOOPImpl 37 implements PermissionServiceSPI 38 { 39 40 43 public String getOwnerAuthority() 44 { 45 return OWNER_AUTHORITY; 46 } 47 48 51 public String getAllAuthorities() 52 { 53 return ALL_AUTHORITIES; 54 } 55 56 59 public String getAllPermission() 60 { 61 return ALL_PERMISSIONS; 62 } 63 64 67 public Set <AccessPermission> getPermissions(NodeRef nodeRef) 68 { 69 return null; 70 } 71 72 75 public Set <AccessPermission> getAllSetPermissions(NodeRef nodeRef) 76 { 77 return null; 78 } 79 80 83 public Set <String > getSettablePermissions(NodeRef nodeRef) 84 { 85 return getSettablePermissions((QName)null); 86 } 87 88 91 public Set <String > getSettablePermissions(QName type) 92 { 93 HashSet <String > permissions = new HashSet <String >(); 94 permissions.add(ALL_PERMISSIONS); 95 return permissions; 96 } 97 98 101 public AccessStatus hasPermission(NodeRef nodeRef, String perm) 102 { 103 return AccessStatus.ALLOWED; 104 } 105 106 109 public void deletePermissions(NodeRef nodeRef) 110 { 111 } 112 113 116 public void deletePermission(NodeRef nodeRef, String authority, String perm, boolean allow) 117 { 118 } 119 120 123 public void setPermission(NodeRef nodeRef, String authority, String perm, boolean allow) 124 { 125 } 126 127 130 public void setInheritParentPermissions(NodeRef nodeRef, boolean inheritParentPermissions) 131 { 132 } 133 134 137 public boolean getInheritParentPermissions(NodeRef nodeRef) 138 { 139 return true; 141 } 142 143 public void clearPermission(NodeRef nodeRef, String authority) 144 { 145 146 } 147 148 150 public void deletePermission(PermissionEntry permissionEntry) 151 { 152 153 } 154 155 public void deletePermissions(NodePermissionEntry nodePermissionEntry) 156 { 157 158 } 159 160 public void deletePermissions(String recipient) 161 { 162 163 } 164 165 public NodePermissionEntry explainPermission(NodeRef nodeRef, PermissionReference perm) 166 { 167 throw new UnsupportedOperationException (); 168 } 169 170 public PermissionReference getAllPermissionReference() 171 { 172 throw new UnsupportedOperationException (); 173 } 174 175 public String getPermission(PermissionReference permissionReference) 176 { 177 throw new UnsupportedOperationException (); 178 } 179 180 public PermissionReference getPermissionReference(QName qname, String permissionName) 181 { 182 throw new UnsupportedOperationException (); 183 } 184 185 public PermissionReference getPermissionReference(String permissionName) 186 { 187 throw new UnsupportedOperationException (); 188 } 189 190 public NodePermissionEntry getSetPermissions(NodeRef nodeRef) 191 { 192 throw new UnsupportedOperationException (); 193 } 194 195 public Set <PermissionReference> getSettablePermissionReferences(NodeRef nodeRef) 196 { 197 throw new UnsupportedOperationException (); 198 } 199 200 public Set <PermissionReference> getSettablePermissionReferences(QName type) 201 { 202 throw new UnsupportedOperationException (); 203 } 204 205 public AccessStatus hasPermission(NodeRef nodeRef, PermissionReference perm) 206 { 207 throw new UnsupportedOperationException (); 208 } 209 210 public void setPermission(NodePermissionEntry nodePermissionEntry) 211 { 212 throw new UnsupportedOperationException (); 213 } 214 215 public void setPermission(PermissionEntry permissionEntry) 216 { 217 throw new UnsupportedOperationException (); 218 } 219 } 220 | Popular Tags |