Hi,
Another proposal: don't remove important pages that are moved.
For example imagine that we refactor the RSSFeeds page into a
Notifications page. I propose that we don't delete the RSSFeeds page
but instead add a redirect to the new page.
Example:
{{velocity}}
$response.sendRedirect($xwiki.getURL("Features.Notifications"))
{{/velocity}}
I propose we do this till we get this feature automatically in the
XWiki core.
The rationale is that users will save links and when they navigate to
them later on these links will be broken.
Here's my +1
Thanks
-Vincent
Hi,
We need to decide how we want to document xwiki.org with regards to
project versions and skins. For example the screenshot and features
described can depend on 2 factors:
- the project version (XE version for ex)
- the skin used
Project versions
=============
We have several choices:
1) We make the doc only for the latest version and in this case we
should probably export the pages at release time and make it available
as a zipped HTML export so that people using the older version can
refer to them.
2) We make the doc work the last 2 releases. That would be either 2.1
and 2.0.5 or 2.2M1 and 2.1 depending on how we view it and depending
on whether we want to document on xwiki.org before we release or not.
Personally I think I prefer option 1 with a little addition:
- whenever something that is new to the last release is documented, we
should add a little "New" logo (possibly with the version value, "New
in 2.2" for example). This could be done with a wiki macro.
If option 1 is chosen then we need to add a step to the release process.
Skins
====
Again we have several choices:
1) Document only for the latest skin
2) Document for all supported skins. Right now that would be Toucan +
Colibri (not sure about Albatross, I don't think we've officially said
it wasn't supported).
If we were to do 2) then this that for example this page http://code.xwiki.org/xwiki/bin/view/Applications/WatchlistApplication
would need to contain screenshots for all supported skins *OR* there
should be different screenshots only when the skins have different
features. This is the case here since the location of menus and
actions are quite different.
I'm hesitating more for this one...
1) is definitely easier for us so I'm tempted to propose 1) but with
the proviso that we make it clear in the text when a feature is
available only for a given skin (for ex: the Show Code menu action is
avail in Colibri but not in Toucan).
WDYT?
When we agree we should put the result on dev.xwiki.org in a new page
describing how xwiki.org is documented.
Thanks
-Vincent
On Sat, Dec 12, 2009 at 16:02, vmassol <contrib-notifications(a)xwiki.org> wrote:
> Author: vmassol
> Date: 2009-12-12 16:02:21 +0100 (Sat, 12 Dec 2009)
> New Revision: 25768
>
> Added:
> contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Persistable.java
> Removed:
> contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/internal/
> contrib/sandbox/xwiki-model/src/main/resources/
> contrib/sandbox/xwiki-model/src/test/
> Modified:
> contrib/sandbox/xwiki-model/
> contrib/sandbox/xwiki-model/pom.xml
> contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Attachment.java
> contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Document.java
> contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Object.java
> contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/ObjectDefinition.java
> contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/ObjectDefinitionProperty.java
> contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Server.java
> contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Space.java
> contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Wiki.java
> Log:
> Continuing work on the new Model. The idea is to do step1, which is about designing the interfaces and implementing them with the old model FTM.
>
> * Remove dependencies on JCR since we now want to create interfaces for the new model that are independent of JCR (for a start). I'm still unsure whether we should base these interfaces on JCR or not but it seems easier not to for the moment.
> * Several questions asked in comments
>
[...]
> Modified: contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Attachment.java
> ===================================================================
> --- contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Attachment.java 2009-12-11 17:03:01 UTC (rev 25767)
> +++ contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Attachment.java 2009-12-12 15:02:21 UTC (rev 25768)
> @@ -1,8 +1,6 @@
> package org.xwiki.model;
>
> -import javax.jcr.Node;
> -
> -public interface Attachment extends Node
> +public interface Attachment extends Persistable
> {
>
> }
>
> Modified: contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Document.java
> ===================================================================
> --- contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Document.java 2009-12-11 17:03:01 UTC (rev 25767)
> +++ contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Document.java 2009-12-12 15:02:21 UTC (rev 25768)
> @@ -1,10 +1,12 @@
> package org.xwiki.model;
>
> +import org.xwiki.bridge.DocumentName;
> +import org.xwiki.rendering.block.XDOM;
> +
> import java.util.List;
> +import java.util.Locale;
>
> -import javax.jcr.Node;
> -
> -public interface Document extends Node
> +public interface Document extends Persistable
> {
> /**
> * @return the list of object definitions defined inside this document
> @@ -14,6 +16,24 @@
> List<Object> getObjects();
>
> List<Attachment> getAttachments();
> -
> - String setContent(String content);
> +
> + void setParent(Document document);
> +
> + Document getParent();
> +
> + // Note: In order to make modifications to the document's content, modify the returned XDOM
> + // Default language
> + XDOM getContent();
> + XDOM getContent(Locale locale);
> +
> + // get/setSyntax(Syntax syntax)
> +
> + // Q: Should we have this or should we force users to use a Parser for a given syntax, ie make Document
> + // independent of the Syntax?
Sounds nicer to only work with XDOM but what does it mean for the
storage ? Is the way to store the document content (a string in some
syntax, directly in the database with each block type having its own
table, etc...) become an implementation details (good idea IMO) ?
> + //String setContent(String content);
> +
> + boolean hasObject(String objectName);
> +
> + // Q: Is this ok?
> + DocumentName getDocumentName();
> }
>
> Modified: contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Object.java
> ===================================================================
> --- contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Object.java 2009-12-11 17:03:01 UTC (rev 25767)
> +++ contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Object.java 2009-12-12 15:02:21 UTC (rev 25768)
> @@ -1,8 +1,6 @@
> package org.xwiki.model;
>
> -import javax.jcr.Node;
> -
> -public interface Object extends Node
> +public interface Object extends Persistable
> {
>
> }
>
> Modified: contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/ObjectDefinition.java
> ===================================================================
> --- contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/ObjectDefinition.java 2009-12-11 17:03:01 UTC (rev 25767)
> +++ contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/ObjectDefinition.java 2009-12-12 15:02:21 UTC (rev 25768)
> @@ -1,8 +1,6 @@
> package org.xwiki.model;
>
> -import javax.jcr.Node;
> -
> -public interface ObjectDefinition extends Node
> +public interface ObjectDefinition extends Persistable
> {
>
> }
>
> Modified: contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/ObjectDefinitionProperty.java
> ===================================================================
> --- contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/ObjectDefinitionProperty.java 2009-12-11 17:03:01 UTC (rev 25767)
> +++ contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/ObjectDefinitionProperty.java 2009-12-12 15:02:21 UTC (rev 25768)
> @@ -1,12 +1,6 @@
> package org.xwiki.model;
>
> -import javax.jcr.Node;
> -
> -/**
> - * Note: we cannot map an Object Definition Property to a JCR property since it has several properties such as
> - * validation script, edit sheet, etc.
> - */
> -public interface ObjectDefinitionProperty extends Node
> +public interface ObjectDefinitionProperty extends Persistable
> {
>
> }
>
> Added: contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Persistable.java
> ===================================================================
> --- contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Persistable.java (rev 0)
> +++ contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Persistable.java 2009-12-12 15:02:21 UTC (rev 25768)
> @@ -0,0 +1,9 @@
> +package org.xwiki.model;
> +
> +public interface Persistable
> +{
> + // Note: All the other methods don't save. Need to call save() to save. For ex this allows to add several docs
> + // at once before saving them all at once. This allows for optimizations.
> + // Q: Should we use a more generic API? Like pass a Map<String, String>?
I don't think is really needed, we can always add support for a
Map<String, String> latter.
> + void save(String comment, boolean isMinorEdit);
> +}
>
> Modified: contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Server.java
> ===================================================================
> --- contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Server.java 2009-12-11 17:03:01 UTC (rev 25767)
> +++ contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Server.java 2009-12-12 15:02:21 UTC (rev 25768)
> @@ -1,16 +1,14 @@
> package org.xwiki.model;
>
> +import org.xwiki.bridge.DocumentName;
> +
> import java.util.List;
>
> -import javax.jcr.Repository;
> -
> -import org.xwiki.model.Wiki;
> -
> /**
> * An XWiki Server is made of one or several {@link org.xwiki.model.Wiki}s. This is the top most
> * object of the XWiki Model.
> */
> -public interface Server extends Repository
> +public interface Server extends Persistable
> {
> /**
> * @return the list of all wiki names inside this Server
> @@ -24,4 +22,17 @@
> void addWiki(Wiki wiki);
>
> void removeWiki(String wikiName);
> +
> + boolean hasWiki(String wikiName);
> +
> + // Q: Should the methods below be moved into some other class, such as a DocumentQuery component which would
> + // be less generic than using the Query Manager?
Yes it's looks too much like a helper for something that should be in
some generic query api to me. Or having something more generic, see at
the end of the mail.
> +
> + // Q: Is this ok?
> + Document getDocument(DocumentName documentName);
> +
> + // Should we also have getSpace(SpaceName spaceName)?
> +
> + // Q: Is this ok?
> + boolean hasDocument(DocumentName documentName);
> }
>
> Modified: contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Space.java
> ===================================================================
> --- contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Space.java 2009-12-11 17:03:01 UTC (rev 25767)
> +++ contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Space.java 2009-12-12 15:02:21 UTC (rev 25768)
> @@ -2,12 +2,11 @@
>
> import java.util.List;
>
> -import javax.jcr.Node;
> -
> -public interface Space extends Node
> +public interface Space extends Persistable
> {
> /**
> * @return the space's description
> + * @todo Should not be implemented with the old model
> */
> String getDescription();
>
> @@ -16,13 +15,38 @@
> */
> List<Space> getSpaces();
>
> + /**
> + * @param spaceName the name of the nested space to look for
> + * @return the nested space whose name is passed as parameter
> + */
> + Space getSpace(String spaceName);
> +
> + /**
> + * @todo Should not be implemented with the old model
> + */
> void addSpace(String spaceName);
> -
> +
> + /**
> + * @todo Should not be implemented with the old model
> + */
> + Space createSpace(String spaceName);
> +
> + /**
> + * @todo Should not be implemented with the old model
> + */
> void removeSpace(String spaceName);
>
> + List<Document> getDocuments();
> +
> + boolean hasSpace(String spaceName);
> +
> + boolean hasDocument(String shortDocumentName);
> +
> + Document getDocument(String shortDocumentName);
> +
> void addDocument(Document document);
>
> - void removeDocument(String documentName);
> -
> - Document createDocument(String documentName);
> + void removeDocument(String shortDocumentName);
> +
> + Document createDocument(String shortDocumentName);
> }
>
> Modified: contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Wiki.java
> ===================================================================
> --- contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Wiki.java 2009-12-11 17:03:01 UTC (rev 25767)
> +++ contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Wiki.java 2009-12-12 15:02:21 UTC (rev 25768)
> @@ -2,17 +2,17 @@
>
> import java.util.List;
>
> -import javax.jcr.Workspace;
> -
> -import org.xwiki.model.Space;
> -
> -public interface Wiki extends Workspace
> +public interface Wiki extends Persistable
> {
> /**
> - * @return the list of all space names of this wiki including nested spaces
> + * @return the list of all space names in this wiki including nested spaces
> */
> List<String> getSpaceNames();
>
> + /**
> + * @param spaceName the name of the space
> + * @return the object representing the space whose name is passed in parameter
> + */
> Space getSpace(String spaceName);
>
> Space createSpace(String spaceName);
> @@ -20,4 +20,6 @@
> void addSpace(Space space);
>
> void removeSpace(String spaceName);
> +
> + boolean hasSpace(String spaceName);
> }
>
> _______________________________________________
> notifications mailing list
> notifications(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/notifications
>
Some quick comments about the model:
* I think we should have something more generic that DocumentName that
support anything from Wiki to objet or class property. Some
WikiResourceName that target anything in XWiki and that you can use
with the query api. Then we can provide different parser/serializer
for WikiResourceName (URIParser/serializer used in REST,
WikiSyntaxParser/Serialize commonly used in the document content as
link/attachment/image reference, etc...).
* Persistable should maybe also contains something like copy() or
clone(), we generally know what we are copying but having in at
Persistable make sure this is posible for anything in the model tree
--
Thomas Mortagne
If you notifiy me of DB-changes in new releases i will test & fix the mssql
mapping if necessary.
hel.
-----
semantic-web.hel.at
hel(a)hel.at
--
View this message in context: http://n2.nabble.com/XWiki-MSSQL-tp4168841p4168841.html
Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi,
New proposal:
Create a new xwiki-model and move "clean" classes from xwiki-bridge
into it. These are:
- *AttachmentName*
- *DocumentName*
Here's my +1
Thanks
-Vincent
On Wed, Sep 2, 2009 at 1:12 PM, Thomas Mortagne
<thomas.mortagne(a)xwiki.com> wrote:
> On Wed, Aug 26, 2009 at 18:00, Vincent Massol<vincent(a)massol.net> wrote:
>> Hi,
>>
>> Since we have some final classes (final in the sense with a good
>> architecture) in xwiki-bridge I'd like to rename it into xwiki-model
>> so that we can start this model module.
>>
>> Note: We'd still have a org.xwiki.model.bridge package for the time
>> being in that xwiki-model module.
>>
>> Here's my +1
>
> I would prefer to create a new xwiki-model with only the clean apis
> instead of having clean and bridge in the same project.
>
>>
>> Thanks
>> -Vincent
On Dec 13, 2009, at 9:11 AM, vmassol (SVN) wrote:
> Author: vmassol
> Date: 2009-12-13 09:11:05 +0100 (Sun, 13 Dec 2009)
> New Revision: 25770
>
> Modified:
> contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/
> Document.java
> contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/Space.java
> Log:
> Made the model more scaleable (ability to have lots of spaces, lots
> of objects, lots of object definitions)
>
> Modified: contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/
> Document.java
> ===================================================================
> --- contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/
> Document.java 2009-12-12 15:37:00 UTC (rev 25769)
> +++ contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/
> Document.java 2009-12-13 08:11:05 UTC (rev 25770)
> @@ -11,10 +11,14 @@
> /**
> * @return the list of object definitions defined inside this
> document
> */
> - List<ObjectDefinition> getObjectDefinitions();
> + List<String> getObjectDefinitionNames();
>
> - List<Object> getObjects();
> + ObjectDefinition getObjectDefinition(String
> objectDefinitionName);
>
> + List<String> getObjectNames();
> +
> + Object getObject(String objectName);
> +
Another solution would be to use iterators with this API:
Iterator<Object> getObjects();
instead of
List<String> getObjectNames();
Object getObject(String objectName);
I think it could allow more fine-tuning on the requests we send to the
DB (ie we can fetch elements N elements by N elements instead of 1 by
1).
Thanks
-Vincent
> List<Attachment> getAttachments();
>
> void setParent(Document document);
>
> Modified: contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/
> Space.java
> ===================================================================
> --- contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/
> Space.java 2009-12-12 15:37:00 UTC (rev 25769)
> +++ contrib/sandbox/xwiki-model/src/main/java/org/xwiki/model/
> Space.java 2009-12-13 08:11:05 UTC (rev 25770)
> @@ -11,9 +11,9 @@
> String getDescription();
>
> /**
> - * @return the full list of all nested spaces
> + * @return the names of all nested spaces
> */
> - List<Space> getSpaces();
> + List<String> getSpaceNames();
>
> /**
> * @param spaceName the name of the nested space to look for
> @@ -36,7 +36,7 @@
> */
> void removeSpace(String spaceName);
>
> - List<Document> getDocuments();
> + List<String> getDocumentNames();
>
> boolean hasSpace(String spaceName);
Hi,
Following on the model emails, I'd also like to do the following:
* Introduce a new Model component to access the Model objects from the
Execution Context (same as we do for other modules to prevent everyone
from directly accessing the EC). For now I have:
/**
* Allows accessing Model Objects for current objects (current
document, current wiki, current space, etc) placed in
* the Execution Context.
*
* @version $Id$
* @since 2.2M1
*/
@ComponentRole
public interface Model
{
/**
* @return the current document located in the Execution Context
or null if no current document exist
*/
DocumentName getCurrentDocumentName();
}
I'll also like to add getCurrentWikiName() and getCurrentSpaceName()
later on.
* Move *DocumentNameSerializer in Model module (currently in xwiki-core)
* Move *DocumentNameFactory in Model module (currently in xwiki-core)
Here's my +1
Thanks
-Vincent
PS: FYI here's how I have implemented Model for now:
/**
* Default implementation bridging to the old XWiki Context to get
current Model Objects.
*
* @version $Id$
* @since 2.2M1
*/
@Component
public class DefaultModel implements Model
{
/**
* The Execution Context from which we get the old XWiki Context
from which we get the current Model Objects.
*/
@Requirement
private Execution execution;
/**
* {@inheritDoc}
* @see org.xwiki.model.Model#getCurrentDocumentName()
*/
public DocumentName getCurrentDocumentName()
{
DocumentName result = null;
// TODO: This is bridge to the old XWiki Context since we
currently don't store the current document in the
// new Execution Context yet. Remove when we do so.
try {
Map<Object, Object> xcontext =
(Map<Object, Object>)
this.execution.getContext().getProperty("xwikicontext");
Object currentDocument = xcontext.get("doc");
result = (DocumentName)
currentDocument
.getClass().getMethod("getDocumentName").invoke(currentDocument);
} catch (Exception e) {
// Shouldn't happen in normal cases. Could happen if the
context doesn't contain the old XWiki Context
// but that would be a bug in the initialization system
somewhere.
}
return result;
}
}