KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > services > webdav > stores > UserLinkNode


1 package org.jahia.services.webdav.stores;
2
3 import org.apache.slide.structure.SubjectNode;
4 import org.apache.slide.util.Messages;
5 import org.apache.slide.common.ObjectValidationFailedException;
6
7 import java.util.Vector JavaDoc;
8
9 /**
10  * Created by IntelliJ IDEA.
11  * User: toto
12  * Date: 24 aožt 2004
13  * Time: 16:16:22
14  * <p/>
15  * $Author: tdraier $
16  * $Date: 2005-10-03 17:19:14 +0200 (Mon, 03 Oct 2005) $
17  * $Id: UserLinkNode.java 10790 2005-10-03 15:19:14Z tdraier $
18  * $RCSfile$
19  * $Revision: 10790 $
20  * $Source$
21  * $State$
22  */

23 public class UserLinkNode extends SubjectNode {
24
25
26     // ----------------------------------------------------------- Constructors
27

28
29     /**
30      * Constructor.
31      */

32     public UserLinkNode() {
33         super();
34     }
35
36
37     /**
38      * Default constructor.
39      */

40     public UserLinkNode(String JavaDoc uri) {
41         super(uri);
42     }
43
44
45     /**
46      * Default constructor.
47      */

48     public UserLinkNode(String JavaDoc uri, Vector JavaDoc children, Vector JavaDoc links) {
49         super(uri, children, links);
50     }
51
52
53     /**
54      * Default constructor.
55      */

56     public UserLinkNode(String JavaDoc uri, Vector JavaDoc children, Vector JavaDoc links,
57                     String JavaDoc linkedUri) {
58         super(uri, children, links);
59         setLinkedUri(linkedUri);
60     }
61
62     public UserLinkNode(String JavaDoc uuri, Vector JavaDoc bindings, Vector JavaDoc parentset, Vector JavaDoc links, String JavaDoc linkedUri) {
63         super(uuri, bindings, parentset, links);
64         setLinkedUri(linkedUri);
65     }
66
67     // ----------------------------------------------------- Instance Variables
68

69
70     /**
71      * Linked Uri
72      */

73     protected String JavaDoc linkedUri;
74
75
76     // ------------------------------------------------------------- Properties
77

78
79     /**
80      * Get linked Uri.
81      *
82      * @return String Linked Uri
83      */

84     public String JavaDoc getLinkedUri() {
85         return linkedUri;
86     }
87
88
89     /**
90      * Set linked Uri.
91      *
92      * @param linkedUri New linked Uri
93      */

94     void setLinkedUri(String JavaDoc linkedUri) {
95         if (!linkedUri.equals(getUri())) {
96             this.linkedUri = linkedUri;
97         }
98     }
99
100
101     /**
102      * Validate an ObjectNode.
103      *
104      * @param expectedUri Uri
105      */

106     public void validate(String JavaDoc expectedUri) {
107         super.validate(expectedUri);
108
109         if (linkedUri == null)
110             throw new ObjectValidationFailedException
111                 (uri, Messages.message
112                  (UserLinkNode.class.getName() + ".nullLink"));
113
114     }
115
116
117
118 }
119
Popular Tags