AnsweredAssumed Answered

Several questions..class, aspect, node, populate, path, user

Question asked by soeursourire on Feb 22, 2006
After several fighting I am writing to you for some technical questions… hoping you will agree helping me.. Here they are:

- classes management:
How classes are managed in Alfresco? I want to add my own class and use it from MyNewUserWizard class (sub-class of NewUserWizard) but as soon as I create a new class and add it to faces-config.xml I get into troubles, where should be my new class and how can I call it?

- connected user:
How can I get the user who is currently connected to get his/her properties (from his node)?

- aspect and nodes:
I want to have a type hobby and an aspect linkHobbyToPerson (a hobby can be used by several persons and a persons can have several hobbies) but then I would like the node hobby to be created outside the node Person in the database as I do not want to create twice the same hobby. How can I create a new node Hobby outsite Person?

- paths:
I am trying to parse an XML file using XMLConfigService however I get into trouble while looking for the path of my xml.
While doing this: configFiles.add(getResourcesDir() + "config.xml");
getResourcesDir() seems to return
System.getProperty("user.dir") + File.separator + "source" +
                          File.separator + "test-resources" + File.separator;

How can I define my own path. Apparently I cannot do for example:

- function populate() in NewUserWizard:
What is the goal of this code … if I remove that it will still work me think. What is the goal of populate()?

this.firstName = (String) props.get("firstName");
this.lastName = (String) props.get("lastName");
this.userName = (String) props.get("userName");

Thanks in advance