cancel
Showing results for 
Search instead for 
Did you mean: 

RepositoryService get user home folder (SOLVED)

giafar
Champ in-the-making
Champ in-the-making
Hi all,
I'm new to alfresco and i want to get user home folder but i don't know how to get node starting from "workspace://SpacesStore/48216e2b-285e-11dd-9cfe-3d992136d06f".


public void getHomeFolder(AuthenticationDetails ad, String userName) {
  AdministrationServiceSoapBindingStub admin = WebServiceClient.getAdministrationService(ad);
  UserDetails ud= admin.getUser(userName);
  NamedValue[] nv = ud.getProperties();
    for (int i = 0; i < nv.length; i++) {
   if (nv[i].getName().equals(Constants.PROP_USER_HOMEFOLDER)) {
          // nv[i].getValue() is [b]workspace://SpacesStore/48216e2b-285e-11dd-9cfe-3d992136d06f[/b]
          ?????????????????????????????????????????????????????
          break;
        }
    }

Thans in advance !
1 REPLY 1

giafar
Champ in-the-making
Champ in-the-making
Solved by myself:


Query q = new Query(Constants.QUERY_LANG_LUCENE, "ID:\""+nv[i].getValue()+"\"");
QueryResult qr = rep.query(new Store(Constants.WORKSPACE_STORE, "SpacesStore"), q, true);
ResultSet rs  = qr.getResultSet();
if(rs.getTotalRowCount()>0) {
// Well I have the node
}

I receive 2 record count but it works.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.