You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/01/11 18:49:54 UTC
svn commit: r611243 -
/lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
Author: andreas
Date: Fri Jan 11 09:49:48 2008
New Revision: 611243
URL: http://svn.apache.org/viewvc?rev=611243&view=rev
Log:
Redirect to pub intro page after creating a publication
Modified:
lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
Modified: lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java?rev=611243&r1=611242&r2=611243&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java (original)
+++ lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java Fri Jan 11 09:49:48 2008
@@ -98,7 +98,7 @@
instantiator = (Instantiator) selector.select(template.getInstantiatorHint());
instantiator.instantiate(template, getParameterAsString(PUBLICATION_ID), name);
-
+
} finally {
if (selector != null) {
if (instantiator != null) {
@@ -108,6 +108,13 @@
}
}
+ }
+
+ public String getTargetURL(boolean success) {
+ if (success) {
+ return "/" + getParameterAsString(PUBLICATION_ID) + "/introduction.html";
+ }
+ return super.getTargetURL(success);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org
Re: svn commit: r611243 - /lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
Posted by Andreas Hartmann <an...@apache.org>.
Richard Frovarp schrieb:
> The other area I am concerned about is the access-control.xml files. I
> use templates to offer looks, but my sub-publications have nothing in
> common so they need their own passwd and policies directories. Once you
> load the publication, you're stuck with the ones it was set to. We could
> just make it so that each new publication has its own passwd and
> policies directories and is properly configured to use them.
There's already a bug with a patch to achieve this:
http://issues.apache.org/bugzilla/show_bug.cgi?id=43340
Maybe you'd like to give it a try - every feedback is very welcome.
-- Andreas
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: svn commit: r611243 - /lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
Posted by Richard Frovarp <Ri...@sendit.nodak.edu>.
Bob Harner wrote:
>> Nice. I haven't had a chance to fully test it, but it does look good.
>> The other area I am concerned about is the access-control.xml files. I
>> use templates to offer looks, but my sub-publications have nothing in
>> common so they need their own passwd and policies directories. Once you
>> load the publication, you're stuck with the ones it was set to. We could
>> just make it so that each new publication has its own passwd and
>> policies directories and is properly configured to use them.
>>
>
> But wouldn't that change make it harder to have multiple publications
> share the same authentication mechanisms? My sites, for example, all
> authenticate against the same LDAP repository.
>
Well, it could be a an option. And no it wouldn't have to. When you
create a sub-publication, by default it uses one of its parent's user
directory information. So if you have Parent A, and Child X and Child Z.
If both Child X & Z are using Parent A's authentication, then users in
any of the three publications can log into any of the other three
publications.
For me, Parent A is a certain look and feel. Child X and Child Z are two
completely different school districts. They both go against my
authentication mechanism, but teachers in one school shouldn't have
access to the other district's site.
There are instances where you could go either way. My point is once the
publication is loaded, your stuck with the way you have until you
restart the application server. If people are going to be automatically
taken to their new publication, this is another area that needs to be
addressed, because no matter which way we choose, there will be people
negatively impacted. Perhaps an option to choose when creating a new
publication would work best here.
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: svn commit: r611243 - /lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
Posted by Bob Harner <bo...@gmail.com>.
> Nice. I haven't had a chance to fully test it, but it does look good.
> The other area I am concerned about is the access-control.xml files. I
> use templates to offer looks, but my sub-publications have nothing in
> common so they need their own passwd and policies directories. Once you
> load the publication, you're stuck with the ones it was set to. We could
> just make it so that each new publication has its own passwd and
> policies directories and is properly configured to use them.
But wouldn't that change make it harder to have multiple publications
share the same authentication mechanisms? My sites, for example, all
authenticate against the same LDAP repository.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: svn commit: r611243 - /lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
Posted by Richard Frovarp <ri...@sendit.nodak.edu>.
Andreas Hartmann wrote:
> Andreas Hartmann schrieb:
>> Richard Frovarp schrieb:
>>> andreas@apache.org wrote:
>>>> Author: andreas
>>>> Date: Fri Jan 11 09:49:48 2008
>>>> New Revision: 611243
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=611243&view=rev
>>>> Log:
>>>> Redirect to pub intro page after creating a publication
>>>>
>>>>
>>>
>>> The only problem with this is it then loads the publication into
>>> memory and certain items can no longer be changed without a restart.
>>> If there were a way to force the re-read of configuration
>>> information, this wouldn't be a problem. But as it is now, that
>>> requires a restart of the application server.
>>
>> OK, I see the problem. IMO the cleanest solution would be allowing to
>> change the publication configuration via the Lenya GUI. It shouldn't
>> be too hard to write such a usecase.
>
> I committed a usecase to change some of the publication settings in
> the admin environment. Feel free to enhance the GUI and the
> functionality.
>
> Please test - TIA!
>
> If you consider the functionality too risky, we can disable it in 2.0.1.
>
> -- Andreas
>
>
Nice. I haven't had a chance to fully test it, but it does look good.
The other area I am concerned about is the access-control.xml files. I
use templates to offer looks, but my sub-publications have nothing in
common so they need their own passwd and policies directories. Once you
load the publication, you're stuck with the ones it was set to. We could
just make it so that each new publication has its own passwd and
policies directories and is properly configured to use them.
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: svn commit: r611243 - /lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
Posted by Andreas Hartmann <an...@apache.org>.
Andreas Hartmann schrieb:
> Richard Frovarp schrieb:
>> andreas@apache.org wrote:
>>> Author: andreas
>>> Date: Fri Jan 11 09:49:48 2008
>>> New Revision: 611243
>>>
>>> URL: http://svn.apache.org/viewvc?rev=611243&view=rev
>>> Log:
>>> Redirect to pub intro page after creating a publication
>>>
>>>
>>
>> The only problem with this is it then loads the publication into
>> memory and certain items can no longer be changed without a restart.
>> If there were a way to force the re-read of configuration information,
>> this wouldn't be a problem. But as it is now, that requires a restart
>> of the application server.
>
> OK, I see the problem. IMO the cleanest solution would be allowing to
> change the publication configuration via the Lenya GUI. It shouldn't be
> too hard to write such a usecase.
I committed a usecase to change some of the publication settings in the
admin environment. Feel free to enhance the GUI and the functionality.
Please test - TIA!
If you consider the functionality too risky, we can disable it in 2.0.1.
-- Andreas
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: svn commit: r611243 - /lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
Posted by Andreas Hartmann <an...@apache.org>.
Richard Frovarp schrieb:
> Jann Forrer wrote:
>> Andreas Hartmann wrote:
>>
>>> Richard Frovarp schrieb:
>>>
>>>> andreas@apache.org wrote:
>>>>
>>>>> Author: andreas
>>>>> Date: Fri Jan 11 09:49:48 2008
>>>>> New Revision: 611243
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=611243&view=rev
>>>>> Log:
>>>>> Redirect to pub intro page after creating a publication
>>>>>
>>>>>
>>>> The only problem with this is it then loads the publication into
>>>> memory and certain items can no longer be changed without a restart.
>>>> If there were a way to force the re-read of configuration information,
>>>> this wouldn't be a problem. But as it is now, that requires a restart
>>>> of the application server.
[...]
> I agree. Do we want to rollback this change then as we don't have the
> functionality at the moment?
I introducted the change for the following reason: After 2.0 was
released, we had up to 200 publications in the zones demo. When someone
has created a new publication, she had to find it in a quite long list
before she could access it. This was somewhat cumbersome especially
because most publication IDs were something like "11312foobar" :)
I don't mind rolling it back. Richard, do you have the time to do this?
Sorry for the inconvenience ...
-- Andreas
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: svn commit: r611243 - /lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
Posted by Richard Frovarp <ri...@sendit.nodak.edu>.
Jann Forrer wrote:
> Andreas Hartmann wrote:
>
>> Richard Frovarp schrieb:
>>
>>> andreas@apache.org wrote:
>>>
>>>> Author: andreas
>>>> Date: Fri Jan 11 09:49:48 2008
>>>> New Revision: 611243
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=611243&view=rev
>>>> Log:
>>>> Redirect to pub intro page after creating a publication
>>>>
>>>>
>>>>
>>> The only problem with this is it then loads the publication into
>>> memory and certain items can no longer be changed without a restart.
>>> If there were a way to force the re-read of configuration information,
>>> this wouldn't be a problem. But as it is now, that requires a restart
>>> of the application server.
>>>
>> OK, I see the problem. IMO the cleanest solution would be allowing to
>> change the publication configuration via the Lenya GUI. It shouldn't be
>> too hard to write such a usecase.
>>
>>
> +1 also from a deplyoment point of view. Today if we go productive with
> a website we have to wait for a server resart until the changes are
> known. With such a feature we could switch immediately :-)
>
> [ ... ]
>
> Jann
>
I agree. Do we want to rollback this change then as we don't have the
functionality at the moment?
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: svn commit: r611243 - /lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
Posted by Jann Forrer <ja...@id.uzh.ch>.
Andreas Hartmann wrote:
> Richard Frovarp schrieb:
>> andreas@apache.org wrote:
>>> Author: andreas
>>> Date: Fri Jan 11 09:49:48 2008
>>> New Revision: 611243
>>>
>>> URL: http://svn.apache.org/viewvc?rev=611243&view=rev
>>> Log:
>>> Redirect to pub intro page after creating a publication
>>>
>>>
>>
>> The only problem with this is it then loads the publication into
>> memory and certain items can no longer be changed without a restart.
>> If there were a way to force the re-read of configuration information,
>> this wouldn't be a problem. But as it is now, that requires a restart
>> of the application server.
>
> OK, I see the problem. IMO the cleanest solution would be allowing to
> change the publication configuration via the Lenya GUI. It shouldn't be
> too hard to write such a usecase.
>
+1 also from a deplyoment point of view. Today if we go productive with
a website we have to wait for a server resart until the changes are
known. With such a feature we could switch immediately :-)
[ ... ]
Jann
Re: svn commit: r611243 - /lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
Posted by Andreas Hartmann <an...@apache.org>.
Richard Frovarp schrieb:
> andreas@apache.org wrote:
>> Author: andreas
>> Date: Fri Jan 11 09:49:48 2008
>> New Revision: 611243
>>
>> URL: http://svn.apache.org/viewvc?rev=611243&view=rev
>> Log:
>> Redirect to pub intro page after creating a publication
>>
>>
>
> The only problem with this is it then loads the publication into memory
> and certain items can no longer be changed without a restart. If there
> were a way to force the re-read of configuration information, this
> wouldn't be a problem. But as it is now, that requires a restart of the
> application server.
OK, I see the problem. IMO the cleanest solution would be allowing to
change the publication configuration via the Lenya GUI. It shouldn't be
too hard to write such a usecase.
I'd rather add methods like
Publication.setName()
than
Publication.reloadConfiguration()
to the Publication interface. This would be nice to have anyway (IIRC I
already filed a bug that it should be possible to change the proxy
settings via the GUI).
WDYT?
-- Andreas
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: svn commit: r611243 - /lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
Posted by Richard Frovarp <ri...@sendit.nodak.edu>.
andreas@apache.org wrote:
> Author: andreas
> Date: Fri Jan 11 09:49:48 2008
> New Revision: 611243
>
> URL: http://svn.apache.org/viewvc?rev=611243&view=rev
> Log:
> Redirect to pub intro page after creating a publication
>
>
The only problem with this is it then loads the publication into memory
and certain items can no longer be changed without a restart. If there
were a way to force the re-read of configuration information, this
wouldn't be a problem. But as it is now, that requires a restart of the
application server.
For instance, I create a new publication based on an existing one,
taking advantage of our templating capabilities. I then go in and copy
over my template passwd and policies directories, edit
access-control.xml to point to the publication's passwd and policies
directory instead of its template. Then one needs to modify the
publication.xml file to change the proxy settings. If you do this before
accessing the intro page, the changes are loaded and everything works.
If you do this after accessing the intro page, you'd have to restart the
servlet engine.
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org