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.0
http://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.
I don't like the fact that the component interface points to an
implementation. What others think?