@Override public NodeRef getRootNode(NodeService nodeService, SearchService searchService, NamespaceService namespaceService, String rootPath, NodeRef rootNodeRef) { ParameterCheck.mandatory("NodeService", nodeService); ParameterCheck.mandatory("SearchService", searchService); ParameterCheck.mandatory("NamespaceService", namespaceService); ParameterCheck.mandatory("RootPath", rootPath); ParameterCheck.mandatory("RootNodeRef", rootNodeRef); // String username = AuthenticationUtil.getFullyAuthenticatedUser(); StoreRef storeRef = rootNodeRef.getStoreRef(); AuthenticationUtil.RunAsWork<NodeRef> action = new GetRootNode(nodeService, searchService, namespaceService, rootPath, rootNodeRef, storeRef); return getBaseName(AuthenticationUtil.runAs(action, AuthenticationUtil.getSystemUserName())); }
@Override public NodeRef getRootNode(NodeService nodeService, SearchService searchService, NamespaceService namespaceService, String rootPath, NodeRef rootNodeRef) { ParameterCheck.mandatory("NodeService", nodeService); ParameterCheck.mandatory("SearchService", searchService); ParameterCheck.mandatory("NamespaceService", namespaceService); ParameterCheck.mandatory("RootPath", rootPath); ParameterCheck.mandatory("RootNodeRef", rootNodeRef); // String username = AuthenticationUtil.getFullyAuthenticatedUser(); StoreRef storeRef = rootNodeRef.getStoreRef(); AuthenticationUtil.RunAsWork<NodeRef> action = new GetRootNode(nodeService, searchService, namespaceService, rootPath, rootNodeRef, storeRef); return getBaseName(AuthenticationUtil.runAs(action, AuthenticationUtil.getSystemUserName())); }