Hi devs,
I think the start of the XE 3.x cycle is a good time to remove some deprecated methods/classes.
We have a deprecation strategy defined already:
http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HDepreca…
"
Our rule is to keep @deprecated methods/classes for 2 final releases after the version where they were first added has been released as final.
For example if a method is deprecated in, say XE 1.3M2 then the method will be removed in 1.6M1 or after. Of course any major new release can deprecate anything. For example a XWiki 2.0 release is allowed to break backward compatibility (obviously we need to be careful to offer a migration path for users of previous major versions).
"
So 2 final releases mean that deprecations introduced in 2.5.x or before can theoretically be removed for XE 3.0 final.
However, IMO we shouldn't remove deprecated methods/classes that are public for scrips since this will break xwiki users.
Are we ok to do that?
Personally I'm fine and I'd like to add this caveat to the best practice if we agree.
Thanks
-Vincent
Hi devs,
I've modified http://contrib.xwiki.org/xwiki/bin/view/Main/ a bit for 2 reasons:
1) to update it since it was referring to code.xwiki.org which is no longer there
2) to allow a growth path for contrib project. Ie they should have well-defined JIRA/SVN/Maven/Wiki locations when they start out but if they reach a certain size/visibility they should be allowed to grow. Thus I've made 2 changes:
* the ability for them to have their own groupId after a certain size/visibility
* the ability for them to have their own wiki after a certain size/visibility
Let me know if that's not ok for some of you.
Thanks
-Vincent
On Jan 13, 2011, at 1:10 AM, cjdelisle (SVN) wrote:
> Author: cjdelisle
> Date: 2011-01-13 01:10:03 +0100 (Thu, 13 Jan 2011)
> New Revision: 33933
>
> Modified:
> platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/api/Context.java
> Log:
> XWIKI-5881: Incorrect javadoc for c.x.x.api.Context#dropPermissions()
>
> Modified: platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/api/Context.java
> ===================================================================
> --- platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/api/Context.java 2011-01-12 18:47:41 UTC (rev 33932)
> +++ platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/api/Context.java 2011-01-13 00:10:03 UTC (rev 33933)
> @@ -570,8 +570,21 @@
> }
>
> /**
> - * Drop all author permissions by switching author to guest.
> - * Call this when all code requiring permission has been executed and the code following may be untrusted.
> + * After this is called:
> + * 1. {@link com.xpn.xwiki.api.Api#hasProgrammingRights()} will always return false.
> + * 2. {@link com.xpn.xwiki.api.XWiki#getDocumentAsAuthor(org.xwiki.model.reference.DocumentReference)},
> + * {@link com.xpn.xwiki.api.XWiki#getDocumentAsAuthor(String)},
> + * {@link com.xpn.xwiki.api.Document#saveAsAuthor()},
> + * {@link com.xpn.xwiki.api.Document#saveAsAuthor(String)},
> + * {@link com.xpn.xwiki.api.Document#saveAsAuthor(String, boolean)},
> + * and {@link com.xpn.xwiki.api.Document#deleteAsAuthor()} will all to their actions as if the author
> + * was the guest user (XWiki.XWikiGuest).
typo: "... will all to their actions..." ?
"will all perform their actions as if..." instead?
> + *
> + * In effect, no code requiring "programming right" will run, and if the document content author
> + * (see: {@link com.xpn.xwiki.api.Document#getContentAuthor()}) is a user who has "programming right",
> + * there will be no way for code following this call to save another document as this user, blessing
> + * it too with programming right.
> + *
> * Once dropped, permissions cannot be regained for the duration of the request.
> *
> * @since 2.5M2
Thanks
-Vincent
fyi
-Vincent
Begin forwarded message:
> From: Benjamin Bentmann <bentmann(a)apache.org>
> Date: January 12, 2011 10:32:03 PM GMT+01:00
> To: announce(a)apache.org
> Subject: [ANN] Apache Maven 3.0.2 Released
>
> The Maven team is pleased to announce the release of Apache Maven 3.0.2
>
> Maven is a project comprehension and build tool, designed to simplify the process of maintaining a healthy development lifecycle for your project. You can read more here:
>
> http://maven.apache.org/
>
> Downloads of source and binary distributions are listed in our download section:
>
> http://maven.apache.org/download.html
>
> A major goal of Maven 3.0.x is to be compatible, to the extent possible, with existing plugins and projects designed for Maven 2.x. Users interested in upgrading to 3.x should have a glance at the compatibility notes for known differences between Maven 3.0 and Maven 2.x:
>
> http://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html
>
> Users who already use Maven 3.0 are encouraged to update to this new maintenance release.
>
> If you encounter unexpected problems while using Maven 3.0.2, please feel free to contact us via the Maven developer list:
>
> http://maven.apache.org/mail-lists.html
>
> Release Notes - Maven 2 & 3 - Version 3.0.2 (since 3.0.1 only)
>
> ** Bug
> * [MNG-4840] - Prerequisites is not working on m3
> * [MNG-4913] - [regression] User properties override equally named POM properties of transitive dependencies
> * [MNG-4915] - Versions in pom.xml are not checked for invalid characters
> * [MNG-4918] - MavenProject#clone() doubles active profiles
> * [MNG-4919] - Plugin execution contributed by lifecycle mapping gets lost when same goal is bound multiple times
> * [MNG-4923] - [regression] java.lang.ClassNotFoundException: org.apache.maven.artifact.ArtifactStatus
> * [MNG-4925] - Mismanagement of container lookup realm can cause type incompatibilities for plugins looking up components by string
> * [MNG-4933] - With a resource directory as . maven raise an java.lang.StringIndexOutOfBoundsException:217
> * [MNG-4941] - PluginDescriptorBuilder doesn't populate expression/default-value fields for mojo parameters
> * [MNG-4952] - [regression] RELEASE field of repository metadata is not updated upon repeated deployments
> * [MNG-4955] - [regression] Outdated remote snapshots are preferred over locally installed snapshots
> * [MNG-4960] - [regression] Make-like reactor mode does not build selected project when resuming from one of its prerequisites
> * [MNG-4966] - Preserve double slashes in the scm connection url - identifies absolute repository paths for mercurial
>
> ** Improvement
> * [MNG-4912] - Use of raw type should be Comparable<ArtifactVersion>
> * [MNG-4916] - Poor ProjectBuilder.build performance for projects with unresolvable extension plugins
> * [MNG-4922] - ExecutionEvent give on the exception encountered (when having mojoFailed)
> * [MNG-4926] - ExecutionEvent give on the exception encountered (when having projectFailed , forkedProjectFailed)
> * [MNG-4944] - Include JRE vendor in version info
> * [MNG-4950] - Javadoc improvements to DefaultSettingsWriter/Reader
> * [MNG-4953] - Issue a warning when a system-scope dependency refers to the project basedir
>
> ** New Feature
> * [MNG-4936] - Allow to better monitor and adjust a Maven build during CI
> * [MNG-4937] - Allow the platform scripts to avoid loading mavenrc content
>
> ** Task
> * [MNG-4945] - Remove mergeId from public POM
> * [MNG-4957] - Emit validation warning when project version uses irregular SNAPSHOT version string
> * [MNG-4959] - Update default plugin versions
>
>
> Enjoy,
>
>
> -The Maven team
>
>
> --------------------------------------------------------------------- To unsubscribe, e-mail: announce-unsubscribe(a)apache.org For additional commands, e-mail: announce-help(a)apache.org
>
Hi Anca,
On Jan 10, 2011, at 6:42 PM, lucaa (SVN) wrote:
> Author: lucaa
> Date: 2011-01-10 18:42:29 +0100 (Mon, 10 Jan 2011)
> New Revision: 33919
>
> Modified:
> platform/web/trunk/standard/pom.xml
> Log:
> XWIKI-5843: Columns layout for container macro should not use inline styles
> * Excluded the columns.css from minification, since it contains velocity code and cannot be minified properly
Shouldn't this comment be placed in the pom.xml just above the exclude instead?
Otherwise, how are we going to remember this in a few months?
Thanks
-Vincent
> Modified: platform/web/trunk/standard/pom.xml
> ===================================================================
> --- platform/web/trunk/standard/pom.xml 2011-01-10 17:01:53 UTC (rev 33918)
> +++ platform/web/trunk/standard/pom.xml 2011-01-10 17:42:29 UTC (rev 33919)
> @@ -378,6 +378,7 @@
> <exclude>**/actionButtons.js</exclude>
> <exclude>**/notification.css</exclude>
> <exclude>**/usersandgroups.js</exclude>
> + <exclude>**/columns.css</exclude>
> </excludes>
> </configuration>
> </plugin>
Hello devs,
I would like we start to think about how we should implement space
pretty names in XE. Ideally, I would like to implement space pretty
names in the course of XWiki 3.0.
Here is an (open) list of options :
1. We use the space WebHome title.
Pros: It's easy to implement, we don't need new UI.
Cons: Can create a confusion between the space and it's home page,
since they have the same title.
2. We add a new field in XWikiPreferences and each space have their
titles in WebPreferences page.
Pros: The home page title can be different than the space title
Cons: It means the WebPreferences page becomes mandatory for spaces
with a pretty name
3. We add a new class, XWiki.SpaceClass, that holds metadata about the
space (pretty name, type of space, etc.). Each space have its
XWiki.SpaceClass object either in the WebHome or in WebPreferences
Pros : It's open to even more space metadata, like categories, or any
other metadata we want
Cons: It adds complexity. If it's stored in WebPreferences page, then same as 2.
Today I'm more inclined towards 1. In my opinion this is an elegant
solution that does not add complexity and that is not hard to
understand for users of XWiki.
Jerome.
Hi Anca,
On 01/10/2011 12:56 PM, lucaa (SVN) wrote:
> Author: lucaa
> Date: 2011-01-10 11:56:58 +0100 (Mon, 10 Jan 2011)
> New Revision: 33873
>
> Added:
> platform/xwiki-plugins/trunk/skinx/src/main/java/org/
> platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/
> platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/
> platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/AbstractWrapperSkinExtension.java
> platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/
> platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/CssDocumentSkinExtension.java
> platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/CssFileSkinExtension.java
> platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/CssResourceSkinExtension.java
> platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/JsDocumentSkinExtension.java
> platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/JsFileSkinExtension.java
> platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/JsResourceSkinExtension.java
> platform/xwiki-plugins/trunk/skinx/src/main/resources/
> platform/xwiki-plugins/trunk/skinx/src/main/resources/META-INF/
> platform/xwiki-plugins/trunk/skinx/src/main/resources/META-INF/components.txt
> Modified:
> platform/xwiki-plugins/trunk/skinx/pom.xml
> Log:
> XSKINX-47: Implement a bridge to the skin extension API
>
>
> Modified: platform/xwiki-plugins/trunk/skinx/pom.xml
> ===================================================================
> --- platform/xwiki-plugins/trunk/skinx/pom.xml 2011-01-10 10:53:23 UTC (rev 33872)
> +++ platform/xwiki-plugins/trunk/skinx/pom.xml 2011-01-10 10:56:58 UTC (rev 33873)
> @@ -34,7 +34,7 @@
> <version>1.20-SNAPSHOT</version>
> <description>XWiki Platform - Plugins - Skin Extensions</description>
> <properties>
> -<platform.core.version>2.4</platform.core.version>
> +<platform.core.version>3.0-SNAPSHOT</platform.core.version>
> </properties>
> <dependencies>
> <dependency>
> @@ -44,6 +44,12 @@
> <scope>provided</scope>
> </dependency>
> <dependency>
> +<groupId>org.xwiki.platform</groupId>
> +<artifactId>xwiki-core-skin</artifactId>
> +<version>${platform.core.version}</version>
> +<scope>provided</scope>
> +</dependency>
> +<dependency>
> <groupId>commons-logging</groupId>
> <artifactId>commons-logging</artifactId>
> </dependency>
>
> Added: platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/AbstractWrapperSkinExtension.java
> ===================================================================
> --- platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/AbstractWrapperSkinExtension.java (rev 0)
> +++ platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/AbstractWrapperSkinExtension.java 2011-01-10 10:56:58 UTC (rev 33873)
> @@ -0,0 +1,81 @@
> +/*
> + * See the NOTICE file distributed with this work for additional
> + * information regarding copyright ownership.
> + *
> + * This is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU Lesser General Public License as
> + * published by the Free Software Foundation; either version 2.1 of
> + * the License, or (at your option) any later version.
> + *
> + * This software is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this software; if not, write to the Free
> + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> + * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> + */
> +package org.xwiki.skinx;
> +
> +import java.util.Map;
> +
> +import org.xwiki.component.annotation.Requirement;
> +import org.xwiki.context.Execution;
> +
> +import com.xpn.xwiki.XWiki;
> +import com.xpn.xwiki.XWikiContext;
> +import com.xpn.xwiki.plugin.skinx.SkinExtensionPluginApi;
> +
> +/**
> + * The abstract implementation of the wrapper around the skinx plugin. Provides the mechanism needed to grab the skin
> + * extensions plugins and call the use methods on them, subclasses only need to provide the name of the skin extension.
> + *
> + * @version $Id$
> + * @since 3.0M1
> + */
> +public abstract class AbstractWrapperSkinExtension implements SkinExtension
> +{
> +
> + /**
> + * Execution context, needed to grab the sx plugins to include js and css.
> + */
> + @Requirement
> + private Execution execution;
> +
> + /**
> + * {@inheritDoc}
> + *
> + * @see org.xwiki.skinx.SkinExtension#use(java.lang.String)
> + */
> + public void use(String resource)
> + {
> + getSkinExtensionPluginApi().use(resource);
> + }
> +
> + /**
> + * {@inheritDoc}
> + *
> + * @see org.xwiki.skinx.SkinExtension#use(java.lang.String, java.util.Map)
> + */
> + public void use(String resource, Map<String, Object> parameters)
> + {
> + getSkinExtensionPluginApi().use(resource, parameters);
> + }
> +
> + /**
> + * @return the {@link SkinExtensionPluginApi} in the running wiki.
> + */
> + private SkinExtensionPluginApi getSkinExtensionPluginApi()
> + {
> + XWikiContext xwikiContext = (XWikiContext) execution.getContext().getProperty("xwikicontext");
> + XWiki wiki = xwikiContext.getWiki();
> + return (SkinExtensionPluginApi) wiki.getPluginApi(getName(), xwikiContext);
> + }
> +
> + /**
> + * @return the name of the skin extension (e.g. ssx, jsfx, etc) to wrap.
> + */
> + public abstract String getName();
> +}
This method is not necessary because you should be able to get component
hint through introspection:
Component component = (Component)
this.getClass().getAnnotation(Component.class);
String name = component.value();
>
>
> Property changes on: platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/AbstractWrapperSkinExtension.java
> ___________________________________________________________________
> Added: svn:keywords
> + Author Id Revision HeadURL
> Added: svn:eol-style
> + native
>
> Added: platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/CssDocumentSkinExtension.java
> ===================================================================
> --- platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/CssDocumentSkinExtension.java (rev 0)
> +++ platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/CssDocumentSkinExtension.java 2011-01-10 10:56:58 UTC (rev 33873)
> @@ -0,0 +1,49 @@
> +/*
> + * See the NOTICE file distributed with this work for additional
> + * information regarding copyright ownership.
> + *
> + * This is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU Lesser General Public License as
> + * published by the Free Software Foundation; either version 2.1 of
> + * the License, or (at your option) any later version.
> + *
> + * This software is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this software; if not, write to the Free
> + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> + * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> + */
> +package org.xwiki.skinx.internal;
> +
> +import org.xwiki.component.annotation.Component;
> +import org.xwiki.skinx.AbstractWrapperSkinExtension;
> +
> +/**
> + * Skin extension that provides the wrapper on the object CSS extensions.
> + *
> + * @version $Id$
> + * @since 3.0M1
> + */
> +(a)Component(CssDocumentSkinExtension.NAME)
> +public class CssDocumentSkinExtension extends AbstractWrapperSkinExtension
> +{
If we remove the getName() method then the only purpose of these classes
if to specify the hint. WDYT about making the skin extension plugins
also component implementations (i.e. make them implement SkinExtension
interface)?
Thanks,
Marius
> + /**
> + * The name of this extension.
> + */
> + static final String NAME = "ssx";
> +
> + /**
> + * {@inheritDoc}
> + *
> + * @see org.xwiki.skinx.AbstractWrapperSkinExtension#getName()
> + */
> + @Override
> + public String getName()
> + {
> + return NAME;
> + }
> +}
>
>
> Property changes on: platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/CssDocumentSkinExtension.java
> ___________________________________________________________________
> Added: svn:keywords
> + Author Id Revision HeadURL
> Added: svn:eol-style
> + native
>
> Added: platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/CssFileSkinExtension.java
> ===================================================================
> --- platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/CssFileSkinExtension.java (rev 0)
> +++ platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/CssFileSkinExtension.java 2011-01-10 10:56:58 UTC (rev 33873)
> @@ -0,0 +1,49 @@
> +/*
> + * See the NOTICE file distributed with this work for additional
> + * information regarding copyright ownership.
> + *
> + * This is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU Lesser General Public License as
> + * published by the Free Software Foundation; either version 2.1 of
> + * the License, or (at your option) any later version.
> + *
> + * This software is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this software; if not, write to the Free
> + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> + * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> + */
> +package org.xwiki.skinx.internal;
> +
> +import org.xwiki.component.annotation.Component;
> +import org.xwiki.skinx.AbstractWrapperSkinExtension;
> +
> +/**
> + * Skin extension that provides the wrapper on the file CSS extensions.
> + *
> + * @version $Id$
> + * @since 3.0M1
> + */
> +(a)Component(CssFileSkinExtension.NAME)
> +public class CssFileSkinExtension extends AbstractWrapperSkinExtension
> +{
> + /**
> + * The name of this extension.
> + */
> + static final String NAME = "ssfx";
> +
> + /**
> + * {@inheritDoc}
> + *
> + * @see org.xwiki.skinx.AbstractWrapperSkinExtension#getName()
> + */
> + @Override
> + public String getName()
> + {
> + return NAME;
> + }
> +}
>
>
> Property changes on: platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/CssFileSkinExtension.java
> ___________________________________________________________________
> Added: svn:keywords
> + Author Id Revision HeadURL
> Added: svn:eol-style
> + native
>
> Added: platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/CssResourceSkinExtension.java
> ===================================================================
> --- platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/CssResourceSkinExtension.java (rev 0)
> +++ platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/CssResourceSkinExtension.java 2011-01-10 10:56:58 UTC (rev 33873)
> @@ -0,0 +1,49 @@
> +/*
> + * See the NOTICE file distributed with this work for additional
> + * information regarding copyright ownership.
> + *
> + * This is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU Lesser General Public License as
> + * published by the Free Software Foundation; either version 2.1 of
> + * the License, or (at your option) any later version.
> + *
> + * This software is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this software; if not, write to the Free
> + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> + * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> + */
> +package org.xwiki.skinx.internal;
> +
> +import org.xwiki.component.annotation.Component;
> +import org.xwiki.skinx.AbstractWrapperSkinExtension;
> +
> +/**
> + * Skin extension that provides the wrapper on the resource CSS extensions.
> + *
> + * @version $Id$
> + * @since 3.0M1
> + */
> +(a)Component(CssResourceSkinExtension.NAME)
> +public class CssResourceSkinExtension extends AbstractWrapperSkinExtension
> +{
> + /**
> + * The name of this extension.
> + */
> + static final String NAME = "ssrx";
> +
> + /**
> + * {@inheritDoc}
> + *
> + * @see org.xwiki.skinx.AbstractWrapperSkinExtension#getName()
> + */
> + @Override
> + public String getName()
> + {
> + return NAME;
> + }
> +}
>
>
> Property changes on: platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/CssResourceSkinExtension.java
> ___________________________________________________________________
> Added: svn:keywords
> + Author Id Revision HeadURL
> Added: svn:eol-style
> + native
>
> Added: platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/JsDocumentSkinExtension.java
> ===================================================================
> --- platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/JsDocumentSkinExtension.java (rev 0)
> +++ platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/JsDocumentSkinExtension.java 2011-01-10 10:56:58 UTC (rev 33873)
> @@ -0,0 +1,49 @@
> +/*
> + * See the NOTICE file distributed with this work for additional
> + * information regarding copyright ownership.
> + *
> + * This is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU Lesser General Public License as
> + * published by the Free Software Foundation; either version 2.1 of
> + * the License, or (at your option) any later version.
> + *
> + * This software is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this software; if not, write to the Free
> + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> + * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> + */
> +package org.xwiki.skinx.internal;
> +
> +import org.xwiki.component.annotation.Component;
> +import org.xwiki.skinx.AbstractWrapperSkinExtension;
> +
> +/**
> + * Skin extension that provides the wrapper on the object Javascript extensions.
> + *
> + * @version $Id$
> + * @since 3.0M1
> + */
> +(a)Component(JsDocumentSkinExtension.NAME)
> +public class JsDocumentSkinExtension extends AbstractWrapperSkinExtension
> +{
> + /**
> + * The name of this extension.
> + */
> + static final String NAME = "jsx";
> +
> + /**
> + * {@inheritDoc}
> + *
> + * @see org.xwiki.skinx.AbstractWrapperSkinExtension#getName()
> + */
> + @Override
> + public String getName()
> + {
> + return NAME;
> + }
> +}
>
>
> Property changes on: platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/JsDocumentSkinExtension.java
> ___________________________________________________________________
> Added: svn:keywords
> + Author Id Revision HeadURL
> Added: svn:eol-style
> + native
>
> Added: platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/JsFileSkinExtension.java
> ===================================================================
> --- platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/JsFileSkinExtension.java (rev 0)
> +++ platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/JsFileSkinExtension.java 2011-01-10 10:56:58 UTC (rev 33873)
> @@ -0,0 +1,49 @@
> +/*
> + * See the NOTICE file distributed with this work for additional
> + * information regarding copyright ownership.
> + *
> + * This is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU Lesser General Public License as
> + * published by the Free Software Foundation; either version 2.1 of
> + * the License, or (at your option) any later version.
> + *
> + * This software is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this software; if not, write to the Free
> + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> + * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> + */
> +package org.xwiki.skinx.internal;
> +
> +import org.xwiki.component.annotation.Component;
> +import org.xwiki.skinx.AbstractWrapperSkinExtension;
> +
> +/**
> + * Skin extension that provides the wrapper on the file Javascript extensions.
> + *
> + * @version $Id$
> + * @since 3.0M1
> + */
> +(a)Component(JsFileSkinExtension.NAME)
> +public class JsFileSkinExtension extends AbstractWrapperSkinExtension
> +{
> + /**
> + * The name of this extension.
> + */
> + static final String NAME = "jsfx";
> +
> + /**
> + * {@inheritDoc}
> + *
> + * @see org.xwiki.skinx.AbstractWrapperSkinExtension#getName()
> + */
> + @Override
> + public String getName()
> + {
> + return NAME;
> + }
> +}
>
>
> Property changes on: platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/JsFileSkinExtension.java
> ___________________________________________________________________
> Added: svn:keywords
> + Author Id Revision HeadURL
> Added: svn:eol-style
> + native
>
> Added: platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/JsResourceSkinExtension.java
> ===================================================================
> --- platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/JsResourceSkinExtension.java (rev 0)
> +++ platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/JsResourceSkinExtension.java 2011-01-10 10:56:58 UTC (rev 33873)
> @@ -0,0 +1,49 @@
> +/*
> + * See the NOTICE file distributed with this work for additional
> + * information regarding copyright ownership.
> + *
> + * This is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU Lesser General Public License as
> + * published by the Free Software Foundation; either version 2.1 of
> + * the License, or (at your option) any later version.
> + *
> + * This software is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this software; if not, write to the Free
> + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> + * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> + */
> +package org.xwiki.skinx.internal;
> +
> +import org.xwiki.component.annotation.Component;
> +import org.xwiki.skinx.AbstractWrapperSkinExtension;
> +
> +/**
> + * Skin extension that provides the wrapper on the resource Javascript extensions.
> + *
> + * @version $Id$
> + * @since 3.0M1
> + */
> +(a)Component(JsResourceSkinExtension.NAME)
> +public class JsResourceSkinExtension extends AbstractWrapperSkinExtension
> +{
> + /**
> + * The name of this extension.
> + */
> + static final String NAME = "jsrx";
> +
> + /**
> + * {@inheritDoc}
> + *
> + * @see org.xwiki.skinx.AbstractWrapperSkinExtension#getName()
> + */
> + @Override
> + public String getName()
> + {
> + return NAME;
> + }
> +}
>
>
> Property changes on: platform/xwiki-plugins/trunk/skinx/src/main/java/org/xwiki/skinx/internal/JsResourceSkinExtension.java
> ___________________________________________________________________
> Added: svn:keywords
> + Author Id Revision HeadURL
> Added: svn:eol-style
> + native
>
> Added: platform/xwiki-plugins/trunk/skinx/src/main/resources/META-INF/components.txt
> ===================================================================
> --- platform/xwiki-plugins/trunk/skinx/src/main/resources/META-INF/components.txt (rev 0)
> +++ platform/xwiki-plugins/trunk/skinx/src/main/resources/META-INF/components.txt 2011-01-10 10:56:58 UTC (rev 33873)
> @@ -0,0 +1,6 @@
> +org.xwiki.skinx.internal.CssDocumentSkinExtension
> +org.xwiki.skinx.internal.JsDocumentSkinExtension
> +org.xwiki.skinx.internal.CssFileSkinExtension
> +org.xwiki.skinx.internal.JsFileSkinExtension
> +org.xwiki.skinx.internal.CssResourceSkinExtension
> +org.xwiki.skinx.internal.JsResourceSkinExtension
> \ No newline at end of file
>
>
> Property changes on: platform/xwiki-plugins/trunk/skinx/src/main/resources/META-INF/components.txt
> ___________________________________________________________________
> Added: svn:eol-style
> + native
>
> _______________________________________________
> notifications mailing list
> notifications(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/notifications
Hi Anca,
On 01/10/2011 12:53 PM, lucaa (SVN) wrote:
> Author: lucaa
> Date: 2011-01-10 11:53:02 +0100 (Mon, 10 Jan 2011)
> New Revision: 33871
>
> Added:
> platform/core/trunk/xwiki-skin/
> platform/core/trunk/xwiki-skin/pom.xml
> platform/core/trunk/xwiki-skin/src/
> platform/core/trunk/xwiki-skin/src/main/
> platform/core/trunk/xwiki-skin/src/main/java/
> platform/core/trunk/xwiki-skin/src/main/java/org/
> platform/core/trunk/xwiki-skin/src/main/java/org/xwiki/
> platform/core/trunk/xwiki-skin/src/main/java/org/xwiki/skinx/
> platform/core/trunk/xwiki-skin/src/main/java/org/xwiki/skinx/SkinExtension.java
> Modified:
> platform/core/trunk/pom.xml
> Log:
> XWIKI-5868: Add API for manipulating skin extensions as components
>
>
> Modified: platform/core/trunk/pom.xml
> ===================================================================
> --- platform/core/trunk/pom.xml 2011-01-10 09:32:57 UTC (rev 33870)
> +++ platform/core/trunk/pom.xml 2011-01-10 10:53:02 UTC (rev 33871)
> @@ -170,6 +170,7 @@
> <module>xwiki-csrf</module>
> <module>xwiki-extension</module>
> <module>xwiki-legacy</module>
> +<module>xwiki-skin</module>
> </modules>
> <profiles>
> <profile>
>
> Added: platform/core/trunk/xwiki-skin/pom.xml
> ===================================================================
> --- platform/core/trunk/xwiki-skin/pom.xml (rev 0)
> +++ platform/core/trunk/xwiki-skin/pom.xml 2011-01-10 10:53:02 UTC (rev 33871)
> @@ -0,0 +1,32 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> +<modelVersion>4.0.0</modelVersion>
> +<parent>
> +<groupId>org.xwiki.platform</groupId>
> +<artifactId>xwiki-core-parent</artifactId>
> +<version>3.0-SNAPSHOT</version>
> +</parent>
> +<artifactId>xwiki-core-skin</artifactId>
> +<name>XWiki Core - Skin Component</name>
> +<description>XWiki Core - Skin Component</description>
> +<properties>
> +<xwiki.clirr.skip>true</xwiki.clirr.skip>
> +</properties>
> +<dependencies>
> +<dependency>
> +<groupId>org.xwiki.platform</groupId>
> +<artifactId>xwiki-core-component-default</artifactId>
> +<version>${project.version}</version>
> +</dependency>
> +</dependencies>
> +<build>
> +<plugins>
> +<!-- Apply the Checkstyle configurations defined in the top level pom.xml file -->
> +<plugin>
> +<groupId>org.apache.maven.plugins</groupId>
> +<artifactId>maven-checkstyle-plugin</artifactId>
> +</plugin>
> +</plugins>
> +</build>
> +</project>
>
>
> Property changes on: platform/core/trunk/xwiki-skin/pom.xml
> ___________________________________________________________________
> Added: svn:keywords
> + Author Id Revision HeadURL
> Added: svn:eol-style
> + native
>
> Added: platform/core/trunk/xwiki-skin/src/main/java/org/xwiki/skinx/SkinExtension.java
> ===================================================================
> --- platform/core/trunk/xwiki-skin/src/main/java/org/xwiki/skinx/SkinExtension.java (rev 0)
> +++ platform/core/trunk/xwiki-skin/src/main/java/org/xwiki/skinx/SkinExtension.java 2011-01-10 10:53:02 UTC (rev 33871)
> @@ -0,0 +1,58 @@
> +/*
> + * See the NOTICE file distributed with this work for additional
> + * information regarding copyright ownership.
> + *
> + * This is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU Lesser General Public License as
> + * published by the Free Software Foundation; either version 2.1 of
> + * the License, or (at your option) any later version.
> + *
> + * This software is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this software; if not, write to the Free
> + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> + * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> + */
> +package org.xwiki.skinx;
> +
> +import java.util.Map;
> +
> +import org.xwiki.component.annotation.ComponentRole;
> +
> +/**
> + * Allows a component to use a skin file (js or css), in the current page being rendered.
> + *
> + * @version $Id$
> + * @since 3.0M1
> + */
> +@ComponentRole
> +public interface SkinExtension
> +{
> + /**
> + * Mark a resource as used in the current result. A resource is registered only once per request, further calls will
> + * not result in additional links, even if it is pulled with different parameters.
> + *
> + * @param resource The name of the resource to pull.
> + * @see AbstractSkinExtensionPlugin#use(String, XWikiContext)
I don't like the fact that the component interface points to an
implementation. What others think?
Thanks,
Marius
> + */
> + void use(String resource);
> +
> + /**
> + * Mark a skin extension document as used in the current result, together with some parameters. How the parameters
> + * are used, depends on the type of resource being pulled. For example, JS and CSS extensions use the parameters in
> + * the resulting URL, while Link extensions use the parameters as attributes of the link tag. A resource is
> + * registered only once per request, further calls will not result in additional links, even if it is pulled with
> + * different parameters. If more than one calls per request are made, the parameters used are the ones from the last
> + * call (or none, if the last call did not specify any parameters).<br />
> + * TODO: document here the parameters that can be used and their meaning.
> + *
> + * @param resource The name of the resource to pull.
> + * @param parameters The parameters for this resource.
> + * @see AbstractSkinExtensionPlugin#use(String, Map, XWikiContext)
> + */
> + void use(String resource, Map<String, Object> parameters);
> +}
>
>
> Property changes on: platform/core/trunk/xwiki-skin/src/main/java/org/xwiki/skinx/SkinExtension.java
> ___________________________________________________________________
> Added: svn:keywords
> + Author Id Revision HeadURL
> Added: svn:eol-style
> + native
>
> _______________________________________________
> notifications mailing list
> notifications(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/notifications
Hi guys,
Short story:
Where to put the css which is needed by java macros (e.g. the columns
layouting of the container macro)
1/ in colibri.css
2/ in a .css included on demand by the macro
a) from platform resources (using ssfx)
b) from the jar (using ssrx)
c) from an object in a page with ssx
3/ refactor the skin concept and create a 'platform css' to store all
these and not be affected by skin customization.
Long story:
I can see I've caused the web standards tests to fail for the trunk
(http://hudson.xwiki.org/job/xwiki-product-enterprise-tests/org.xwiki.enterp…)
because of the inline style attributes used by the columns layout of the
container, whijch is now used on the main page.
Now, I would like us to agree about where to store the styles needed by
the java macros to work right, such as the container macro with columns
layout. The options I see are:
1/ as until today (e.g. box macro, warning, error, info, etc), in
colibri.css/toucan.css/otherskinwehave.css. I don't like this solution
too much because it means that when another skin is used, things won't
work anymore unless the person writing the new skin takes care of
copying all these "things that must be there". The advantage of this is
having a single .css file to load on page load, the disadvantage being
that their css is loaded on all pages, regardless of it being used or not.
2/ loading of the styles on demand, each macro loads its style when it
needs it
a) from a .css file located in the platform resources, which the macro
has to include using the ssfx plugin when is executed -- much like a
wiki macro would to with a ssx.
b) from a .css file located in the macro archive (using ssrx), which the
macro includes when executed.
c) from a ssx page
c) has the advantage of being very very much more easy to change than a)
and finally than b) which is the hardest to customize. But on the other
side c) means the java macro depends on a page, which is not that good.
Note that "cascading" customization is possible for all these choices
(adding an extra css with rules to overwrite the rules in the default
css for the macro) and that in my view, it's enough, since the idea is
that the layout should be preserved no matter what (e.g. a user might
want to add a red border to the columns, but not make the columns
display as two paragraphs instead of two columns).
3/ refactoring the whole skin thing and creating a "platform" css, which
contains things that should work regardless of the skin used. Pros: it's
an adaptation of the current approach (1/), that solves the problem.
Cons: takes longer, might be very hard to separate what's platform and
what's skin.
These being said, I think I prefer 2/ if 3/ is not realistic, and for
the container macro at least, I would prefer to implement 2b).
Thanks,
Anca