--- java/src/org/apache/lenya/defaultpub/cms/usecases/Delete.java (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ java/src/org/apache/lenya/defaultpub/cms/usecases/Delete.java (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1,90 @@ +/* + * Copyright 1999-2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.lenya.defaultpub.cms.usecases; + +import org.apache.lenya.cms.publication.Document; +import org.apache.lenya.cms.publication.util.DocumentSet; +import org.apache.lenya.cms.site.SiteException; +import org.apache.lenya.cms.site.SiteManager; +import org.apache.lenya.cms.workflow.WorkflowManager; + +/** + * Delete usecase handler. + * + * @version $Id:$ + */ +public class Delete extends org.apache.lenya.cms.site.usecases.Delete { + + /** + * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions() + */ + protected void doCheckPreconditions() throws Exception { + super.doCheckPreconditions(); + DocumentSet set = getSubset(); + WorkflowManager wfManager = null; + try { + wfManager = (WorkflowManager) this.manager.lookup(WorkflowManager.ROLE); + if (!wfManager.canInvoke(set, getEvent())) { + addErrorMessage("The workflow event cannot be invoked on all documents."); + } + } finally { + if (wfManager != null) { + this.manager.release(wfManager); + } + } + } + + /** + * @return The workflow event. + */ + protected String getEvent() { + return "delete"; + } + + /** + * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute() + */ + protected void doExecute() throws Exception { + + DocumentSet set = getSubset(); + WorkflowManager wfManager = null; + try { + wfManager = (WorkflowManager) this.manager.lookup(WorkflowManager.ROLE); + wfManager.invoke(set, getEvent(), true); + } finally { + if (wfManager != null) { + this.manager.release(wfManager); + } + } + + super.doExecute(); + } + + /** + * @return A document set containing all requiring resources and the source + * document itself. + * @throws SiteException if an error occurs. + */ + protected DocumentSet getSubset() throws SiteException { + Document document = getSourceDocument(); + SiteManager manager = document.getPublication().getSiteManager(); + DocumentSet set = new DocumentSet(manager.getRequiringResources(document)); + set.add(document); + return set; + } + +} --- java/src/org/apache/lenya/defaultpub/cms/usecases/Publish.java (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ java/src/org/apache/lenya/defaultpub/cms/usecases/Publish.java (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1,270 @@ +/* + * Copyright 1999-2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.lenya.defaultpub.cms.usecases; + +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.List; + +import org.apache.lenya.cms.publication.Document; +import org.apache.lenya.cms.publication.DocumentFactory; +import org.apache.lenya.cms.publication.Publication; +import org.apache.lenya.cms.publication.PublicationException; +import org.apache.lenya.cms.publication.util.DocumentVisitor; +import org.apache.lenya.cms.publication.util.OrderedDocumentSet; +import org.apache.lenya.cms.site.SiteManager; +import org.apache.lenya.cms.usecase.DocumentUsecase; +import org.apache.lenya.cms.usecase.scheduling.UsecaseScheduler; +import org.apache.lenya.cms.workflow.WorkflowManager; +import org.apache.lenya.workflow.WorkflowException; + +/** + * Publish usecase handler. + * + * @version $Id$ + */ +public class Publish extends DocumentUsecase implements DocumentVisitor { + + protected static final String MISSING_DOCUMENTS = "missingDocuments"; + protected static final String SUBTREE = "subtree"; + protected static final String ALLOW_SINGLE_DOCUMENT = "allowSingleDocument"; + protected static final String SCHEDULE = "schedule"; + protected static final String SCHEDULE_TIME = "schedule.time"; + + /** + * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters() + */ + protected void initParameters() { + super.initParameters(); + + Date now = new GregorianCalendar().getTime(); + DateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + setParameter(SCHEDULE_TIME, format.format(now)); + } + + /** + * Checks if the workflow event is supported and the parent of the document exists in the live + * area. + * + * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions() + */ + protected void doCheckPreconditions() throws Exception { + super.doCheckPreconditions(); + if (getErrorMessages().isEmpty()) { + + String event = getEvent(); + Document document = getSourceDocument(); + + if (!document.getArea().equals(Publication.AUTHORING_AREA)) { + addErrorMessage("This usecase can only be invoked from the authoring area."); + return; + } + + WorkflowManager wfManager = null; + try { + wfManager = (WorkflowManager) this.manager.lookup(WorkflowManager.ROLE); + if (!wfManager.canInvoke(getSourceDocument(), event)) { + setParameter(ALLOW_SINGLE_DOCUMENT, Boolean.toString(false)); + addInfoMessage("The single document cannot be published because the workflow event cannot be invoked."); + } else { + setParameter(ALLOW_SINGLE_DOCUMENT, Boolean.toString(true)); + } + } finally { + if (wfManager != null) { + this.manager.release(wfManager); + } + } + + Publication publication = document.getPublication(); + + Document liveDocument = publication.getAreaVersion(document, Publication.LIVE_AREA); + + List missingDocuments = new ArrayList(); + + SiteManager manager = publication.getSiteManager(); + Document[] requiredDocuments = manager.getRequiredResources(liveDocument); + for (int i = 0; i < requiredDocuments.length; i++) { + if (!manager.containsInAnyLanguage(requiredDocuments[i])) { + Document authoringVersion = publication.getAreaVersion(requiredDocuments[i], + Publication.AUTHORING_AREA); + missingDocuments.add(authoringVersion); + } + } + + if (!missingDocuments.isEmpty()) { + addErrorMessage("Cannot publish document unless the following documents are published:"); + setParameter(MISSING_DOCUMENTS, missingDocuments); + } + } + } + + /** + * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute() + */ + protected void doExecute() throws Exception { + + boolean schedule = Boolean.valueOf(getBooleanCheckboxParameter(SCHEDULE)).booleanValue(); + if (schedule) { + deleteParameter(SCHEDULE); + String dateString = getParameterAsString(SCHEDULE_TIME); + DateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + UsecaseScheduler scheduler = null; + try { + Date date = null; + try { + date = format.parse(dateString); + } catch (ParseException e) { + addErrorMessage("The scheduler date must be of the form 'yyyy-MM-dd hh:mm:ss'."); + } + if (date != null) { + scheduler = (UsecaseScheduler) this.manager.lookup(UsecaseScheduler.ROLE); + scheduler.schedule(this, date); + } + } finally { + if (scheduler != null) { + this.manager.release(scheduler); + } + } + } else { + super.doExecute(); + if (isSubtreeEnabled()) { + publishAll(getSourceDocument()); + } else { + publish(getSourceDocument()); + } + } + } + + /** + * Publishes a document. + * @param authoringDocument The authoring document. + */ + protected void publish(Document authoringDocument) { + + WorkflowManager wfManager = null; + try { + wfManager = (WorkflowManager) this.manager.lookup(WorkflowManager.ROLE); + getDocumentManager().copyDocumentToArea(authoringDocument, Publication.LIVE_AREA); + wfManager.invoke(authoringDocument, getEvent()); + } catch (Exception e) { + throw new RuntimeException(e); + } finally { + if (wfManager != null) { + this.manager.release(wfManager); + } + } + } + + /** + * @return The event to invoke. + */ + private String getEvent() { + return "publish"; + } + + /** + * Publishes a document or the subtree below a document, based on the parameter SUBTREE. + * @param document The document. + */ + protected void publishAll(Document document) { + + if (getLogger().isDebugEnabled()) { + getLogger().debug("Publishing document [" + document + "]"); + getLogger().debug("Subtree publishing: [" + isSubtreeEnabled() + "]"); + } + + try { + + OrderedDocumentSet set = new OrderedDocumentSet(); + SiteManager manager = document.getPublication().getSiteManager(); + Document[] descendants = manager.getRequiringResources(document); + + set = new OrderedDocumentSet(descendants); + set.add(document); + set.visitAscending(this); + } catch (Exception e) { + throw new RuntimeException(e); + } + + if (getLogger().isDebugEnabled()) { + getLogger().debug("Publishing completed."); + } + } + + /** + * Returns whether subtree publishing is enabled. + * @return A boolean value. + */ + protected boolean isSubtreeEnabled() { + String value = getParameterAsString(SUBTREE); + return value != null; + } + + /** + * @throws PublicationException + * @see org.apache.lenya.cms.publication.util.DocumentVisitor#visitDocument(org.apache.lenya.cms.publication.Document) + */ + public void visitDocument(Document document) throws PublicationException { + + if (getLogger().isDebugEnabled()) { + getLogger().debug("Visiting resource [" + document + "]"); + } + + try { + publishAllLanguageVersions(document); + } catch (WorkflowException e) { + throw new PublicationException(e); + } + } + + /** + * Publishes all existing language versions of a document. + * @param document The document. + * @throws PublicationException if an error occurs. + * @throws WorkflowException + */ + protected void publishAllLanguageVersions(Document document) throws PublicationException, + WorkflowException { + String[] languages = document.getPublication().getLanguages(); + DocumentFactory factory = document.getIdentityMap().getFactory(); + + WorkflowManager wfManager = null; + try { + wfManager = (WorkflowManager) this.manager.lookup(WorkflowManager.ROLE); + for (int i = 0; i < languages.length; i++) { + Document version = factory.getLanguageVersion(document, languages[i]); + if (version.exists()) { + if (wfManager.canInvoke(version, getEvent())) { + publish(version); + } + } + } + } catch (Exception e) { + throw new RuntimeException(e); + } finally { + if (wfManager != null) { + this.manager.release(wfManager); + } + } + + } + +} + Id + native --- java/src/org/apache/lenya/defaultpub/cms/usecases/Deactivate.java (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ java/src/org/apache/lenya/defaultpub/cms/usecases/Deactivate.java (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1,211 @@ +/* + * Copyright 1999-2004 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.lenya.defaultpub.cms.usecases; + +import org.apache.avalon.framework.service.ServiceException; +import org.apache.lenya.cms.publication.Document; +import org.apache.lenya.cms.publication.DocumentFactory; +import org.apache.lenya.cms.publication.Publication; +import org.apache.lenya.cms.publication.PublicationException; +import org.apache.lenya.cms.publication.util.DocumentVisitor; +import org.apache.lenya.cms.publication.util.OrderedDocumentSet; +import org.apache.lenya.cms.site.SiteManager; +import org.apache.lenya.cms.usecase.DocumentUsecase; +import org.apache.lenya.cms.workflow.WorkflowManager; +import org.apache.lenya.workflow.WorkflowException; + +/** + * Deactivate usecase handler. + * + * @version $Id:$ + */ +public class Deactivate extends DocumentUsecase implements DocumentVisitor { + + /** + * Checks if the workflow event is supported and the parent of the document + * exists in the live area. + * + * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions() + */ + protected void doCheckPreconditions() throws Exception { + super.doCheckPreconditions(); + if (getErrorMessages().isEmpty()) { + + if (!getSourceDocument().getArea().equals(Publication.AUTHORING_AREA)) { + addErrorMessage("This usecase can only be invoked from the authoring area."); + return; + } + + String event = getEvent(); + + WorkflowManager wfManager = null; + try { + wfManager = (WorkflowManager) this.manager.lookup(WorkflowManager.ROLE); + if (!wfManager.canInvoke(getSourceDocument(), event)) { + setParameter(Publish.ALLOW_SINGLE_DOCUMENT, Boolean.toString(false)); + addInfoMessage("The single document cannot be deactivated because the workflow event cannot be invoked."); + } else { + setParameter(Publish.ALLOW_SINGLE_DOCUMENT, Boolean.toString(true)); + } + } finally { + if (wfManager != null) { + this.manager.release(wfManager); + } + } + + } + } + + /** + * @see org.apache.lenya.cms.usecase.AbstractUsecase#doExecute() + */ + protected void doExecute() throws Exception { + super.doExecute(); + if (isSubtreeEnabled()) { + deactivateAll(getSourceDocument()); + } else { + deactivate(getSourceDocument()); + } + } + + /** + * Deactivates a document. + * @param authoringDocument The authoring document. + */ + protected void deactivate(Document authoringDocument) { + + Publication publication = authoringDocument.getPublication(); + boolean success = false; + + WorkflowManager wfManager = null; + try { + wfManager = (WorkflowManager) this.manager.lookup(WorkflowManager.ROLE); + Document liveDocument = publication.getAreaVersion(authoringDocument, + Publication.LIVE_AREA); + getDocumentManager().deleteDocument(liveDocument); + + wfManager.invoke(authoringDocument, getEvent()); + success = true; + } catch (Exception e) { + throw new RuntimeException(e); + } finally { + if (getLogger().isDebugEnabled()) { + getLogger().debug("Deactivate document [" + authoringDocument + "]. Success: [" + + success + "]"); + } + if (wfManager != null) { + this.manager.release(wfManager); + } + } + + } + + /** + * @return The event to invoke. + */ + private String getEvent() { + return "deactivate"; + } + + /** + * Deactivates a document or the subtree below a document, based on the + * parameter SUBTREE. + * @param document The document. + */ + protected void deactivateAll(Document document) { + + if (getLogger().isDebugEnabled()) { + getLogger().debug("Deactivating document [" + document + "]"); + getLogger().debug("Subtree deactivation: [" + isSubtreeEnabled() + "]"); + } + + try { + + OrderedDocumentSet set = new OrderedDocumentSet(); + SiteManager manager = document.getPublication().getSiteManager(); + Document[] descendants = manager.getRequiringResources(document); + + set = new OrderedDocumentSet(descendants); + set.add(document); + set.visitDescending(this); + } catch (Exception e) { + throw new RuntimeException(e); + } + + if (getLogger().isDebugEnabled()) { + getLogger().debug("Publishing completed."); + } + } + + /** + * Returns whether subtree publishing is enabled. + * @return A boolean value. + */ + protected boolean isSubtreeEnabled() { + String value = getParameterAsString(Publish.SUBTREE); + return value != null; + } + + /** + * @throws PublicationException + * @see org.apache.lenya.cms.publication.util.DocumentVisitor#visitDocument(org.apache.lenya.cms.publication.Document) + */ + public void visitDocument(Document document) throws PublicationException { + + if (getLogger().isDebugEnabled()) { + getLogger().debug("Visiting resource [" + document + "]"); + } + + try { + deactivateAllLanguageVersions(document); + } catch (WorkflowException e) { + throw new PublicationException(e); + } + } + + /** + * Publishes all existing language versions of a document. + * @param document The document. + * @throws PublicationException if an error occurs. + * @throws WorkflowException + */ + protected void deactivateAllLanguageVersions(Document document) throws PublicationException, + WorkflowException { + String[] languages = document.getPublication().getLanguages(); + DocumentFactory factory = document.getIdentityMap().getFactory(); + WorkflowManager wfManager = null; + try { + wfManager = (WorkflowManager) this.manager.lookup(WorkflowManager.ROLE); + for (int i = 0; i < languages.length; i++) { + Document version = factory.getLanguageVersion(document, languages[i]); + if (version.exists()) { + if (wfManager.canInvoke(getSourceDocument(), getEvent())) { + deactivate(version); + } + } + } + } catch (ServiceException e) { + throw new RuntimeException(e); + } finally { + if (wfManager != null) { + this.manager.release(wfManager); + } + } + + } + +} --- parameter-doctype.xmap (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ parameter-doctype.xmap (.../trunk/src/webapp/lenya/pubs) @@ -20,11 +20,6 @@ - - - - - @@ -37,10 +32,6 @@ - - - - @@ -56,24 +47,24 @@ - - - - - - + + + + + + - - - - - - + + + + + + --- xslt/page2xhtml.xsl (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ xslt/page2xhtml.xsl (.../trunk/src/webapp/lenya/pubs) @@ -24,9 +24,7 @@ xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:dcterms="http://purl.org/dc/terms/" - xmlns:i18n="http://apache.org/cocoon/i18n/2.1" - exclude-result-prefixes="page xhtml" + exclude-result-prefixes="page xhtml dc lenya" > @@ -39,13 +37,24 @@ + + + + + + + + + + <xsl:value-of select="//lenya:meta/dc:title"/> +
@@ -58,7 +67,7 @@ - - - -
+ @@ -69,50 +78,12 @@
- -
- - - last_published: - - - - - - - - - - - - - - - - / - - - - - - / - - - - - --- xslt/xhtml2xhtml.xsl (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ xslt/xhtml2xhtml.xsl (.../trunk/src/webapp/lenya/pubs) @@ -83,9 +83,6 @@ - - @@ -98,7 +95,6 @@ - --- xslt/page2xhtml-homepage.xsl (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ xslt/page2xhtml-homepage.xsl (.../trunk/src/webapp/lenya/pubs) @@ -19,6 +19,6 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > - + --- xslt/links2xhtml.xsl (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ xslt/links2xhtml.xsl (.../trunk/src/webapp/lenya/pubs) @@ -1,4 +1,4 @@ - + - -
-

-
    - -
-
-
+ + - -
  • - - - -
  • -
    + +
    +

    +
      + +
    +
    +
    + + +
  • + +
  • +
    --- xslt/upload.xsl (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ xslt/upload.xsl (.../trunk/src/webapp/lenya/pubs) @@ -5,6 +5,8 @@ + +
    --- xslt/homepage2xhtml.xsl (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ xslt/homepage2xhtml.xsl (.../trunk/src/webapp/lenya/pubs) @@ -19,6 +19,6 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > - + --- xslt/page2xhtml-xhtml.xsl (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ xslt/page2xhtml-xhtml.xsl (.../trunk/src/webapp/lenya/pubs) @@ -4,6 +4,6 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > - - + + --- xslt/page2xhtml-links.xsl (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ xslt/page2xhtml-links.xsl (.../trunk/src/webapp/lenya/pubs) @@ -19,6 +19,6 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > - + --- menus.xmap (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ menus.xmap (.../trunk/src/webapp/lenya/pubs) @@ -15,7 +15,7 @@ limitations under the License. --> - + @@ -39,14 +39,16 @@ + - + --- doctypes.xmap (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ doctypes.xmap (.../trunk/src/webapp/lenya/pubs) @@ -19,25 +19,18 @@ - - - - - - - - + - + - + @@ -47,10 +40,10 @@ - - + + - + --- config/ac/passwd/ldap.properties.sample (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ config/ac/passwd/ldap.properties.sample (.../trunk/src/webapp/lenya/pubs) @@ -1,6 +1,6 @@ ############################################################################# # File: ldap.properties.sample -# $Id: $ +# $Id$ ############################################################################# ############################################################################# @@ -52,8 +52,3 @@ mgr-pw= key-store=.keystore security-protocol=ssl - - -# this property is no longer used (deprecated) ! -# partial-user-dn=ou=Others,dc=interactivesystems,dc=info - + Id + native --- config/ac/usecase-policies.xml (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ config/ac/usecase-policies.xml (.../trunk/src/webapp/lenya/pubs) @@ -30,7 +30,7 @@ - + --- config/tasks/tasks.xconf (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ config/tasks/tasks.xconf (.../trunk/src/webapp/lenya/pubs) @@ -25,54 +25,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -88,16 +40,6 @@ - - - - - - - - - - --- config/tasks/targets.xml (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ config/tasks/targets.xml (.../trunk/src/webapp/lenya/pubs) @@ -77,6 +77,8 @@ This is a test of the AntTask: ${text} + + @@ -103,185 +105,7 @@ /> - - - - - - - - - - - - - - - - - - - - - - - - - - init the workflow history with document-id: ${create.parent-id}/${create.child-id} - with document-type: ${create.doctype} - with language: ${create.language} - with user ID: ${create.userid} - with IP address: ${create.ipaddress} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - init the workflow history with document-id: ${create.document-id} - with document-type: ${create.doctype} - with language: ${create.new.language} - - - - - - Old file: ${document.old.file} - - - New file: ${document.new.file} - - Add the meta data to the newly created file: ${document.new.file} - - - - - - - - - - - - - - - - - - - - - - Remove label: ${remove.label.label-name} - for language: ${remove.label.language} - from document: ${remove.label.document-id} - in area: ${authoring.area} - - - - - - Remove file: ${document.file} - - - @@ -396,16 +220,6 @@ the document id for the copy is now ${node.newdocumentid} - - - - the document id for the renamed file is now ${node.newdocumentid} - - @@ -623,48 +437,13 @@ - - - - - - - - - Rename Label - - - - - - - - - Change Visibility - - - moveDocument - - renameDocument - - - - - - - Moving sitetree node - Document ID: ${movenode.documentid} - Direction: ${movenode.direction} - - - - --- config/publication.xconf (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ config/publication.xconf (.../trunk/src/webapp/lenya/pubs) @@ -17,7 +17,7 @@ - + en de @@ -26,7 +26,7 @@ org.apache.lenya.cms.publication.DefaultDocumentBuilder - - - --- config/menus/links.xsp (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ config/menus/links.xsp (.../trunk/src/webapp/lenya/pubs) @@ -36,8 +36,6 @@ - String projectid = parameters.getParameter("projectid","null"); - String xmlSource = ; String documentId = + "/" + + "/authoring" + + "_" + ; String urisParameter = "uris=" + + "/" + + "/live" + ; @@ -69,37 +67,34 @@ - + - Logout + Logout - + - - Edit with one Form - + - - - http://lenya.apache.org/docs/index.htmlSystem Documentation - Wiki - - - /index.htmlApache Lenya Homepage - /about.htmlAbout Apache Lenya - - + + Documentation + Wiki + + + /index.htmlApache Lenya Homepage + /about.htmlAbout Apache Lenya + + View Task Logs - + --- config/menus/generic.xsp (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ config/menus/generic.xsp (.../trunk/src/webapp/lenya/pubs) @@ -1,289 +0,0 @@ - - - - - - - - - org.apache.lenya.cms.publication.Document - org.apache.lenya.cms.publication.Publication - - - - - - String projectid = parameters.getParameter("projectid","null"); - - String xmlSource = ; - String documentId = + "/" + + "/authoring" + + "_" + ; - String urisParameter = "uris=" + + "/" + + "/live" + ; - String area = ; - - String docType = ""; - try { - Document document = (Document) ; - if (document.exists()) { - docType = ; - } - } - catch (Exception e) { - throw new ProcessingException(e); - } - - boolean isDocument = false; - { - Object document = ; - try { - if (document != "" && ((Document) document).exists()) { - isDocument = true; - } - } - catch (Exception e) { - throw new ProcessingException(e); - } - } - - - - - - - - { - if (Publication.ARCHIVE_AREA.equals(area) || Publication.TRASH_AREA.equals(area)) { - New Document - } - else { - New Document - } - } - - - - - { - if (isDocument - && Publication.AUTHORING_AREA.equals(area) - ) { - - New Language Version - - } - else { - - New Language Version - - } - - String[] availableLanguages = (String[]); - if (isDocument - && Publication.AUTHORING_AREA.equals(area) - && availableLanguages.length > 1 - ) { - - Remove Language Version - - } else { - - Remove Language Version - - } - } - - - - Logout - - - - - - - Edit with Kupu - Edit with BXE - "?form=" + docTypeEdit with Forms - Edit with one Form - - - //info-?Edit Metadata - ?Edit Navigation Title - - - - - - - { - String docId = ; - - if (isDocument - && "".equals() - && Publication.AUTHORING_AREA.equals(area) - && !"/index".equals(docId)) { - Cut - } - else { - Cut - } - - if (isDocument - && Publication.AUTHORING_AREA.equals(area) - && !"/index".equals(docId)) { - Copy - } - else { - Copy - } - - String clipboard = (String) + "/"; - String currentDocumentId = + "/"; - - if (clipboard != null - && !"".equals(clipboard) - && Publication.AUTHORING_AREA.equals(area) - && !currentDocumentId.startsWith(clipboard) - && !"/index".equals(docId)) { - Paste - } - else { - Paste - } - } - - - - - - if (isDocument && "".equals() - && Publication.AUTHORING_AREA.equals(area)) { - Rename URL - } - else { - Rename URL - } - - if (isDocument) { - Edit Navigation Title - } - else { - Edit Navigation Title - } - if (isDocument) { - Change node visibility - } - else { - Change node visibility - } - - - - - if (isDocument - && "".equals() - && Publication.AUTHORING_AREA.equals(area) - && !"/index".equals()) { - ?properties.movenode.direction=upMove Up - ?properties.movenode.direction=downMove Down - } - else { - Move Up - Move Down - } - - - - - - { - - if (isDocument && - !"/index".equals()) { - Delete - Archive - } - else { - Delete - Archive - } - - if (isDocument && (area.equals(Publication.TRASH_AREA) || area.equals(Publication.ARCHIVE_AREA))) { - Restore - } - else { - Restore - } - } - - - - - - - - - { - if (isDocument && Publication.AUTHORING_AREA.equals(area)) { - - Submit - Reject - ?urisParameter&sources=xmlSource&task-id=publishPublish - Deactivate - - Schedule - - } - else { - - Submit - Reject - Publish - Deactivate - - Schedule - - } - } - - - - - - Documentation - Wiki - - - /index.htmlApache Lenya Homepage - /about.htmlAbout Apache Lenya - - - View Task Logs - - - - - - --- config/usecases.xconf (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ config/usecases.xconf (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + --- config/workflow/workflow.xml (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ config/workflow/workflow.xml (.../trunk/src/webapp/lenya/pubs) @@ -19,8 +19,7 @@ + xsi:schemaLocation="http://apache.org/cocoon/lenya/workflow/1.0 ../../../../resources/entities/workflow.xsd"> @@ -82,5 +81,5 @@ edit - + --- config/doctypes/schemas/homepage.rng (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ config/doctypes/schemas/homepage.rng (.../trunk/src/webapp/lenya/pubs) @@ -29,36 +29,6 @@ xmlns:xhtml="http://www.w3.org/1999/xhtml" > - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- config/doctypes/samples/xhtml.xml (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ config/doctypes/samples/xhtml.xml (.../trunk/src/webapp/lenya/pubs) @@ -1,5 +1,5 @@ - dcrights - - Default Publication - - - Default Publication - Welcome to the default Lenya publication! - The purpose of this publication is - - to show beginners the basic functionality of the Lenya CMS, - to provide an "out of the box" publication that can be easily adapted and used, and - to provide a basis for reference implementations of new concepts and best practices. - - + + Default Publication + + +

    Default Publication

    +

    Welcome to the default Lenya publication!

    +

    The purpose of this publication is

    +
      +
    • to show beginners the basic functionality of the Lenya CMS,
    • +
    • to provide an "out of the box" publication that can be easily adapted and used, and
    • +
    • to provide a basis for reference implementations of new concepts and best practices.
    • +
    +

    You won't find any fancy and confusing bells and whistles here, but the publication contains everything you need to get started. - - - +

    + + --- config/doctypes/doctypes.xconf (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ config/doctypes/doctypes.xconf (.../trunk/src/webapp/lenya/pubs) @@ -20,40 +20,26 @@ - - - homepage.xml - - - + + - - - links.xml - - - + - - - xhtml.xml - - - + --- sitemap.xmap (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ sitemap.xmap (.../trunk/src/webapp/lenya/pubs) @@ -19,14 +19,12 @@ - - - + @@ -46,14 +44,14 @@ - + - + --- usecase-bxe.xmap (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ usecase-bxe.xmap (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1,301 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + author date id revision + native --- lenya/resources/i18n/cmsui.xml (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ lenya/resources/i18n/cmsui.xml (.../trunk/src/webapp/lenya/pubs) @@ -17,7 +17,7 @@ limitations under the License. - $Id$ + $Id: cmsui.xml,v 1.2 2004/03/13 12:24:30 roku Exp $ --> @@ -29,5 +29,4 @@ New language for existing Document There are already versions of this document for all languages. - Last Published --- lenya/resources/i18n/cmsui_fr.xml (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ lenya/resources/i18n/cmsui_fr.xml (.../trunk/src/webapp/lenya/pubs) @@ -17,7 +17,7 @@ limitations under the License. - $Id$ + $Id: cmsui_fr.xml,v 1.5 2004/04/17 07:22:46 roku Exp $ @translators Olivier Lange @@ -29,6 +29,5 @@ Créer une nouvelle traduction Nouvelle traduction d'un document existant Les traductions de ce document existent déjà dans toutes les langues. - Mise à jour --- lenya/resources/i18n/cmsui_de.xml (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ lenya/resources/i18n/cmsui_de.xml (.../trunk/src/webapp/lenya/pubs) @@ -17,7 +17,7 @@ limitations under the License. - $Id$ + $Id: cmsui_de.xml,v 1.3 2004/04/17 07:22:45 roku Exp $ --> @@ -29,6 +29,5 @@ Neue Sprachversion für existierendes Dokument anlegen Das Dokument existiert bereits in allen notwendigen Sprachen. - Letzte Aktualisierung --- lenya/usecases/site/create.jx (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ lenya/usecases/site/create.jx (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1,140 @@ + + + + + + + + New Document + +
    +
    + New Document +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
      + +
    • + + + +
    • +
      + +
    • + + + +
    • +
      +
    +
    + Parent ID: + +
    + Document ID*: + +
    (No whitespace, no special characters)
    + Navigation Title*: + +
    + Language*: + +
    + Creator: + +
    + Subject: + +
    + Publisher: + +
    + Date: + +
    + Rights: + +
    * required fields +
    + + +   + +
    + +
    +
    +
    +
    --- lenya/usecases/site/createLanguage.jx (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ lenya/usecases/site/createLanguage.jx (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1,133 @@ + + + + + + + + New Document + +
    +
    + New Document +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
      + +
    • + + + +
    • +
      + +
    • + + + +
    • +
      +
    +
    + Document ID: + +
    (No whitespace, no special characters)
    + Navigation Title*: + +
    + Language*: + +
    + Creator: + +
    + Subject: + +
    + Publisher: + +
    + Date: + +
    + Rights: + +
    * required fields +
    + + +   + +
    +
    +
    +
    +
    +
    --- lenya/usecases/workflow/submit.jx (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ lenya/usecases/workflow/submit.jx (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1,80 @@ + + + + + + + + Submit Document + +
    +
    + + + + +
    +
    +
    + + + + + + + + + + + + +
    +
      + +
    • + + + +
    • +
      + +
    • + + + +
    • +
      +
    +
    + + + + +
    + + +   + +
    +
    +
    +
    +
    +
    --- lenya/usecases/workflow/publish.jx (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ lenya/usecases/workflow/publish.jx (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1,105 @@ + + + + + + + + Publish + +
    +
    + Publish +
    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    Document: + +
    +
      + +
    • + + + +
    • +
      + +
    • + [] +
    • +
      + +
    • + + + +
    • +
      +
    +
    + + + + + + + + + + + + + + publish complete subtree +
    Schedule: + + +
    + + +   + +
    +
    +
    +
    +
    +
    --- lenya/usecases/workflow/deactivate.jx (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ lenya/usecases/workflow/deactivate.jx (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1,93 @@ + + + + + + + + Deactivate + +
    +
    + Deactivate +
    +
    +
    + + + + + + + + + + + + + + + + +
    Document: + +
    +
      + +
    • + + + +
    • +
      + +
    • + + + +
    • +
      +
    +
    + + + + + + + + + + + + + + deactivate complete subtree +
    + + +   + +
    +
    +
    +
    +
    +
    --- lenya/usecases/workflow/reject.jx (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ lenya/usecases/workflow/reject.jx (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1,80 @@ + + + + + + + + Reject Document + +
    +
    + + + + +
    +
    +
    + + + + + + + + + + + + +
    +
      + +
    • + + + +
    • +
      + +
    • + + + +
    • +
      +
    +
    + + + + +
    + + +   + +
    +
    +
    +
    +
    +
    --- publication.xml (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ publication.xml (.../trunk/src/webapp/lenya/pubs) @@ -19,8 +19,8 @@ Default Publication - 1.2.3-dev - 1.2.3-dev + 1.0 + 1.4-dev 2.1.6 This publication is a best practice, getting started publication. Special thanks to --- resources/shared/css/page.css (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ resources/shared/css/page.css (.../trunk/src/webapp/lenya/pubs) @@ -144,7 +144,7 @@ margin-right: 10px; float: right; position:relative; - top:-20px; + top:-20px } input.searchfield { @@ -264,10 +264,3 @@ font-size: 10px; margin: 10px 10px 10px 5px; } - -#footer { - padding: 5px; - font-size: 60%; - text-align: right; - border-top: solid 1px #BB9999; -} --- resources/shared/css/xhtml.css (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ resources/shared/css/xhtml.css (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1, @@ +/* Put your doctype-specific CSS here */ + native --- resources/shared/css/links.css (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ resources/shared/css/links.css (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1, @@ +/* Put your doctype-specific CSS here */ + native --- resources/shared/css/homepage.css (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ resources/shared/css/homepage.css (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1, @@ +/* Put your doctype-specific CSS here */ + native --- resources/misc/bxe/xhtml-bxe.css (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ resources/misc/bxe/xhtml-bxe.css (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1,16 @@ +/* +* Copyright 1999-2004 The Apache Software Foundation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +@import url(page.css); + author date id revision + native --- resources/misc/bxe/xhtml-namespaces.xml (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ resources/misc/bxe/xhtml-namespaces.xml (.../trunk/src/webapp/lenya/pubs) @@ -0,0 +1,26 @@ + + + + + + + +xhtml=http://www.w3.org/1999/xhtml +dc=http://purl.org/dc/elements/1.1/ +lenya=http://apache.org/cocoon/lenya/page-envelope/1.0 + + + author date id revision + native --- publication-sitemap.xmap (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ publication-sitemap.xmap (.../trunk/src/webapp/lenya/pubs) @@ -18,9 +18,7 @@ - - - + @@ -32,7 +30,7 @@ - + @@ -63,15 +61,14 @@ - - - + + @@ -81,19 +78,19 @@ - + - - + + - + @@ -125,9 +122,9 @@ - + - + @@ -153,36 +150,55 @@ - + - - - + + + + + + - + + + + + - + + + + + + + - - - - - - - - - - + + + + + + + + + + + + + + - + + + - + @@ -191,7 +207,7 @@ - + @@ -201,7 +217,7 @@ - + --- usecase-bxeng.xmap (.../branches/BRANCH_1_2_X/src/webapp/lenya/pubs) (revision +++ usecase-bxeng.xmap (.../trunk/src/webapp/lenya/pubs) @@ -1,290 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -