1 16 17 package org.apache.roller.pojos; 18 19 29 public class PermissionsData extends PersistentObject 30 { 31 private String id = null; 32 private WebsiteData website = null; 33 private UserData user = null; 34 private boolean pending = true; 35 public static short LIMITED = 0x00; public static short AUTHOR = 0x01; public static short ADMIN = 0x03; private short permissionMask = LIMITED; 39 40 41 public PermissionsData() 42 { 43 } 44 45 48 public boolean has(short priv) 49 { 50 return (getPermissionMask() & priv) == priv; 51 } 52 57 public String getId() 58 { 59 return id; 60 } 61 62 public void setId(String id) 63 { 64 this.id = id; 65 } 66 69 public WebsiteData getWebsite() 70 { 71 return website; 72 } 73 public void setWebsite(WebsiteData website) 74 { 75 this.website = website; 76 } 77 80 public UserData getUser() 81 { 82 return user; 83 } 84 public void setUser(UserData user) 85 { 86 this.user = user; 87 } 88 93 public short getPermissionMask() 94 { 95 return permissionMask; 96 } 97 98 public void setPermissionMask(short permissionMask) 99 { 100 this.permissionMask = permissionMask; 101 } 102 108 public boolean isPending() 109 { 110 return pending; 111 } 112 113 public void setPending(boolean pending) 114 { 115 this.pending = pending; 116 } 117 120 public void setData(PersistentObject vo) 121 { 122 } 124 } 125 | Popular Tags |