01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/rwiki/tags/sakai_2-4-1/rwiki-api/api/src/java/uk/ac/cam/caret/sakai/rwiki/service/api/model/RWikiEntity.java $
03: * $Id: RWikiEntity.java 9108 2006-05-08 14:30:57Z ian@caret.cam.ac.uk $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package uk.ac.cam.caret.sakai.rwiki.service.api.model;
21:
22: import org.sakaiproject.entity.api.Entity;
23: import org.w3c.dom.Element;
24:
25: public interface RWikiEntity extends Entity {
26:
27: /**
28: * Get the Rwiki Object that the entiy represent
29: *
30: * @return
31: */
32:
33: RWikiObject getRWikiObject();
34:
35: /**
36: * Populates the Object using an XML block
37: *
38: * @param el
39: * @param defaultRealm
40: * @throws Exception
41: */
42: void fromXml(Element el, String defaultRealm) throws Exception;
43:
44: public static final String RP_ID = "id";
45:
46: public static final String RP_OWNER = "owner";
47:
48: public static final String RP_REALM = "realm";
49:
50: public static final String RP_REFERENCED = "referenced";
51:
52: public static final String RP_RWID = "rwid";
53:
54: public static final String RP_SHA1 = "sha1";
55:
56: public static final String RP_USER = "user";
57:
58: public static final String RP_GROUP_ADMIN = "group-admin";
59:
60: public static final String RP_GROUP_READ = "group-read";
61:
62: public static final String RP_GROUP_WRITE = "group-write";
63:
64: public static final String RP_OWNER_ADMIN = "owner-admin";
65:
66: public static final String RP_OWNER_READ = "owner-read";
67:
68: public static final String RP_OWNER_WRITE = "owner-write";
69:
70: public static final String RP_PUBLIC_READ = "public-read";
71:
72: public static final String RP_PUBLIC_WRITE = "public-write";
73:
74: public static final String RP_REVISION = "revision";
75:
76: public static final String RP_VERSION = "version";
77:
78: public static final String RP_NAME = "name";
79:
80: public static final String RP_CONTAINER = "container";
81:
82: /**
83: * Is the entity a container ?
84: *
85: * @return
86: */
87: boolean isContainer();
88:
89: }
|