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 2005/04/12 22:48:02 UTC
svn commit: r161115 - in lenya/trunk/src:
java/org/apache/lenya/cms/publication/DefaultDocument.java
webapp/lenya/pubs/blog/config/menus/entry.xsp
Author: andreas
Date: Tue Apr 12 13:48:01 2005
New Revision: 161115
URL: http://svn.apache.org/viewcvs?view=rev&rev=161115
Log:
check for site manager hint != null in DefaultDocument.exists()
Modified:
lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java
lenya/trunk/src/webapp/lenya/pubs/blog/config/menus/entry.xsp
Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java?view=diff&r1=161114&r2=161115
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java Tue Apr 12 13:48:01 2005
@@ -276,24 +276,29 @@
*/
public boolean exists() throws DocumentException {
boolean exists;
- SiteManager siteManager = null;
- ServiceSelector selector = null;
- try {
- selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
- siteManager = (SiteManager) selector.select(getPublication().getSiteManagerHint());
- if (siteManager != null) {
- exists = siteManager.contains(this);
- } else {
+ String hint = getPublication().getSiteManagerHint();
+ if (hint == null) {
+ try {
exists = SourceUtil.exists(getSourceURI(), this.manager);
+ } catch (Exception e) {
+ throw new DocumentException(e);
}
- } catch (Exception e) {
- throw new DocumentException(e);
- } finally {
- if (selector != null) {
- if (siteManager != null) {
- selector.release(siteManager);
+ } else {
+ SiteManager siteManager = null;
+ ServiceSelector selector = null;
+ try {
+ selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
+ siteManager = (SiteManager) selector.select(hint);
+ exists = siteManager.contains(this);
+ } catch (Exception e) {
+ throw new DocumentException(e);
+ } finally {
+ if (selector != null) {
+ if (siteManager != null) {
+ selector.release(siteManager);
+ }
+ this.manager.release(selector);
}
- this.manager.release(selector);
}
}
return exists;
@@ -483,8 +488,7 @@
nodes[1] = historySource.getNode();
} catch (Exception e) {
throw new RuntimeException(e);
- }
- finally {
+ } finally {
if (resolver != null) {
if (documentSource != null) {
resolver.release(documentSource);
Modified: lenya/trunk/src/webapp/lenya/pubs/blog/config/menus/entry.xsp
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/blog/config/menus/entry.xsp?view=diff&r1=161114&r2=161115
==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/blog/config/menus/entry.xsp (original)
+++ lenya/trunk/src/webapp/lenya/pubs/blog/config/menus/entry.xsp Tue Apr 12 13:48:01 2005
@@ -44,7 +44,7 @@
<menus>
<menu i18n:attr="name" name="File">
<block>
- <item wf:event="edit" uc:usecase="edit" uc:step="open" href="?&form=entry">Edit with Forms</item>
+ <item wf:event="edit" uc:usecase="edit.forms" href="?&form=entry">Edit with Forms</item>
<item wf:event="edit" href="index-bxe.html">Edit with BXE</item>
<item wf:event="edit" uc:usecase="1formedit" uc:step="open">Edit with one Form</item>
</block>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org