KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.jahia.services.webdav.stores;
2
3 import org.apache.slide.structure.ObjectNode;
4 import org.apache.slide.structure.SubjectNode;
5 import org.jahia.registries.ServicesRegistry;
6
7 import java.util.Vector JavaDoc;
8
9 /**
10  * Created by IntelliJ IDEA.
11  * User: toto
12  * Date: 20 janv. 2006
13  * Time: 12:53:10
14  * To change this template use File | Settings | File Templates.
15  */

16 public class GroupsNode extends SubjectNode {
17     int siteId;
18
19     public GroupsNode(String JavaDoc uuri, Vector JavaDoc bindings, Vector JavaDoc parentBindings, Vector JavaDoc links, int siteId) {
20         super(uuri, bindings, parentBindings, links);
21         this.siteId = siteId;
22     }
23
24     public String JavaDoc getBindingUuri(String JavaDoc bindingName) {
25         String JavaDoc s = super.getBindingUuri(bindingName);
26         if (s == null) {
27             if (ServicesRegistry.getInstance().getJahiaGroupManagerService().lookupGroup(siteId, bindingName) != null ||
28                     ServicesRegistry.getInstance().getJahiaGroupManagerService().lookupGroup(0, bindingName) != null) {
29                 s = "/groups/"+bindingName;
30             }
31         }
32         return s;
33     }
34 }
35
Popular Tags