First, sorry for the length, but I thought it necessary to be specific as
possible here as well as including some sample code.
I am trying to figure out what in Slide is determined by the Domain.xml
file. For example, does the Domain.xml drive the creation of a content
directory structure, or does it simply contain a uri to the root of the
content? On a more general scale, slide or any CMS for that matter can't
simply be pointed to a root content directory and recursively discover the
content within, correct?. My understanding is that any CMS needs a user to
add content to the CMS thereby creating metadata about that content.
Ok, more specifically, I found the example Domain.xml file on the jakarta
site quite confusing. I have java driver code that has a method to
initialize the Domain. I found the following code, but not its
corresponding Domain.xml file; Here's the method:
protected void setUp() throws Exception {
nsAccessToken = Domain.accessNamespace(new SecurityToken(new
String()), "myns");
credToken = new CredentialsToken(new String("root"));
slideToken = new SlideTokenImpl(credToken);
structureHelper = nsAccessToken.getStructureHelper();
contentHelper = nsAccessToken.getContentHelper();
rootUser = (SubjectNode)structureHelper.retrieve(slideToken,
"/users/root");
}
1) Does the String parameter for CredentialsToken(new String("root"))
relate to the Domain.xml file? Meaning is there some element or attribute
in the Domain.xml file that literally has to contain the String "root"? I
assume this string defines the root user/admin of the CMS. If this is not
the case can someone tell me what exactly this String is for?
2) According to the structure package javadoc the type of a node determines
which roles that node has. The documentation gives a link to the
org.apache.slide.security package, but I didn't see how any particluar node
(Link, Subject, or Action) had different roles associated with it. As a
matter of fact, this completely escapes me.
My remaining questions involve the Domain.xml file solely.
3) The slide/namespace/definition portion of Domain.xml declares the
services mapped to the namespace. The following code is from my Domain.xml
file:
<definition>
<store name="myStore">
<nodestore classname="org.apache.slide.store.StandardStore">
</nodestore>
<securitystore>
<reference store="nodestore" />
</securitystore>
<lockstore>
<reference store="nodestore" />
</lockstore>
<revisiondescriptorsstore>
<reference store="nodestore" />
</revisiondescriptorsstore>
<revisiondescriptorstore>
<reference store="nodestore" />
</revisiondescriptorstore>
<contentstore classname="org.apache.slide.store.StandardStore">
<parameter name="rootpath">contentstore</parameter>
<parameter name="version">false</parameter>
<parameter name="resetBeforeStarting">true</parameter>
</contentstore>
</store>
<scope match="/" store="myStore" />
</definition>
The classname attribute is a Service class name. The only store class I know
of is StandardStore, so I use that one. In the jakarta site's sample
Domain.xml there was a slidestore.reference.MemoryDescriptorsStore value for
the classname attribute. Is this some class extending StandardStore?
I noticed that a directory called contentstore was created on my local
drive. I assume this is because of contentstore's rootpath parameter. If I
were to use Slide to control files on my local drive, would all of those
files reside in my contentstore directory? Furthermore, would I have to
manually create my directory structure under the root of contentstore, or is
the directory structure (and creation) dictated by Domain.xml? I am also
curious as to what the scope element is doing. I assume scope associates a
service to a specified scope in the namespace. By putting "/" as the uri
filter, I assume I am mapping all services listed here to myStore, an
instance of StandardStore.
4) The slide/namespace/configuration portion of Domain.xml raises some
questions as well. Below is the configuration element of my Domain.xml
file:
<configuration>
<!-- Actions mapping -->
<default-action>/actions</default-action>
<read-object>/actions/read</read-object>
<create-object>/actions/write</create-object>
<remove-object>/actions/write</remove-object>
<grant-permission>/actions/manage</grant-permission>
<revoke-permission>/actions/manage</revoke-permission>
<read-permissions>/actions/manage</read-permissions>
<lock-object>/actions/write</lock-object>
<kill-lock>/actions/manage</kill-lock>
<read-locks>/actions/read</read-locks>
<read-revision-metadata>/actions/read</read-revision-metadata>
<create-revision-metadata>/actions/write</create-revision-metadata>
<modify-revision-metadata>/actions/write</modify-revision-metadata>
<remove-revision-metadata>/actions/write</remove-revision-metadata>
<read-revision-content>/actions/read</read-revision-content>
<create-revision-content>/actions/write</create-revision-content>
<modify-revision-content>/actions/write</modify-revision-content>
<remove-revision-content>/actions/write</remove-revision-content>
<!-- Paths configuration -->
<userspath>/users</userspath>
<guestpath>guest</guestpath>
<filespath>/files</filespath>
<parameter name="dav">true</parameter>
<parameter name="standalone">true</parameter>
<!-- Roles definition -->
<role name="root">slideroles.basic.RootRole</role>
<role name="user">slideroles.basic.UserRole</role>
<role name="guest">slideroles.basic.GuestRole</role>
<!-- Users management -->
<auto-create-users>true</auto-create-users>
<!-- Default properties mapping -->
<default-property name="foo" namespace="myns/" value="bar"
role="user"/>
<default-property name="password" namespace="myns/" value=""
role="user"/>
</configuration>
The actions mapping portion has "/actions", "/actions/write",
"/actions/read", etc. These aren't files that reside on my local drive,
right? I thought this stuff was held in memory. The paths configuration
portion has a filepath and userspath. My understanding from the javadoc, is
that both userspath and filespath are optional, and that filespath is not
currently implemented.
5) Lastly I saw slide/namespace/data/objectnode/revision/content abstract
documentation on the jakarta site, but I saw no example of this in the
Domain.xml sample file. Any idea how this content element works?
Thanks in advance for your time and efforts. I realize this is a lot of
questions, but I'm really stuck.
-Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]