私はAlfrescoは5.1コミュニティを使用しています、と私は例えば現在ログインしている人のプロパティ値を取得しようとしている中で、人のAlfrescoのプロパティを取得し、ユーザーに私が持っている:、JAVA
"{http://www.someco.org/model/people/1.0}customProperty"
方法私はjavaでこれを得ることができますか?
カスタムプロパティなので、http://localhost:8080/alfresco/service/api/peopleには表示されません。これどうやってするの?
私は、少なくともnodeRef得るために、これを試してみてください。
protected ServiceRegistry getServiceRegistry() {
ProcessEngineConfigurationImpl config = Context.getProcessEngineConfiguration();
if (config != null) {
// Fetch the registry that is injected in the activiti spring-configuration
ServiceRegistry registry = (ServiceRegistry) config.getBeans().get(ActivitiConstants.SERVICE_REGISTRY_BEAN_KEY);
if (registry == null) {
throw new RuntimeException("Service-registry not present in ProcessEngineConfiguration beans, expected ServiceRegistry with key" + ActivitiConstants.SERVICE_REGISTRY_BEAN_KEY);
}
return registry;
}
throw new IllegalStateException("No ProcessEngineConfiguration found in active context");
}
public void writeToCatalina() {
PersonService personService = getServiceRegistry().getPersonService();
System.out.println("test");
String name = AuthenticationUtil.getFullyAuthenticatedUser();
System.out.println(name);
NodeRef personRef = personService.getPerson(name);
System.out.println(personRef);
}
をしかし、私が得た:
ませんProcessEngineConfigurationは私を助けてアクティブな文脈で
を見つけました!
しかし、現在のユーザーのパラメータを取得するには、情報を入力せずに(ユーザー、パス)取得する必要があります。この場合、人物を作成し、nodeRefを取得します。しかし、もし私が現在のユーザーを望むなら、私はこれをどうやって作れますか? –