You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Andreas Hartmann <an...@apache.org> on 2006/08/18 12:12:22 UTC

Re: svn commit: r432540 - /lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/DocumentImpl.java

Hi Josias,

josias@apache.org wrote:

>       * @see org.apache.lenya.cms.publication.Document#getName()
>       */
>      public String getName() {
> -        String[] ids = getId().split("/");
> -        String nodeId = ids[ids.length - 1];
> -
> -        return nodeId;
> +        try {
> +            return getLink().getNode().getName();
> +        } catch (DocumentException e) {
> +            throw new RuntimeException(e);
> +        }

thanks for the fix!

Maybe we should deprecate this method, or is it convenient
enough that the document acts as a facade to the site structure
information?

-- Andreas

-- 
Andreas Hartmann
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
andreas.hartmann@wyona.com                     andreas@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org