RE: Best Sling samples for a beginner to look at?

2017-03-29 Thread Jason Bailey
Bertrand,

I can't you how relieved I am to here that there is a desire to be scripting 
language agnostic. I hope this continues.

-Original Message-
From: Bertrand Delacretaz [mailto:bdelacre...@apache.org] 
Sent: Wednesday, March 29, 2017 6:39 AM
To: users 
Subject: Re: Best Sling samples for a beginner to look at?

On Tue, Mar 28, 2017 at 7:15 PM, Andreas Schaefer Sr.  wrote:
> ...Slingbucks is ok but it is outdated (as far as I can tell) using 
> ESPs and not using HTL and Sling Models

FWIW it's always been important for Sling to avoid imposing too much in terms 
of scripting languages and let users select what works best for them.

So although there's probably many more people using HTL and Sling Models than 
ESP today, I don't think this makes ESP outdated - it's different ways of 
working, for different purposes and styles.

-Bertrand


bundle + war + sling

2017-03-29 Thread Jason Bailey
Wondering if anyone has done anything with creating a war that can be deployed 
as bundle and have its resources exposed as sling content.

-Jason


Re: org.apache.sling.resourceaccesssecurity.ResourceAccessGate access.context=application

2017-03-29 Thread Carsten Ziegeler
Karolis Mackevicius wrote
> Hi,
> 
> I am trying to implement
> org.apache.sling.resourceaccesssecurity.ResourceAccessGate component
> (dependency version 1.0.0), with following properties:
> 
>  * access.context=application
>  * operations=read
>  * path=/content/dam/.*
> 
> @Component(property =
> {"access.context=application","operations=read","path=/content/dam/.*"},
> service = ResourceAccessGate.class)
> 
> Once I deploy it, everything under all other paths (that are not
> /content/dam) or other operations (create,update,delete,execute) is not
> accessible anymore.
> 
> Currently as a workaround I have created another ResourceAccessGate
> component with no path and for all operations, which I originally don't
> want to check.
> 
> Q: is this expected behavior?

Hi,

unfortunately, yes, this is the expected behaviour. If there is no
application ResourceAccessGate no check at all is performed at this
level. However as soon as there is at least one, then there needs to be
ResourceAccessGate that grants operations. So registering such an
application level gate basically denies everything except granted by
this gate.
It's a little bit uncommon but that's how it was designed :)

Regards
Carsten

> 
> Best Regards,
> 
> Karolis
> 


 

-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


Use of global HTL object log

2017-03-29 Thread Andreas Schaefer Sr.
Hi

In the HTL documentation I saw that there is a global
HTL object log for the SLF4J logger.

How would I use that logger?

Cheers - Andy


org.apache.sling.resourceaccesssecurity.ResourceAccessGate access.context=application

2017-03-29 Thread Karolis Mackevicius

Hi,

I am trying to implement 
org.apache.sling.resourceaccesssecurity.ResourceAccessGate component 
(dependency version 1.0.0), with following properties:


 * access.context=application
 * operations=read
 * path=/content/dam/.*

@Component(property = 
{"access.context=application","operations=read","path=/content/dam/.*"}, 
service = ResourceAccessGate.class)

Once I deploy it, everything under all other paths (that are not 
/content/dam) or other operations (create,update,delete,execute) is not 
accessible anymore.


Currently as a workaround I have created another ResourceAccessGate 
component with no path and for all operations, which I originally don't 
want to check.


Q: is this expected behavior?

Best Regards,

Karolis

--
Karolis Mackevicius | Software Engineer
Netcentric Ibérica SLU
Camí Antic de València 54, 7-9ª, 08005 Barcelona
M: +34 667 493 362
karolis.mackevic...@netcentric.biz | www.netcentric.biz


Re: Best Sling samples for a beginner to look at?

2017-03-29 Thread Vlad Bailescu
Hi Greg,

There's also Nate Yolles' Publick blog [5]

Best,
Vlad

[5] https://github.com/nateyolles/publick-sling-blog

On Wed, Mar 29, 2017 at 10:41 AM, Greg Fullard 
wrote:

> Tx Chris, Bertrand, Andreas
>
> I think that gives me a good starting point.
>
> I'll keep a mini-journal of my experiences which might give some insights
> into where the learning curve gets a bit steep.
>
> Perhaps it even turns into a tutorial of sorts.
>
> Cheers
>
> Greg
>
>
>
> On Tue, Mar 28, 2017 at 7:15 PM, Andreas Schaefer Sr. 
> wrote:
>
> > Slingshot and Chris’ Slick are good examples as far as I can tell.
> >
> > That said in Sling there are so many ways to do the same thing
> > that it is very difficult to figure out what is currently the best way.
> >
> > Slingbucks is ok but it is outdated (as far as I can tell) using ESPs
> > and not using HTL and Sling Models.
> >
> > To understand what is going on you probably need to know (sooner
> > or later) what is in your JCR tree. For that I would recommend using
> > Composum (comes with Sling 9) otherwise you need to install it
> > into Sling 8.
> >
> > I would start with generating a Sling Initial Content Bundle using the
> > Sling Maven Archetype. Then, as Chris mentioned, adding new
> > stuff to it one by one making sure you understand what is going on
> > in the background.
> >
> > If you have questions then post them here.
> >
> > Cheers - Andy Schaefer
> >
> > > On Mar 28, 2017, at 1:56 AM, Bertrand Delacretaz <
> bdelacre...@apache.org>
> > wrote:
> > >
> > > Hi Greg,
> > >
> > > On Tue, Mar 28, 2017 at 6:21 AM, Greg Fullard 
> > wrote:
> > >> ...The only ones that have been touched in the last year are:
> > >> - Slingshot
> > >> - Slingbucks
> > >> - Fling (the one Andy mentioned) ...
> > >
> > > I can really only speak about Slingbucks - that one is relevant and up
> > > to date, it's a small thing but demonstrates important basic concepts.
> > >
> > > -Bertrand
> >
> >
>
>
> --
>
> GREG FULLARD
> ARCHITECT ON CALL ///
> [image: 8 Bit Platoon Logo]
>
> CELL +27 82 783 3204
> EMAIL gr...@8bitplatoon.com
>
> WEB 8bitplatoon.com
>
>
> This email is protected by our email disclaimer
> .
> [image: Facebook]  [image: Twitter]
>  [image: LinkedIn]
>  tyah=idx%3A1-1-1%2CtarId%3A1425035050240%2Ctas%3A8+bit+platoon>
>
> --
>
>
> --
> *Unlock Interaction*
> CIC = Correspondence, Interactions & Communications
>
>
> *8 BIT PLATOON disclaimer*
> This e-mail transmission contains confidential information, which is the
> property of EOH Holdings Limited and its subsidiaries (“EOH”). No person,
> other than the recipient (so indicated by the sender) may use or disclose
> the contents of this message, links or attachments hereto, to any person
> whatsoever. Unauthorised disclosure and/or use may result in civil and
> criminal liability.
> Any views expressed in this message are those of the individual sender,
> except where the message states otherwise and the sender is authorised to
> state them to be the views of any such entity.
> The disclaimer forms part of the content of this e-mail in terms of section
> 11 of the Electronic Communications and Transactions Act, 25 of 2002. Refer
> to http://www.eoh.co.za/disclaimer
> --
>
>
>


Re: Best Sling samples for a beginner to look at?

2017-03-29 Thread Greg Fullard
Tx Chris, Bertrand, Andreas

I think that gives me a good starting point.

I'll keep a mini-journal of my experiences which might give some insights
into where the learning curve gets a bit steep.

Perhaps it even turns into a tutorial of sorts.

Cheers

Greg



On Tue, Mar 28, 2017 at 7:15 PM, Andreas Schaefer Sr. 
wrote:

> Slingshot and Chris’ Slick are good examples as far as I can tell.
>
> That said in Sling there are so many ways to do the same thing
> that it is very difficult to figure out what is currently the best way.
>
> Slingbucks is ok but it is outdated (as far as I can tell) using ESPs
> and not using HTL and Sling Models.
>
> To understand what is going on you probably need to know (sooner
> or later) what is in your JCR tree. For that I would recommend using
> Composum (comes with Sling 9) otherwise you need to install it
> into Sling 8.
>
> I would start with generating a Sling Initial Content Bundle using the
> Sling Maven Archetype. Then, as Chris mentioned, adding new
> stuff to it one by one making sure you understand what is going on
> in the background.
>
> If you have questions then post them here.
>
> Cheers - Andy Schaefer
>
> > On Mar 28, 2017, at 1:56 AM, Bertrand Delacretaz 
> wrote:
> >
> > Hi Greg,
> >
> > On Tue, Mar 28, 2017 at 6:21 AM, Greg Fullard 
> wrote:
> >> ...The only ones that have been touched in the last year are:
> >> - Slingshot
> >> - Slingbucks
> >> - Fling (the one Andy mentioned) ...
> >
> > I can really only speak about Slingbucks - that one is relevant and up
> > to date, it's a small thing but demonstrates important basic concepts.
> >
> > -Bertrand
>
>


-- 

GREG FULLARD
ARCHITECT ON CALL ///
[image: 8 Bit Platoon Logo]

CELL +27 82 783 3204
EMAIL gr...@8bitplatoon.com

WEB 8bitplatoon.com


This email is protected by our email disclaimer
.
[image: Facebook]  [image: Twitter]
 [image: LinkedIn]


-- 


--
*Unlock Interaction*
CIC = Correspondence, Interactions & Communications


*8 BIT PLATOON disclaimer*
This e-mail transmission contains confidential information, which is the 
property of EOH Holdings Limited and its subsidiaries (“EOH”). No person, 
other than the recipient (so indicated by the sender) may use or disclose 
the contents of this message, links or attachments hereto, to any person 
whatsoever. Unauthorised disclosure and/or use may result in civil and 
criminal liability.
Any views expressed in this message are those of the individual sender, 
except where the message states otherwise and the sender is authorised to 
state them to be the views of any such entity.
The disclaimer forms part of the content of this e-mail in terms of section 
11 of the Electronic Communications and Transactions Act, 25 of 2002. Refer 
to http://www.eoh.co.za/disclaimer 
--




Re: Fling Installation on Trunk

2017-03-29 Thread Bertrand Delacretaz
On Tue, Mar 28, 2017 at 8:48 PM, Oliver Lietz  wrote:
> -...The Fling sample is using modules (from trunk) which cannot be part of
> Launchpad...

> Nevertheless it works for others and some find it quite useful...

I have added a warning about snapshots to the Fling sample in
http://svn.apache.org/r1789329 - hopefully this helps and if not feel
free to tweak.

-Bertrand


Re: Best Sling samples for a beginner to look at?

2017-03-29 Thread Bertrand Delacretaz
On Tue, Mar 28, 2017 at 7:15 PM, Andreas Schaefer Sr.  wrote:
> ...Slingbucks is ok but it is outdated (as far as I can tell) using ESPs
> and not using HTL and Sling Models

FWIW it's always been important for Sling to avoid imposing too much
in terms of scripting languages and let users select what works best
for them.

So although there's probably many more people using HTL and Sling
Models than ESP today, I don't think this makes ESP outdated - it's
different ways of working, for different purposes and styles.

-Bertrand