jcr

How to write an nt:file programmatically

て烟熏妆下的殇ゞ 提交于 2019-12-21 20:08:03
问题 I'm trying to store binary data in JCR, which is created on the fly. My problem is that the only way provided by the JCR API is via an InputStream : Session session = request.getResourceResolver().adaptTo(Session.class); ValueFactory valueFactory = session.getValueFactory(); Binary bin = valueFactory.createBinary(is); As CQ/Sling is RESTful I can see why this is the case as you usually get a form post or an httprequest to another source, where you always have an InputStream to use. But in my

jackrabbit-standalone-2.4.0.jar Populate does not work

雨燕双飞 提交于 2019-12-21 07:14:18
问题 I just downloaded and started Jackrabbit using: java -jar jackrabbit-standalone-2.4.0.jar When I call the populate.jsp, I get this error: Error while accessing the repository: LoginModule ignored Credentials Check the configuration or use the easy setup wizard. When I click easy setup wizard link, I get this: HTTP ERROR 404 Problem accessing /admin/. Reason: NOT_FOUND Is there something wrong with this Jackrabbit build? 回答1: It appears that the implementation has changed but the documentation

Jackrabbit searches across joined nodes

Deadly 提交于 2019-12-21 04:52:19
问题 I have tagged objects in a Jackrabbit repository (actually Adobe/Day CQ's CRX, but I think this is the Jackrabbit code): asset: tags = A, B child asset data 1: tags = A, C, E child asset data 2: tags = D, E I want to query against the union of the parent asset's set of tags and one child, i.e. "B C" would match the asset because we have those in the parent and in child 1, but "C D" would not match because there's no combination of parent and one child that matches that because C and D are

JCR checkin/checkout operations

会有一股神秘感。 提交于 2019-12-20 19:12:13
问题 I'm just starting to work with JCR (apache jackrabbit), i want to ask simple question (because i coudn't find good tutorial for it): So for what do i need Node.checkout and Node.checkin methods? What do they mean? Thx 回答1: The 'checkin' and 'checkout' methods have to do with how a JCR repository tracks the versions of content. The 'checkout' method signals to the repository that your client application is (likely) going to be modifying some versionable content. The 'checkin' methods signals

JCR checkin/checkout operations

青春壹個敷衍的年華 提交于 2019-12-20 19:12:09
问题 I'm just starting to work with JCR (apache jackrabbit), i want to ask simple question (because i coudn't find good tutorial for it): So for what do i need Node.checkout and Node.checkin methods? What do they mean? Thx 回答1: The 'checkin' and 'checkout' methods have to do with how a JCR repository tracks the versions of content. The 'checkout' method signals to the repository that your client application is (likely) going to be modifying some versionable content. The 'checkin' methods signals

CQ5 QueryBuilder Reference in Sling Servlet

强颜欢笑 提交于 2019-12-20 07:29:08
问题 I am declaring a sling servlet like so @Component(metatype = false) @Service(Servlet.class) @Properties({ @Property(name = "sling.servlet.paths", value = "/bin/foo/bar"), @Property(name = "sling.servlet.methods", value = "POST") }) public class FooBarServlet extends SlingAllMethodsServlet { ... } I override doPost like so @Override protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException { ... } And I am able to post from a client. Great! I

Should I close the session before closing the resource resolver

拥有回忆 提交于 2019-12-20 02:59:20
问题 I have simple service, lets use resourceResolver and session for some logic: @Component(immediate = true) @Service(value = ServiceInterface.class) public class ServiceInterfaceImpl implements ServiceInterface { //Some fields @Reference private ResourceResolverFactory resolverFactory; private void someMethod() { ResourceResolver resourceResolver = null; try { resourceResolver = resolverFactory.getServiceResourceResolver(null); Session session = resourceResolver.adaptTo(Session.class)

Best Way to implements a tag based search system by JCR like Modeshape

為{幸葍}努か 提交于 2019-12-18 11:33:38
问题 I need a tag based search system by JCR like Modeshape. i want to search nodes by some tags. Question is that what is the best way to implement it? Adding new node type and mixins for tags so if that is true, where can i define my tags name that is viewable to users? Implement a hierarchy of tags and reference them in my nodes. so if that is true how can i reference them? Any other way. 回答1: There are several ways to implement tags in JCR. Which option you pick will depend upon the needs of

What does ModeShape offer that JackRabbit doesn't?

隐身守侯 提交于 2019-12-18 10:26:01
问题 I just familiarized myself with Apache JackRabbit. I've done a little multi-user repository for document management. If anybody used both of them, could you please answer these questions ? Is ModeShape somehow linked to JBoss ? I don't have much experience with JBoss AS or any other JBoss tools. I see a support for tomcat, but a lot of JBossy stuff Documentation says that future releases should have UI integration, is it far future ? What kind of UI integration would it be ? Is there

Problems with Discover Sling in 15 minutes

心已入冬 提交于 2019-12-13 09:14:59
问题 I have problems with creating a content node with cURL. I execute the following command: curl -u admin:admin -F"sling:resourceType=foo/bar" -F"title=some title" http://localhost:8080/content/mynode But I can't see http://localhost:8080/content/mynode.html as there is showed the following problem: Resource dumped by HtmlRendererServlet Resource path: /content/mynode Resource metadata: {sling.resolutionPathInfo=.html, sling.resolutionPath=/content/mynode} Resource type: foo/bar Resource super