Differences between type responses for node and resource

2014-09-10 Thread Jason E Bailey
, is there a Foo utility to determine if a given resource is of a particular type via the node definition? TIA. -- Jason E Bailey

Re: Differences between type responses for node and resource

2014-09-11 Thread Jason E Bailey
sling:resourceType (or no sling resource type). Paul McMahon Acquity Group, Part of Accenture Interactive On Wednesday, September 10, 2014 9:56 AM, Jason E Bailey jason.bai...@24601.org wrote: Lets say I have a node of type sling:Folder. Calling node.isNodeType(nt:folder

Re: Differences between type responses for node and resource

2014-09-12 Thread Jason E Bailey
hierarchies. I would use sling resource types as much as possible over node types, since they are a lot more flexible. HTH, Alex On 11.09.2014, at 14:54, Jason E Bailey jason.bai...@24601.org wrote: I understand the difference between the Sling Resource Type and the JCR Node type

Re: Reg - Clustering

2014-09-17 Thread Jason E Bailey
http://sling.apache.org/documentation/bundles/discovery-api-and-impl.html Sling supports clustering of the underlying content repository. Sling , being a REST based platform, doesn't recommend stateful content on the server. So it's not recommended to use HttpSessions. -- Jason On Wed, Sep

launchpad 7 from github

2014-10-13 Thread Jason E Bailey
Not sure if I'm missing a step or what. I went to pull down the launchpad for 7, with the tag org.apache.sling.launchpad-7, and that tag doesn't exist over there as far as I can see. -- Jason

Re: Route mapping for dynamic resources in Sling

2015-03-06 Thread Jason E Bailey
So I can get a clear picture of the request, a typical request would be for? /host/whitepaper.pdf/host/true/version-1/host/-/users/john123 -- Jason On Fri, Mar 6, 2015, at 09:50 AM, Duy Nguyen wrote: Hello, I'm bringing here a use case in Sling and look forward to receiving some

Re: sling without a jcrResourceProvider

2016-06-16 Thread Jason E Bailey
Looking at the API I actually have something similar already written that uses a resource as a starting point and iterates down through the child resources to perform the query. In that manner it's agnostic as to what's providing the resource, as long as we are able to obtain the children of a

Re: Querying vs iterating

2016-06-20 Thread Jason E Bailey
I have seen significant gains in obtaining a list of results, and the speed of my services, by doing an iteration versus a query. I have had a query looking for an indexed node type, going from 10 minutes to 1 and a half minute. I should point out that that makes no sense. When it was first

Re: sling without a jcrResourceProvider

2016-06-16 Thread Jason E Bailey
Which api proposal is that? -- Jason On Thu, Jun 16, 2016, at 01:14 AM, Carsten Ziegeler wrote: > Steven Walters wrote > > The other providers sling manages in its codebase don't appear to > > get much > > TLC, such as that they're all still using the older deprecated > > ResourceProvider

Re: One Resource to multiple views in different locations

2016-07-12 Thread Jason E Bailey
My understanding of this is slightly different. 1. The url specifies the resource. 2. The extension defines which rendering engine handles this request 3. It's the extension that uses the information in the resource to determine the script/scripts to be executed, with the default html engine

Re: One Resource to multiple views in different locations

2016-07-12 Thread Jason E Bailey
You have two distinct paths defined /content/site1/en/home/breadcrumb.mobile.html /content/site2/en/home/breadcrumb.mobile.html I'm assuming that the output of the breadcrumb for these sites need to be structurally different. If you are building each site from scratch, or can modify the

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-28 Thread Jason E Bailey
Its my understanding that the question on ACL's depends on where it is inheriting the ACL from. Taking your code as literal, you've declared that you own everything under /things and it would inherit the ACL of /. So if you put your ROOT as /content/remote/things You could set JCR ACLs on

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-29 Thread Jason E Bailey
ow I have always > implemented RESTful services in Sling without many limitations. The > framework is specifically designed for this. > > Henry > > > On Jan 28, 2017, at 7:57 AM, Jason E Bailey <jason.bai...@24601.org> wrote: > > > > > > It

Re: How to create Rest APIs for non-JCR data in Sling 8??

2017-01-29 Thread Jason E Bailey
I'm not sure how to correctly convey my confusion over your statement :) There may be some bias here, since I've been doing this for a while, but this is an incredibly easy platform for REST and I haven't ran across another that gives me the same flexibility. -- Jason On Sat, Jan 28, 2017, at

Re: Creating lots of nodes

2016-10-30 Thread Jason E Bailey
Additionally, if you are creating child nodes, you want them to be using a non ordered structure. If you're using an ordered parent I could see it creating a significant impact after a while. Also, indexing. If you've got indexing going on that includes what you're inserting that may have an

Re: Architecting a heterogeneous Sling + Java EE application

2017-08-29 Thread Jason E Bailey
> > Pros: > > > > - to work with the underlying repository, we can use JCR API directly > > (can we?) > > If you want to access the JCR API directly from the non-Sling part, you > will be able to do so if the non-Sling part is part of the same OSGi > runtime. > It's been a while but I've used

Re: Maven plugin to set property on a resource

2017-12-19 Thread Jason E Bailey
Maybe something like maven exec or maven antrun to perform a curl command? -- Jason On Tue, Dec 19, 2017, at 1:04 PM, Roy Teeuwen wrote: > Hey all, > > I am searching for the fastest way to set and delete a property on a > resource of a specific path. I could use the gmaven-plugin and write a

Re: SlingHttpServletRequestWrapper Example?

2018-06-26 Thread Jason E Bailey
I answered there as well. The problem with your existing attempt is that you are attempting to access the input stream after it has been opened. The parameters already exist when you're wrapping it and you just need to make sure your additional parameters are accessible as well. - Jason On

RMI based ResourceProvider

2018-06-27 Thread Jason E Bailey
I don't have any legitimate use case for this, I just like to see if I can make things work in a certain way. I was thinking, wouldn't it be cool if I had a ResourceProvider which was a connected via RMI to a JCR Resource Provider for a specific path. I could then have one instance dedicated to

SQL Resource Provider?

2018-05-01 Thread Jason E Bailey
Has anyone ever used a SQL resource provider or know where I can find such a thing? - Jason

Re: SQL Resource Provider?

2018-05-02 Thread Jason E Bailey
apache.org/oak/docs/apidocs/org/apache/jackrabbit/oak/plugins/document/rdb/RDBBlobStore.html > [3] > https://sling.apache.org/documentation/bundles/nosql-resource-providers.html > [4] https://adapt.to/2012/en/schedule/apache-sling-rdbms-mapping.html > > > >-Original Messa

Re: SQL Resource Provider?

2018-05-03 Thread Jason E Bailey
ed to use > was based on the assumption that it was dealing with JCR backed resources. > > On Wed, May 2, 2018 at 8:33 AM, Jason E Bailey <j...@apache.org> wrote: > > > Thought that would be the answer. I'll check out the prototype, thanks. > > > > It'll be fun to wri

Re: Detecting whether a job has been stopped by the user but JobExecutor hasn't terminated yet?

2018-08-18 Thread Jason E Bailey
I believe I understand what you are looking for. It's an event that you are look for that will indicate that the job has been requested to stop, but not necessarily stopped. I haven't looked at the code in question but a job should be persisting it's state in the JCR. Whenever a change to the

Re: RMI based ResourceProvider

2018-06-29 Thread Jason E Bailey
be great to do this via a JCR implementation. - Jason On Thu, Jun 28, 2018, at 5:18 AM, Bertrand Delacretaz wrote: > Hi Jason, > > On Wed, Jun 27, 2018 at 11:57 PM Jason E Bailey wrote: > > ...I was thinking, wouldn't it be cool if I had a ResourceProvider which > > wa

Re: [question] 2 sling instances behind one apache server sharing 1 session

2018-12-11 Thread Jason E Bailey
I'm going to start talking and saying things, and if I come across like I'm being pedantic I apologize in advance :) First, when we talk about logging in, we're talking about cookies. A cookie is used to identify a Session or store user credentials. You can't have a server side session or

Re: [question] 2 sling instances behind one apache server sharing 1 session

2018-12-04 Thread Jason E Bailey
Hi Ruben, Can you clarify some, when you say two tenants, is this two separate domains ? And when you talk about being logged in, are yu controlling access or just validating that someone is logged in or not, i.e. being able to access information based on a user id. - Jason On Sun, Dec 2,

Re: ContentLoader Import problem

2018-12-07 Thread Jason E Bailey
dy exist >- sync - same as "default" but remove all nodes from each of the parent >nodes if there is no equivalent item in the new content. > > > Regards, > Eric > > On Thu, Dec 6, 2018 at 10:44 AM Jason E Bailey wrote: > > > We've set up a process to import content

ContentLoader Import problem

2018-12-06 Thread Jason E Bailey
We've set up a process to import content into our Sling instance and we're running into a problem with the ContentLoader. The use case is that a set of data that is managed in another part of our company is being provided to us in the form of a JSON object for loading into our Sling environment.

How do you identify the original content path of a request?

2018-09-17 Thread Jason E Bailey
I'm dealing with resources requests that have suffixes. When I'm at a component level, I'm trying to identify what the original content path/ resource is and there doesn't seem to be a way to do it. Is anyone aware of a graceful way of doing this? Thanks - Jason

Re: Content Security Policy Headers

2020-01-10 Thread Jason E Bailey
w.danklco.com; > >Header set Content-Security-Policy "default-src https: data: > 'unsafe-inline'" > > > I use this on my personal site and have an A rating: > https://securityheaders.com/?q=https%3A%2F%2Fwww.danklco.com%2F > > Regards, > D

Content Security Policy Headers

2020-01-10 Thread Jason E Bailey
If you're not familiar with them https://tools.ietf.org/html/rfc7231 https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP I'm wondering if anyone has used the CSP to secure javascript and styles successfully in Sling and what techniques did they use to get there. I'm about to raise an issue