### Eclipse Workspace Patch 1.0
#P xwiki-core-bridge
Index: src/main/java/org/xwiki/bridge/SkinAccessBridge.java
===================================================================
--- src/main/java/org/xwiki/bridge/SkinAccessBridge.java	(revision 0)
+++ src/main/java/org/xwiki/bridge/SkinAccessBridge.java	(revision 0)
@@ -0,0 +1,41 @@
+/*
+ * 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.bridge;
+
+/**
+ * Exposes methods for accessing Skin data.
+ * 
+ * @version $Id: $ 
+ * @since 1.7
+ */
+public interface SkinAccessBridge
+{
+    /**
+     * This component's role, used when code needs to look it up.
+     */
+    String ROLE = SkinAccessBridge.class.getName();
+    
+    /**
+     * Gets a specific file from the current skin.
+     * @param fileName the required file
+     * @return the file's URL
+     */
+    String getSkinFile(String fileName);
+}
#P xwiki-core
Index: src/main/java/com/xpn/xwiki/DefaultSkinAccessBridge.java
===================================================================
--- src/main/java/com/xpn/xwiki/DefaultSkinAccessBridge.java	(revision 0)
+++ src/main/java/com/xpn/xwiki/DefaultSkinAccessBridge.java	(revision 0)
@@ -0,0 +1,53 @@
+/*
+ * 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 com.xpn.xwiki;
+
+import org.xwiki.bridge.SkinAccessBridge;
+import org.xwiki.context.Execution;
+
+/**
+ * {@inheritDoc}
+ * @see org.xwiki.bridge.SkinAccessBridge
+ * @version $Id: $ 
+ * @since 1.7
+ */
+public class DefaultSkinAccessBridge implements SkinAccessBridge
+{
+    /** Execution context handler, needed for accessing the XWikiContext. */
+    private Execution execution;
+
+    private XWikiContext getContext()
+    {
+        return (XWikiContext) this.execution.getContext().getProperty("xwikicontext");
+    }
+    
+    /**
+     * {@inheritDoc}
+     * @see org.xwiki.bridge.SkinAccessBridge#getSkinFile(String fileName)
+     */
+    public String getSkinFile(String fileName)
+    {
+        XWikiContext xcontext = getContext();
+        XWiki xwiki = xcontext.getWiki();
+        return xwiki.getSkinFile(fileName, xcontext);
+    }
+}
Index: src/main/resources/META-INF/plexus/components.xml
===================================================================
--- src/main/resources/META-INF/plexus/components.xml	(revision 14522)
+++ src/main/resources/META-INF/plexus/components.xml	(working copy)
@@ -58,6 +58,18 @@
         </requirement>
       </requirements>
     </component>
+    <component>
+      <role>org.xwiki.bridge.XWikiAccessBridge</role>
+      <role-hint>default</role-hint>
+      <implementation>com.xpn.xwiki.DefaultXWikiAccessBridge</implementation>
+      <instantiation-strategy>singleton</instantiation-strategy>
+      <lifecycle-handler>xwiki</lifecycle-handler>
+      <requirements>
+        <requirement>
+          <role>org.xwiki.context.Execution</role>
+        </requirement>
+      </requirements>
+    </component>
     <!-- store components -->
     <component>
       <role>com.xpn.xwiki.store.hibernate.HibernateSessionFactory</role>
