1 54 package org.apache.jetspeed.om.cms.slide; 55 56 import java.util.Vector ; 57 import org.apache.slide.content.NodeRevisionDescriptor; 58 59 import org.apache.jetspeed.om.cms.*; 60 67 public class SlideResource implements Resource 68 { 69 public static String TYPE="Resource"; 70 protected String uri; 71 protected NodeRevisionDescriptor descriptor; 72 protected Vector permissions; 73 74 public SlideResource () 75 { 76 descriptor = new NodeRevisionDescriptor(0); 77 permissions = new Vector (); 78 } 79 80 public void setDescriptor(NodeRevisionDescriptor descriptor) 81 { 82 this.descriptor = descriptor ; 83 } 84 85 public NodeRevisionDescriptor getDesciptor() 86 { 87 return descriptor; 88 } 89 90 public String getKey() 91 { 92 return ""; 93 } 95 public String getTitle() 96 { 97 return ""; 98 } 100 public void setUri(String uri) 101 { 102 this.uri = uri; 103 } 104 105 public String getUri() 106 { 107 return this.uri; 108 } 109 110 public String getType() 111 { 112 return SlideResource.TYPE; 113 } 114 115 public void setPermissions(Vector permissions) 116 { 117 this.permissions = permissions; 118 } 119 120 public Vector getPermissions() 121 { 122 return this.permissions; 123 } 124 125 public void addPermission(Permission permission) 126 { 127 permissions.add(permission); 128 } 129 130 protected Object getProperty(String propertyName) 131 { 132 try 133 { 134 return descriptor.getProperty(propertyName).getValue(); 135 } 136 catch (Exception e) 137 { return null; 139 } 140 } 141 } 142 | Popular Tags |