You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by "Gregor J. Rothfuss" <gr...@apache.org> on 2005/03/10 00:20:41 UTC

Re: svn commit: r156703 - in lenya/sandbox/jcrsitetree: ./ legal/ lib/ lib/core/ lib/extra/ src/ src/data/ src/data/pubs/ src/data/pubs/default/ src/data/pubs/default/repos/ src/data/pubs/default/repos/repo-sitetree/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/lenya/ src/java/org/apache/lenya/cms/ src/java/org/apache/lenya/cms/publication/ src/targets/

michi@apache.org wrote:

> +public abstract class AbstractPublication implements Publication {

> +            Configuration siteStructureConfiguration = config.getChild(ELEMENT_SITE_STRUCTURE,
> +                    false);
> +            if (siteStructureConfiguration != null) {
> +                String siteStructureType = siteStructureConfiguration.getAttribute(ATTRIBUTE_TYPE);
> +                if (!siteStructureType.equals("sitetree")) {
> +                    hasSitetree = false;
> +                }
> +            }

can you explain this a bit more? we need to focus on creating more site 
tree implementations, not try to work around them. (see recent 
discussion about backdoors)


> +    public JCRSiteTree getSiteTree(String area) throws SiteTreeException {
> +
> +        JCRSiteTree sitetree = null;
> +
> +        if (hasSitetree) {
> +            if (siteTrees.containsKey(area)) {
> +                log.error("Load sitetree from MEMORY (" + area + ")");
> +                sitetree = (JCRSiteTree) siteTrees.get(area);
> +            } else {
> +                log.error("Load sitetree from FILESYSTEM (" + area + ")");
> +                sitetree = new JCRSiteTree(getDirectory(), area);
> +                siteTrees.put(area, sitetree);
> +            }
> +        }
> +        return sitetree;

don't debug with log.error

> +public class ImportSiteTree {
> +
> +    /**
> +     *
> +     */
> +    public static void main(String[] args) {
> +        String repoHomeDir = args[0];
> +        String defaultPubDir = args[1];
> +
> +        new ImportSiteTree().importSitetree(repoHomeDir, defaultPubDir);
> +    }
> +
> +    /**
> +     *
> +     */
> +    public void importSitetree(String repoHomeDir, String defaultPubDir) {

please add javadocs

> +    protected JCRSiteTree(File pubDir, String area) throws SiteTreeException {
> +        this(
> +            new File(
> +                pubDir,
> +                Publication.CONTENT_PATH
> +                    + File.separator
> +                    + area
> +                    + File.separator
> +                    + SITE_TREE_FILENAME));
> +        log.error("Load sitetree: " + pubDir + " " + area);

don't debug with log.error


-- 
Gregor J. Rothfuss
COO, Wyona       Content Management Solutions    http://wyona.com
Apache Lenya                              http://lenya.apache.org
gregor.rothfuss@wyona.com                       gregor@apache.org

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


Re: svn commit: r156703 - in lenya/sandbox/jcrsitetree: ./ legal/ lib/ lib/core/ lib/extra/ src/ src/data/ src/data/pubs/ src/data/pubs/default/ src/data/pubs/default/repos/ src/data/pubs/default/repos/repo-sitetree/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/lenya/ src/java/org/apache/lenya/cms/ src/java/org/apache/lenya/cms/publication/ src/targets/

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Michael Wechner wrote:

>> IIRC the original purpose of hasSitetree was to support non-sitetree
>> publications, which was a desired constraint when the sitetree was
>> introduced.
> 
> oh right, and I think this is still very necessary

this needs to be reevaluated in trunk.

-- 
Gregor J. Rothfuss
COO, Wyona       Content Management Solutions    http://wyona.com
Apache Lenya                              http://lenya.apache.org
gregor.rothfuss@wyona.com                       gregor@apache.org

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


Re: svn commit: r156703 - in lenya/sandbox/jcrsitetree: ./ legal/ lib/ lib/core/ lib/extra/ src/ src/data/ src/data/pubs/ src/data/pubs/default/ src/data/pubs/default/repos/ src/data/pubs/default/repos/repo-sitetree/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/lenya/ src/java/org/apache/lenya/cms/ src/java/org/apache/lenya/cms/publication/ src/targets/

Posted by Michael Wechner <mi...@wyona.com>.
Andreas Hartmann wrote:

>
> IIRC the original purpose of hasSitetree was to support non-sitetree
> publications, which was a desired constraint when the sitetree was
> introduced.


oh right, and I think this is still very necessary

Thanks

Michi

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


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


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


Re: svn commit: r156703 - in lenya/sandbox/jcrsitetree: ./ legal/ lib/ lib/core/ lib/extra/ src/ src/data/ src/data/pubs/ src/data/pubs/default/ src/data/pubs/default/repos/ src/data/pubs/default/repos/repo-sitetree/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/lenya/ src/java/org/apache/lenya/cms/ src/java/org/apache/lenya/cms/publication/ src/targets/

Posted by Andreas Hartmann <an...@apache.org>.
Michael Wechner wrote:

[...]

>> what is the purpose of hasSitetree in light of trying to have a 
>> consistent API without backdoors?
> 
> 
> 
> this is just a copy of the existing class from 1.2.X, whereas I have 
> replaced Default by JCR. Take a look at it ;-)
> 
> I don't think that I have created this code in the first place, whereas 
> I don't want
> to blame anyone here.

IIRC the original purpose of hasSitetree was to support non-sitetree
publications, which was a desired constraint when the sitetree was
introduced.

-- Andreas


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


Re: svn commit: r156703 - in lenya/sandbox/jcrsitetree: ./ legal/ lib/ lib/core/ lib/extra/ src/ src/data/ src/data/pubs/ src/data/pubs/default/ src/data/pubs/default/repos/ src/data/pubs/default/repos/repo-sitetree/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/lenya/ src/java/org/apache/lenya/cms/ src/java/org/apache/lenya/cms/publication/ src/targets/

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Michael Wechner wrote:

>> what is the purpose of hasSitetree in light of trying to have a 
>> consistent API without backdoors?
> 
> this is just a copy of the existing class from 1.2.X, whereas I have 
> replaced Default by JCR. Take a look at it ;-)
> 
> I don't think that I have created this code in the first place, whereas 
> I don't want
> to blame anyone here.

you are right :) in that case, let me ask the crowd: what is the purpose 
of it?


-- 
Gregor J. Rothfuss
COO, Wyona       Content Management Solutions    http://wyona.com
Apache Lenya                              http://lenya.apache.org
gregor.rothfuss@wyona.com                       gregor@apache.org

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


Re: svn commit: r156703 - in lenya/sandbox/jcrsitetree: ./ legal/ lib/ lib/core/ lib/extra/ src/ src/data/ src/data/pubs/ src/data/pubs/default/ src/data/pubs/default/repos/ src/data/pubs/default/repos/repo-sitetree/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/lenya/ src/java/org/apache/lenya/cms/ src/java/org/apache/lenya/cms/publication/ src/targets/

Posted by Michael Wechner <mi...@wyona.com>.
Gregor J. Rothfuss wrote:

> Michael Wechner wrote:
>
>> Gregor J. Rothfuss wrote:
>>
>>> michi@apache.org wrote:
>>>
>>>> +                }
>>>> +            }
>>>
>>>
>>>
>>>
>>> can you explain this a bit more? we need to focus on creating more 
>>> site tree implementations, not try to work around them. (see recent 
>>> discussion about backdoors)
>>
>>
>>
>>
>> hm?
>
>
> what is the purpose of hasSitetree in light of trying to have a 
> consistent API without backdoors?


this is just a copy of the existing class from 1.2.X, whereas I have 
replaced Default by JCR. Take a look at it ;-)

I don't think that I have created this code in the first place, whereas 
I don't want
to blame anyone here.

Michi


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


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


Re: svn commit: r156703 - in lenya/sandbox/jcrsitetree: ./ legal/ lib/ lib/core/ lib/extra/ src/ src/data/ src/data/pubs/ src/data/pubs/default/ src/data/pubs/default/repos/ src/data/pubs/default/repos/repo-sitetree/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/lenya/ src/java/org/apache/lenya/cms/ src/java/org/apache/lenya/cms/publication/ src/targets/

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Michael Wechner wrote:
> Gregor J. Rothfuss wrote:
> 
>> michi@apache.org wrote:
>>
>>> +                }
>>> +            }
>>
>>
>>
>> can you explain this a bit more? we need to focus on creating more 
>> site tree implementations, not try to work around them. (see recent 
>> discussion about backdoors)
> 
> 
> 
> hm?

what is the purpose of hasSitetree in light of trying to have a 
consistent API without backdoors?

-- 
Gregor J. Rothfuss
COO, Wyona       Content Management Solutions    http://wyona.com
Apache Lenya                              http://lenya.apache.org
gregor.rothfuss@wyona.com                       gregor@apache.org

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


Re: svn commit: r156703 - in lenya/sandbox/jcrsitetree: ./ legal/ lib/ lib/core/ lib/extra/ src/ src/data/ src/data/pubs/ src/data/pubs/default/ src/data/pubs/default/repos/ src/data/pubs/default/repos/repo-sitetree/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/lenya/ src/java/org/apache/lenya/cms/ src/java/org/apache/lenya/cms/publication/ src/targets/

Posted by Michael Wechner <mi...@wyona.com>.
Gregor J. Rothfuss wrote:

> michi@apache.org wrote:
>
>> +                }
>> +            }
>
>
> can you explain this a bit more? we need to focus on creating more 
> site tree implementations, not try to work around them. (see recent 
> discussion about backdoors)


hm?

>
>
>> +    public JCRSiteTree getSiteTree(String area) throws 
>> SiteTreeException {
>> +
>> +        JCRSiteTree sitetree = null;
>> +
>> +        if (hasSitetree) {
>> +            if (siteTrees.containsKey(area)) {
>> +                log.error("Load sitetree from MEMORY (" + area + ")");
>> +                sitetree = (JCRSiteTree) siteTrees.get(area);
>> +            } else {
>> +                log.error("Load sitetree from FILESYSTEM (" + area + 
>> ")");
>> +                sitetree = new JCRSiteTree(getDirectory(), area);
>> +                siteTrees.put(area, sitetree);
>> +            }
>> +        }
>> +        return sitetree;
>
>
> don't debug with log.error


I am aware of this, but this is not thought to be used in production 
yet, just for the ones who want help on implementing the JCRSiteTree and 
the very early adopters.

Michi



-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


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