script selector when resource has no resourceType property

2009-01-02 Thread Torgeir Veimo
Is it possible to use non-default scripts for resources that have no  
resourceType property?


Also, is it possible to request a script directly, eg. use a request  
such as /apps/notes/html.esp, and make that script execute instead of  
being returned as plaintext?


The document at http://cwiki.apache.org/SLING/url-to-script-resolution.html 
 is desperately lacking in examples..


--
Torgeir Veimo
torg...@pobox.com






[jira] Created: (SLING-798) Create filesystem provider configurations for initial content on sling install

2009-01-02 Thread Carsten Ziegeler (JIRA)
Create filesystem provider configurations for initial content on sling install
--

 Key: SLING-798
 URL: https://issues.apache.org/jira/browse/SLING-798
 Project: Sling
  Issue Type: New Feature
  Components: Maven Plugins
Affects Versions: Maven Sling Plugin 2.0.2
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
 Fix For: Maven Sling Plugin 2.0.4


The maven sling plugin could be improved to generate file system provider 
factory configurations for initial content.
During a sling:install, the plugin will read the generated manifest, extract 
the initial content directives and uses them to
POST new configurations to the Felix webconsole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-798) Create filesystem provider configurations for initial content on sling install

2009-01-02 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12660299#action_12660299
 ] 

Carsten Ziegeler commented on SLING-798:


Revision 730701 contains a first version which posts new configs on each 
sling:install.
Initial content entries can be ignored by setting the directive 
maven:mount:=false for the entry.
The whole procedure can be disabled by setting -D.sling.mountByFS=false

The current approach allows to generate a config and mount scripts contained in 
the project through the fs provider.
The scripts can then be edited in the IDE and changes are applied immediately.

This initial version has some drawbacks, one of them is that each invocation 
creates new configs, old configs are never removed etc.

 Create filesystem provider configurations for initial content on sling install
 --

 Key: SLING-798
 URL: https://issues.apache.org/jira/browse/SLING-798
 Project: Sling
  Issue Type: New Feature
  Components: Maven Plugins
Affects Versions: Maven Sling Plugin 2.0.2
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
 Fix For: Maven Sling Plugin 2.0.4


 The maven sling plugin could be improved to generate file system provider 
 factory configurations for initial content.
 During a sling:install, the plugin will read the generated manifest, extract 
 the initial content directives and uses them to
 POST new configurations to the Felix webconsole

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: script selector when resource has no resourceType property

2009-01-02 Thread Torgeir Veimo


On 2 Jan 2009, at 18:44, Torgeir Veimo wrote:

Is it possible to use non-default scripts for resources that have no  
resourceType property?



According to http://dev.day.com/microsling/content/blogs/main/slingrequestprocessrevisited.html 
, requesting /content/notes.html should end up in executing the  
script /apps/notes/html.esp? It doesn't seem to happen in my setup  
with current sling trunk. (I get a Resource dumped by  
HtmlRendererServlet page).


If the selected resource has no special resource type a script will  
be looked up based on the content path. For example, the script for / 
content/corporate/jobs.html will be searched in /apps/corporate.


That sentence, if still correct, should probably be added to 
http://cwiki.apache.org/SLING/url-to-script-resolution.html

--
Torgeir Veimo
torg...@pobox.com






[jira] Created: (SLING-799) Job Folder is not ordered and results in unordered queue

2009-01-02 Thread Tobias Bocanegra (JIRA)
Job Folder is not ordered and results in unordered queue


 Key: SLING-799
 URL: https://issues.apache.org/jira/browse/SLING-799
 Project: Sling
  Issue Type: Bug
  Components: Event
Affects Versions: Extensions Event 2.0.2
Reporter: Tobias Bocanegra


check code of

AbstractRepositoryEventHandler.ensureRepositoryPath()

/**
 * Check if the repository path already exists. If not, create it.
 */
protected Node ensureRepositoryPath()
throws RepositoryException {
final Node node = JcrResourceUtil.createPath(this.repositoryPath,
   EventHelper.NODETYPE_FOLDER,
   EventHelper.NODETYPE_FOLDER,
   this.writerSession, true);

return node;
}

this should use a sling:OrderedFolder



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (SLING-799) Job Folder is not ordered and results in unordered queue

2009-01-02 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12660352#action_12660352
 ] 

Carsten Ziegeler commented on SLING-799:


Not 100% sure (I've to check the code), but I think the job handler does not 
rely on the order of the nodes in the repository.
The job handler holds the queues in memory in the correct order. In case of a 
restart the query fetches the nodes in the correct order by using a sorting on 
a property.

However, an ordered folder shouldn't hurt.

 Job Folder is not ordered and results in unordered queue
 

 Key: SLING-799
 URL: https://issues.apache.org/jira/browse/SLING-799
 Project: Sling
  Issue Type: Bug
  Components: Event
Affects Versions: Extensions Event 2.0.2
Reporter: Tobias Bocanegra

 check code of
 AbstractRepositoryEventHandler.ensureRepositoryPath()
 /**
  * Check if the repository path already exists. If not, create it.
  */
 protected Node ensureRepositoryPath()
 throws RepositoryException {
 final Node node = JcrResourceUtil.createPath(this.repositoryPath,
EventHelper.NODETYPE_FOLDER,
EventHelper.NODETYPE_FOLDER,
this.writerSession, true);
 return node;
 }
 this should use a sling:OrderedFolder

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: default node type for webdav collections

2009-01-02 Thread Felix Meschberger
Hi Torgeir,

Torgeir Veimo schrieb:
 
 On 2 Jan 2009, at 00:22, Felix Meschberger wrote:
 
 Functionality to easily configure the node types used is only available
 with the jcr/webdav bundle as of Rev. 725679 (as per SLING-767). Using a
 top of trunk build of the module should give you the configuration
 option in the felix console Configuration page.

 It has IIRC also only recently been implemented, that the default node
 type for folders is sling:Folder.
 
 Do you know when? I have sling trunk from a few days ago running. Where

Rev. 725679 dates from the 11. Dec. 2008.

 is the correct way to configure this manually? I had a look at the
 configuration settings for the webdav servlet, but I couldn't find any
 setting for the default node type.

The configuration to look for is Simple WebDAV Servlet
(org.apache.sling.jcr.webdav.impl.servlets.SimpleWebDavServlet). This
should provide a whole lot of options. One of which is the Collection
Primary Type option, which defaults to sling:Folder.

Regards
Felix

 


Re: modify resource bundle jar file

2009-01-02 Thread Felix Meschberger
Hi,

Torgeir Veimo schrieb:
 
 On 2 Jan 2009, at 16:04, Torgeir Veimo wrote:
 

 On 30 Dec 2008, at 06:40, Felix Meschberger wrote:

 (1) To upload with the Maven Sling Plugin: you may build and deploy in a
 single Maven call:

  $ mvn clean package \
  -Dsling.url=http://localhost:/system/console \
  org.apache.sling:maven-sling-plugin:2.0.2-incubator:install


 Where is the sling maven plugin located? maven complains it cannot
 find it in the default repositories.
 
 It looks like it's running ok if invoked in the launchpad directory.
 
 Will this command update all the deployed sling bundles?
 
 
 It does not seem to work for the launchpad though. It get the following;
 
 [INFO]
 /Users/torgeir/java/src/sling/sling/launchpad/webapp/target/org.apache.sling.launchpad.webapp-4-incubator-SNAPSHOT.jar
 is not an OSGi Bundle, not uploading
 
 Is there a way to update the complete launchpad instance in one go?
 

Hmm, unfortunately, there is no easy way, yet. This is one of the tasks
we have to tackle for releases to come.

One option would be to just run the mvn clean instal sling:install
command from the sling root checkout, which would run the plugin for
each plugin project being built and thus ultimately will update all bundles.

Another option is to stop sling, remove the ${sling.home}/felix folder
and launch a new sling build. This causes the bundles to be installed
again. The drawback of this option is, that this will also remove any
non-Sling bundles, which might not be a good idea.

Regards
Felix


Re: script selector when resource has no resourceType property

2009-01-02 Thread Felix Meschberger
Hi,

Torgeir Veimo schrieb:
 
 On 2 Jan 2009, at 18:44, Torgeir Veimo wrote:
 
 Is it possible to use non-default scripts for resources that have no
 resourceType property?
 
 
 According to
 http://dev.day.com/microsling/content/blogs/main/slingrequestprocessrevisited.html,
 requesting /content/notes.html should end up in executing the script
 /apps/notes/html.esp? It doesn't seem to happen in my setup with current
 sling trunk. (I get a Resource dumped by HtmlRendererServlet page).
 
 If the selected resource has no special resource type a script will be
 looked up based on the content path. For example, the script for
 /content/corporate/jobs.html will be searched in /apps/corporate.

You have to make sure, the Sample Path Based Resource Type Provider
(samples/path-based-rtp) is installed.

 
 That sentence, if still correct, should probably be added to
 http://cwiki.apache.org/SLING/url-to-script-resolution.html
 

Yes, this is true.

Regards
Felix


[jira] Commented: (SLING-799) Job Folder is not ordered and results in unordered queue

2009-01-02 Thread Tobias Bocanegra (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12660385#action_12660385
 ] 

Tobias Bocanegra commented on SLING-799:


the net effect should be that the JobStatusProvider.getAllJobs(...) should 
return an ordered collection of the jobs in the same sequence as they were 
scheduled.

 Job Folder is not ordered and results in unordered queue
 

 Key: SLING-799
 URL: https://issues.apache.org/jira/browse/SLING-799
 Project: Sling
  Issue Type: Bug
  Components: Event
Affects Versions: Extensions Event 2.0.2
Reporter: Tobias Bocanegra

 check code of
 AbstractRepositoryEventHandler.ensureRepositoryPath()
 /**
  * Check if the repository path already exists. If not, create it.
  */
 protected Node ensureRepositoryPath()
 throws RepositoryException {
 final Node node = JcrResourceUtil.createPath(this.repositoryPath,
EventHelper.NODETYPE_FOLDER,
EventHelper.NODETYPE_FOLDER,
this.writerSession, true);
 return node;
 }
 this should use a sling:OrderedFolder

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Issue with moving/replacing and re-ordering

2009-01-02 Thread Will Carpenter
Hey,
I'm trying to add a re-order option for a list of items in a CMS.  I'm
trying to use the :move method with replace set to true, and am using :order
before and :order after to indicate which direction to shift the affected
node.  I have pasted an example of one of my generated forms below:

form action=/content/site/jcr:content/herobanners/spread_tv method=POST
enctype=multipart/form-data
input type=hidden name=:operation
value=move /
input type=hidden name=:dest
value=./ /
input type=hidden name=:replace
value=true/
input type=hidden name=:order
value=before /content/site/jcr:content/herobanners/comedy_roadtrip /
input type=hidden name=:redirect
value=/content/site.html/
input type=submit value=Up/
/form

I have attached a screenshot of the error I get when I try to hit the Up
form shown above.  Although it says that it can't find the path, the path
does in fact exist.  Any ideas?

Thanks!
-Will

-- 
willcarpenterdesign.com


Re: script selector when resource has no resourceType property

2009-01-02 Thread Torgeir Veimo


On 3 Jan 2009, at 05:07, Felix Meschberger wrote:

If the selected resource has no special resource type a script  
will be

looked up based on the content path. For example, the script for
/content/corporate/jobs.html will be searched in /apps/corporate.


You have to make sure, the Sample Path Based Resource Type Provider
(samples/path-based-rtp) is installed.


Ok, I found the configuration for DefaultResourceTypeProvider.  
However, looking at the source for this component, it seem to be used  
only for node types of type nt:unstructured?


http://svn.apache.org/repos/asf/incubator/sling/trunk/samples/path-based-rtp/src/main/java/org/apache/sling/samples/pathbasedrtp/DefaultResourceTypeProvider.java


--
Torgeir Veimo
torg...@pobox.com






Re: default node type for webdav collections

2009-01-02 Thread Torgeir Veimo


On 3 Jan 2009, at 04:58, Felix Meschberger wrote:


Torgeir Veimo schrieb:


Do you know when? I have sling trunk from a few days ago running.  
Where


Rev. 725679 dates from the 11. Dec. 2008.


If I take the current sling svn trunk code, do a mvn install in the  
root, then a mvn install in launchpad/webapp, then use the resulting  
war file in the target directory, then I should get the latest sling  
trunk code?



is the correct way to configure this manually? I had a look at the
configuration settings for the webdav servlet, but I couldn't find  
any

setting for the default node type.


The configuration to look for is Simple WebDAV Servlet
(org.apache.sling.jcr.webdav.impl.servlets.SimpleWebDavServlet). This
should provide a whole lot of options. One of which is the Collection
Primary Type option, which defaults to sling:Folder.



The simple webdav servlet configuration only has options for the  
authentication realm and the root path. Am a bit at a loss here..


--
Torgeir Veimo
torg...@pobox.com