我使用的是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。但是如果我想要当前用户,我该如何做到这一点? –