jackrabbit

Jackrabbit Running Queries against UUID

假如想象 提交于 2019-12-02 04:17:43
问题 I am using Jackrabbit and I am trying to query for an existing node which has a UUID. My code is shown below. The problem is that UUID for referenceNode is of the form "'90be246a-a17c-445e-a5ad-81b064de0bee'" and it seems that the XPATH engine used in Jackrabbit (Lucene) has problems dealing with hyphens. If I run query2, everything is fine and referenceNode is printed. If I run query1 (with the UUID) inside Eclipse, nothing is returned. HOWEVER, if I run query1 inside Jackrabbit Viewer, the

Sling initial content loading - how to set access permissions?

南楼画角 提交于 2019-12-02 00:19:51
I have a bundle that was generated by the Maven sling-initial-content archetype, that means the content is imported into the repository when the bundle gets installed. I want anonymous users to be able to add child nodes to a specific node and I want to set these permissions automatically on bundle installation. I tried the following (stored as a JSON file in the content directory), but it generates an error: "Cannot load initial content for bundle com.example.acltest : Unable to perform operation. Node is protected." { "jcr:primaryType": "nt:unstructured", "jcr:mixinTypes": ["rep

Jackrabbit Running Queries against UUID

拥有回忆 提交于 2019-12-01 23:42:36
I am using Jackrabbit and I am trying to query for an existing node which has a UUID. My code is shown below. The problem is that UUID for referenceNode is of the form "'90be246a-a17c-445e-a5ad-81b064de0bee'" and it seems that the XPATH engine used in Jackrabbit (Lucene) has problems dealing with hyphens. If I run query2, everything is fine and referenceNode is printed. If I run query1 (with the UUID) inside Eclipse, nothing is returned. HOWEVER, if I run query1 inside Jackrabbit Viewer, the query runs fine. It seems like I have to escape the hyphens in my queryString but I tried adding double

Set a CQ5 component to editable or not editable

跟風遠走 提交于 2019-11-30 18:24:40
问题 Is it posible if i want to set a cq5 component editable in page A, but not editable in page B. For example: at page A, i have C component we allow authors to open dialog and edit the component. But we do not allow authors to open dialog to edit component C on Page B. I try to research cq:EditConfig link, but It's not enough documentation to resolve my issue. 回答1: You can set ComponentContext.BYPASS_COMPONENT_HANDLING_ON_INCLUDE_ATTRIBUTE before the include, and remove it after the include.

What is the purpose behind building of Apache Sling, Felix, Jackrabbit projects

╄→尐↘猪︶ㄣ 提交于 2019-11-30 04:49:32
I am asking a very basic question here. Question is I am using Apache Sling , Apache Jackrabbit, Apache Felix in my project as said by my instructor. I am trying to understand why these software is developed by Apache. I tried a lot on the internet,, but I didn't find any blog or wordpress blog, or any useful youtube video that explain all these projects. Can you explain me about these projects. Why these projects developed? What they do ? and more questions like this Previously I found the same doubt with Apache Hadoop, but all the material that I found on net is sufficient for me to get a

Get File Out of JCR File Node

爷,独闯天下 提交于 2019-11-30 02:36:32
I have the following code to insert "rose.gif" into a roseNode. But how do I retrieve the file from the repository? Node roseNode = session.getRootNode().getNode("wiki:encyclopedia/wiki:entry[1]/"); File file = new File("rose.gif"); MimeTable mt = MimeTable.getDefaultTable(); String mimeType = mt.getContentTypeFor(file.getName()); if (mimeType == null) mimeType = "application/octet-stream"; Node fileNode = roseNode.addNode(file.getName(), "nt:file"); System.out.println( fileNode.getName() ); Node resNode = fileNode.addNode("jcr:content", "nt:resource"); resNode.setProperty("jcr:mimeType",

Apache Jackrabbit JCA 2.7.5 .docx and .xlsx indexing

烂漫一生 提交于 2019-11-29 05:31:12
I'm ussing the Appache Jackrabbit JCA 2.7.5, the problem is that files .docx and .xlsx is not indexed. My steps : Deploy the Jackrabbit JCA as resource adapter on glassfish create a Connector Connection Pool for the resource adapter indicating the ConfigFile=path/to/the/repository.xml and HomeDir=path/to/the //miss the repository.xml create a Connector Resources for the connector pool (the jndi) create web application create class to get session from the connector ressources (code below) import java.io.Serializable; import java.net.MalformedURLException; import javax.annotation.Resource;

Get File Out of JCR File Node

落爺英雄遲暮 提交于 2019-11-28 23:38:29
问题 I have the following code to insert "rose.gif" into a roseNode. But how do I retrieve the file from the repository? Node roseNode = session.getRootNode().getNode("wiki:encyclopedia/wiki:entry[1]/"); File file = new File("rose.gif"); MimeTable mt = MimeTable.getDefaultTable(); String mimeType = mt.getContentTypeFor(file.getName()); if (mimeType == null) mimeType = "application/octet-stream"; Node fileNode = roseNode.addNode(file.getName(), "nt:file"); System.out.println( fileNode.getName() );

Apache Jackrabbit JCA 2.7.5 .docx and .xlsx indexing

无人久伴 提交于 2019-11-27 23:04:36
问题 I'm ussing the Appache Jackrabbit JCA 2.7.5, the problem is that files .docx and .xlsx is not indexed. My steps : Deploy the Jackrabbit JCA as resource adapter on glassfish create a Connector Connection Pool for the resource adapter indicating the ConfigFile=path/to/the/repository.xml and HomeDir=path/to/the //miss the repository.xml create a Connector Resources for the connector pool (the jndi) create web application create class to get session from the connector ressources (code below)