KickJava   Java API By Example, From Geeks To Geeks.

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


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 import org.jahia.exceptions.JahiaException;
7
8 import java.util.Vector JavaDoc;
9
10 /**
11  * Created by IntelliJ IDEA.
12  * User: toto
13  * Date: 20 janv. 2006
14  * Time: 12:53:10
15  * To change this template use File | Settings | File Templates.
16  */

17 public class UsersNode extends SubjectNode {
18     int siteId;
19
20     public UsersNode(String JavaDoc uuri, Vector JavaDoc bindings, Vector JavaDoc parentBindings, Vector JavaDoc links, int siteId) {
21         super(uuri, bindings, parentBindings, links);
22         this.siteId = siteId;
23     }
24
25     public String JavaDoc getBindingUuri(String JavaDoc bindingName) {
26         String JavaDoc s = super.getBindingUuri(bindingName);
27         if (s == null) {
28             try {
29                 if (ServicesRegistry.getInstance().getJahiaSiteUserManagerService().getMember(siteId, bindingName) != null) {
30                     s = "/users/"+bindingName;
31                 }
32             } catch (JahiaException e) {
33             }
34         }
35         return s;
36     }
37 }
38
Popular Tags