Hi,
This is a technical refactoring but I'm posting it here since it means changing our rendering API quite significantly.
Basically we currently have 2 notions: Image and Link. I'd like to make them one (called Reference) since we need/want to handle similarly and this would remove lots of duplicated code.
Since we've already broken quite a lot of Rendering APIs in XE 2.5M1/M2 I feel it's a good time to be brave and go the full monty... ;)
I've started the work already but wanted to keep you posted in case someone disagrees.
For the record this is about implementing:
- http://jira.xwiki.org/jira/browse/XWIKI-5549
- http://jira.xwiki.org/jira/browse/XWIKI-5554
Thanks
-Vincent
Hi all,
On Friday, October 1rst, XWiki SAS (http://www.xwiki.com) made a demo of
the XWiki open source solution, as a finalist og the Demo Cup. It is one
of the lucky winners!
The Demo Cup is an opportunity to show innovative and promising open
source solutions, selected very strictly. We are proud to announce that
XWiki SAS received *one of five awards*, given by the jury composed of
international experts from the field of open source. It rewards the work
and commitment of a team and of the XWiki open source community. *So
thank you to all of you!
*
The other winners are Bluegriffon, Obeo, Jaspersoft and Talend.
About the Demo Cup: http://www.openworldforum.org/connect/awards
Regards,
Emilie
----
XWiki SAS
Marketing & Communication Manager
Web site: http://www.xwiki.com
To subscribe to our newsletter:
- http://www.xwiki.com/xwiki/bin/view/News/Newsletter
Join our community on Facebook:
- http://www.facebook.com/xwiki
Follow us on Twitter:
- http://www.twitter.com/xwiki
The XWiki development team is pleased to announce the release of XWiki
Enterprise 2.5 Milestone 2.
Go grab it at http://www.xwiki.org/xwiki/bin/view/Main/Download
Main changes since XWiki Enterprise 2.5 Milestone 1:
* Support for viewing attached office documents in the wiki
* Experimental Extension Manager
* New User Directory
* Further improvements to the edit UI
* More consistent use of user avatars
* More image manipulation settings
* Better handling of attachment versions when rolling back documents
* Preliminary optional accessibility stylesheet
* Experimental xwiki/2.1 wiki syntax
* Interwiki links
* Various Security improvements
For more information see the Release notes at
http://www.xwiki.org/xwiki/bin/Main/ReleaseNotesXWikiEnterprise25M2
Thanks
-The XWiki dev team
Hi guys,
The Main.Dashboard revamping was supposed to be done in 2.5M2, but I
didn't manage to. I would like to implement issues XE-719, XE-720,
XE-721 and XE-722 during the RC phase, to have them for 2.5 final.
Here's my +1,
WDYT?
If we do, the risk is that there would be issues, and the issues would
be in the main page of the wiki, if we don't (and create the 2.6 branch
and develop there), then we will be farther away with the implementation
of the dashboard in the 2.5 release (basically only the macro to display
columned content will be released in the final).
Additionally, I might not be able to have everything done by RC time,
but at least some of the macros should be implemented (the order is the
one of the list above).
Thanks,
Anca
Hi,
I'm failing at getting a logical condition that check if given XWiki
document has an object of a given class.
Please, could you help me with this?
Thanks!
Ricardo
--
Ricardo Rodríguez
CTO
eBioTIC.
Life Sciences, Data Modeling and Information Management Systems
Hi devs,
According to the roadmap [
http://enterprise.xwiki.org/xwiki/bin/Main/Roadmap ], XE 2.5M2 should be
released today. However, there have been some significant changes
recently, which might need more time to stabilize. So, what's the status on:
- CSRF
- Office Preview
- Extension manager
Can we release M2 ASAP, or are there still things to do for these two?
There are also some features that didn't make it in so far:
- "Email this page" feature
- User directory
- Export UI
- Dashboards
- Recent changes
- Localization
Are any of these close to being committed? Should we wait a few more
days or do we postpone them to the next release?
For me:
- "Email this page" should be ready in two days
- Export UI: Postpone
- Localization: Postpone
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
Hi,
I've read a number of Jira issues and entries both in users and devs
email list but I was not able to answer this question:
Should I be able to include Velocity code in the document's title of a
***XE 1.3.8295*** (XWiki 1.0 syntax) installation?
I've failed so far. All what I get is the uninterpreted Velocity code.
The same code (really simple examples assigning a value to a variable
and reading it) is being correctly interpreted in the body of the document.
Thanks!
Ricardo
--
Ricardo Rodríguez
CTO
eBioTIC.
Life Sciences, Data Modeling and Information Management Systems
Hi all, hi Caleb!
Clearly I'm not the only one thinking about replacing words with links!
:-) I've found the Replace Words With Links Snippet
(http://tinyurl.com/37f79qu) and would like to know if it is worth to
get it adapted to a different bunch of requirements, if it could be
generalized or if I'm thinking about a different thing that
requires/deserves a different solution.
Having its origin in what I now consider wrong data model design
(http://ftp.ebiotic.net/onPdr/pescaderiasDataModel.png), I now get pages
including an object of User class (representing a given provider), and
pages containing an object of Species class (representing a product
offered by one of several providers).
Doc1.User.species contents a text string like 'species 01, species 04,
species 05'
Doc2.Species.galicianName contents, for instance, 'species 04'
What I need to do is to replace 'species 04' when rendering
Doc1.User.species with a link to Doc2. And the same with the other
strings if it exist a document with a Doc2.Species.galicianName matching
one of the strings in Doc1.User.species.
I've not a clear idea yet about what must be the right implementation to
"assign items to providers, but I've to deal with what I have for now.
Please, is it worth to adapt the Replace Words With Links Snippet to
this use case? Could it be done in some other simpler way? Could you
point me to any other example that could apply to this case? Thanks!
I'm new to Velocity, to Groovy and in most of the senses to XWiki as well!
By the way: the replacement of strings with links must be done on the
fly. Doing it any other way will complicate the way users create new
pages. It could be not the most efficient and cheap way, but I'm forced
to do it this way until we time and resources to modify the whole model.
Thank you so much for your help!
Ricardo
--
Ricardo Rodríguez
CTO
eBioTIC.
Life Sciences, Data Modeling and Information Management Systems
Hi devs,
I propose to remove the following templates from
web/standard/src/main/webapp/templates/:
* direct.vm
* hiddenobject.vm
* plaincode.vm
* printheader.vm
* rights.vm
* viewobject.vm
These templates have been last modified in 2005-2008 and don't seem to
be used anywhere (any more) - please let me know if I'm wrong. Some of
them also have security issues that are hard to fix.
I'm +1 for removing them in 2.5M2
WDYT?
Thanks,
Alex
Hi,
I'd like to add interwiki support in XWiki Syntax 2.0 and 2.1.
I'm proposing to add the interwiki definitions to xwiki.properties using the format:
rendering.interWikiDefinitions = alias1=http://url1/
rendering.interWikiDefinitions = aliasN=http://urlN/
Then it's used like this for XWiki Syntax 2.1:
[[interwiki:alias1:path]]
For XWiki Syntax 2.0:
[[path@alias1]]
This generates in HTML:
http://url1/path
I have this already implemented, waiting to commit.
Thanks
-Vincent
Hi!
I'm trying to understand the Query Guide available at
http://xpescaderias.environmentalchange.net/xwiki/bin/view/Species/SpeciesC…
but still failing to get an answer to a problem.
I navigate to a document with this query...
#set($query = ", BaseObject as obj, LargeStringProperty as prop where
doc.fullName = obj.name and obj.className='Users.PdrUserClass' and
obj.id=prop.id.id and prop.id.name='Species' and prop.value like '" +
$species + "' order by doc.fullName asc")
I would like to set the value of $species to the value of the property
GalicianName of the class Species.SpeciesClass instantiated in this
document.
Please, could anybody help me to solve this doubt? Thanks!
Ricardo
--
Ricardo Rodríguez
CTO
eBioTIC.
Life Sciences, Data Modeling and Information Management Systems
On Sep 29, 2010, at 11:36 PM, lucaa (SVN) wrote:
> Author: lucaa
> Date: 2010-09-29 23:36:42 +0200 (Wed, 29 Sep 2010)
> New Revision: 31474
>
> Added:
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/pom.xml
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/src/main/java/org/xwiki/rendering/internal/macro/container/ColumnStyle.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/src/main/java/org/xwiki/rendering/internal/macro/container/ColumnsLayoutManager.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/src/main/java/org/xwiki/rendering/internal/macro/container/ContainerMacro.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/src/main/java/org/xwiki/rendering/macro/container/ContainerMacroParameters.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/src/main/java/org/xwiki/rendering/macro/container/LayoutManager.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/src/test/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/src/test/java/org/xwiki/rendering/RenderingTests.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/src/test/resources/macrocontainer4.test
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-dashboard/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-dashboard/pom.xml
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-dashboard/src/main/java/org/xwiki/rendering/internal/macro/dashboard/DashboardMacro.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-dashboard/src/main/java/org/xwiki/rendering/macro/dashboard/DashboardMacroParameters.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-dashboard/src/test/
> Removed:
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/pom.xml
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/src/main/java/org/xwiki/rendering/internal/macro/container/ColumnStyle.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/src/main/java/org/xwiki/rendering/internal/macro/container/ColumnsLayoutManager.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/src/main/java/org/xwiki/rendering/internal/macro/container/ContainerMacro.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/src/main/java/org/xwiki/rendering/macro/container/ContainerMacroParameters.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/src/main/java/org/xwiki/rendering/macro/container/LayoutManager.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-container/src/test/java/org/xwiki/rendering/RenderingTests.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-dashboard/pom.xml
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-dashboard/src/main/java/org/xwiki/rendering/internal/macro/dashboard/DashboardMacro.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-dashboard/src/main/java/org/xwiki/rendering/macro/dashboard/DashboardMacroParameters.java
> Modified:
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/pom.xml
> Log:
> XWIKI-5544: Create container macro that allows various layouts and decoration for contained objects
> XWIKI-5545: Commit initial version of the dashboard macro, that displays the contents on a columns dashboard
> * Moved the container and dashboard implementations from contrib/sandbox to the platform.
Note for the future: Maybe we'll have a platform/core/xwiki-gadget/ top level module in which we could put these macros.
Thanks
-Vincent
Could be interesting for our gadget impl.
Thanks
-Vincent
Begin forwarded message:
> From: Paul Lindner <lindner(a)apache.org>
> Date: September 29, 2010 8:38:56 PM GMT+02:00
> To: announce(a)apache.org
> Cc: dev(a)shindig.apache.org
> Subject: [ANN] Apache Shindig 2.0.0 released
>
> The Apache Shindig team is proud to announce the release of Apache
> Shindig, version 2.0.0
>
> Apache Shindig is an OpenSocial reference implementation in wide use
> by both social networks and enterprise software.
>
> Version 2.0.0 marks a major upgrade over the last previous stable
> release - 1.0.1. This release supports most of the OpenSocial 1.0
> specification. To accomplish this most of the interfaces have been
> extensively refactored and all of the subsystems have been cleaned up
> and revamped.
>
> Major new features include:
> * Support for Opensocial 0.9 and 1.0 features
> * New javascript osapi
> * OpenSocial Templates
> * Data Pipelining
> * Experimental Support in the shindig-extras module for:
> * Activity Streams Support
> * PubSub-2 support
> * Google Wave gadgets support
> * Opensocial Virtual Currency and Payments
> * Opensocial Groups Support
> * and much more.
>
> Developer Improvements include:
> * Much improved Guice extensibility. It's now much easier to layer
> new functionality
> into Shindig.
> * New shindig-extras module that includes features that are not yet
> standardized
> * All dependencies synced to the latest revisions.
>
> The release is available here:
>
> http://www.apache.org/dyn/closer.cgi/shindig/2.0.0
>
> You can find out more information about Apache Shindig including how
> to contribute at the project website at http://shindig.apache.org/
Hi all,
speaking of module reorganization, I would like to commit the following
layout (which is more consistent wrt the current one where everything is
in the toplevel directory)
xwiki-rest-api (toplevel module)
|
+- xwiki-rest-api-server (was xwiki-rest)
|
+- xwiki-rest-api-model (was xwiki-rest-module)
Let me know if you have any concern about this layout
Thanks,
-Fabio
hmmm IMO this macro should be in the xwiki-office/ directory along with the other 2 projects.
WDYT?
Thanks
-Vincent
On Sep 28, 2010, at 5:52 PM, mflorea (SVN) wrote:
> Author: mflorea
> Date: 2010-09-28 17:52:58 +0200 (Tue, 28 Sep 2010)
> New Revision: 31441
>
> Added:
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/pom.xml
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/macro/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/macro/office/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/macro/office/OfficeMacro.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/macro/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/macro/office/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/macro/office/OfficeMacroParameters.java
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/resources/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/resources/META-INF/
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/resources/META-INF/components.txt
> Modified:
> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/pom.xml
> Log:
> XWIKI-5538: Create a macro to view office attachments
>
>
> Modified: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/pom.xml
> ===================================================================
> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/pom.xml 2010-09-28 14:59:38 UTC (rev 31440)
> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/pom.xml 2010-09-28 15:52:58 UTC (rev 31441)
> @@ -116,5 +116,6 @@
> <module>xwiki-rendering-macro-ruby</module>
> <module>xwiki-rendering-macro-python</module>
> <module>xwiki-rendering-macro-php</module>
> + <module>xwiki-rendering-macro-office</module>
> </modules>
> </project>
>
> Added: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/pom.xml
> ===================================================================
> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/pom.xml (rev 0)
> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/pom.xml 2010-09-28 15:52:58 UTC (rev 31441)
> @@ -0,0 +1,58 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +
> +<!--
> + *
> + * 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.
> + *
> +-->
> +
> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/maven-v4_0_0.xsd">
> + <parent>
> + <artifactId>xwiki-core-rendering-macros-parent</artifactId>
> + <groupId>org.xwiki.platform</groupId>
> + <version>2.5-SNAPSHOT</version>
> + </parent>
> + <modelVersion>4.0.0</modelVersion>
> + <artifactId>xwiki-core-rendering-macro-office</artifactId>
> + <name>XWiki Platform - Core - Rendering - Macro - Office</name>
> + <version>2.5-SNAPSHOT</version>
> + <description>View office attachments (doc, ppt, xls, odt, odp, ods etc.) inside wiki pages without downloading or
> + importing them.</description>
> + <dependencies>
> + <dependency>
> + <groupId>org.xwiki.platform</groupId>
> + <artifactId>xwiki-core-office-viewer</artifactId>
> + <version>${project.version}</version>
> + </dependency>
> + </dependencies>
> + <build>
> + <plugins>
> + <plugin>
> + <!-- Apply the Checkstyle configurations defined in the top level pom.xml file -->
> + <groupId>org.apache.maven.plugins</groupId>
> + <artifactId>maven-checkstyle-plugin</artifactId>
> + </plugin>
> + </plugins>
> + </build>
> + <properties>
> + <!-- Skip Clirr execution since this is the first release of this module. Remove once XE 2.5M2 is released. -->
> + <xwiki.clirr.skip>true</xwiki.clirr.skip>
> + </properties>
> +</project>
>
>
> Property changes on: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/pom.xml
> ___________________________________________________________________
> Added: svn:keywords
> + Author Id Revision HeadURL
> Added: svn:eol-style
> + native
>
> Added: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/macro/office/OfficeMacro.java
> ===================================================================
> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/macro/office/OfficeMacro.java (rev 0)
> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/macro/office/OfficeMacro.java 2010-09-28 15:52:58 UTC (rev 31441)
> @@ -0,0 +1,108 @@
> +/*
> + * 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.rendering.internal.macro.office;
> +
> +import java.util.Collections;
> +import java.util.List;
> +import java.util.Map;
> +
> +import org.xwiki.bridge.DocumentAccessBridge;
> +import org.xwiki.component.annotation.Component;
> +import org.xwiki.component.annotation.Requirement;
> +import org.xwiki.model.EntityType;
> +import org.xwiki.model.reference.AttachmentReference;
> +import org.xwiki.model.reference.DocumentReference;
> +import org.xwiki.model.reference.EntityReferenceResolver;
> +import org.xwiki.office.viewer.OfficeViewer;
> +import org.xwiki.rendering.block.Block;
> +import org.xwiki.rendering.macro.AbstractMacro;
> +import org.xwiki.rendering.macro.MacroExecutionException;
> +import org.xwiki.rendering.macro.office.OfficeMacroParameters;
> +import org.xwiki.rendering.transformation.MacroTransformationContext;
> +
> +/**
> + * View office attachments (doc, ppt, xls, odt, odp, ods etc.) inside wiki pages without downloading or importing them.
> + *
> + * @version $Id$
> + * @since 2.5M2
> + */
> +@Component("office")
> +public class OfficeMacro extends AbstractMacro<OfficeMacroParameters>
> +{
> + /**
> + * The component used to resolve the attachment string reference relative to the current document reference.
> + */
> + @Requirement("explicit")
> + private EntityReferenceResolver<String> explicitStringEntityReferenceResolver;
> +
> + /**
> + * The component used to get the current document reference.
> + */
> + @Requirement
> + private DocumentAccessBridge documentAccessBridge;
> +
> + /**
> + * The component used to view the office attachments.
> + */
> + @Requirement
> + private OfficeViewer officeViewer;
> +
> + /**
> + * Default constructor.
> + */
> + public OfficeMacro()
> + {
> + super("Office Document Viewer", "View office attachments (doc, ppt, xls, odt, odp, ods etc.) inside "
> + + "wiki pages without downloading or importing them.", OfficeMacroParameters.class);
> +
> + setDefaultCategory(DEFAULT_CATEGORY_CONTENT);
> + }
> +
> + /**
> + * {@inheritDoc}
> + *
> + * @see AbstractMacro#execute(Object, String, MacroTransformationContext)
> + */
> + public List<Block> execute(OfficeMacroParameters parameters, String content, MacroTransformationContext context)
> + throws MacroExecutionException
> + {
> + DocumentReference currentDocumentReference = documentAccessBridge.getCurrentDocumentReference();
> + AttachmentReference attachmentReference =
> + new AttachmentReference(explicitStringEntityReferenceResolver.resolve(parameters.getAttachment(),
> + EntityType.ATTACHMENT, currentDocumentReference));
> + Map<String, String> viewParameters =
> + Collections.singletonMap("filterStyles", String.valueOf(parameters.isFilterStyles()));
> + try {
> + return officeViewer.createView(attachmentReference, viewParameters).getChildren();
> + } catch (Exception e) {
> + throw new MacroExecutionException("Failed to view office attachment.", e);
> + }
> + }
> +
> + /**
> + * {@inheritDoc}
> + *
> + * @see AbstractMacro#supportsInlineMode()
> + */
> + public boolean supportsInlineMode()
> + {
> + return false;
> + }
> +}
>
>
> Property changes on: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/macro/office/OfficeMacro.java
> ___________________________________________________________________
> Added: svn:keywords
> + Author Id Revision HeadURL
> Added: svn:eol-style
> + native
>
> Added: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/macro/office/OfficeMacroParameters.java
> ===================================================================
> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/macro/office/OfficeMacroParameters.java (rev 0)
> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/macro/office/OfficeMacroParameters.java 2010-09-28 15:52:58 UTC (rev 31441)
> @@ -0,0 +1,89 @@
> +/*
> + * 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.rendering.macro.office;
> +
> +import org.xwiki.properties.annotation.PropertyDescription;
> +import org.xwiki.properties.annotation.PropertyMandatory;
> +
> +/**
> + * Parameters for the {@link org.xwiki.rendering.internal.macro.office.OfficeMacro}.
> + *
> + * @version $Id$
> + * @since 2.5M2
> + */
> +public class OfficeMacroParameters
> +{
> + /**
> + * The office attachment to be viewed. Use an attachment string reference to specify which office file should be
> + * viewed: {@code file.ppt}, {@code Page(a)file.doc}, {@code Space.Page(a)file.xls} or {@code wiki:Space.Page@file.odt}.
> + */
> + private String attachment;
> +
> + /**
> + * Whether to filter in-line CSS styles present in the HTML content produced by the OpenOffice server. Office
> + * content is usually better integrated in the host wiki page when styles are filtered.
> + * <p>
> + * Styles are filtered by default.
> + */
> + private boolean filterStyles = true;
> +
> + /**
> + * @return a string reference to the office attachment to be viewed
> + */
> + public String getAttachment()
> + {
> + return attachment;
> + }
> +
> + /**
> + * Sets the office attachment to be viewed.
> + *
> + * @param attachment an attachment string reference
> + */
> + @PropertyDescription("The office attachment to be viewed. Use an attachment string reference to specify which "
> + + "office file should be viewed: file.ppt, Page(a)file.doc, Space.Page(a)file.xls or wiki:Space.Page@file.odt.")
> + @PropertyMandatory
> + public void setAttachment(String attachment)
> + {
> + this.attachment = attachment;
> + }
> +
> + /**
> + * @return {@code true} if the CSS styles present in the HTML content produces by the OpenOffice server are
> + * filtered, {@code false} otherwise
> + */
> + public boolean isFilterStyles()
> + {
> + return filterStyles;
> + }
> +
> + /**
> + * Sets whether to filter in-line CSS styles present in the HTML content produced by the OpenOffice server.
> + *
> + * @param filterStyles {@code true} to filter the CSS style present in the HTML content produces by the OpenOffice
> + * server, {@code false} otherwise
> + */
> + @PropertyDescription("Whether to filter in-line CSS styles present in the HTML content produced by the OpenOffice "
> + + "server. Office content is usually better integrated in the host wiki page when styles are filtered.")
> + public void setFilterStyles(boolean filterStyles)
> + {
> + this.filterStyles = filterStyles;
> + }
> +}
>
>
> Property changes on: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/macro/office/OfficeMacroParameters.java
> ___________________________________________________________________
> Added: svn:keywords
> + Author Id Revision HeadURL
> Added: svn:eol-style
> + native
>
> Added: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/resources/META-INF/components.txt
> ===================================================================
> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/resources/META-INF/components.txt (rev 0)
> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/resources/META-INF/components.txt 2010-09-28 15:52:58 UTC (rev 31441)
> @@ -0,0 +1 @@
> +org.xwiki.rendering.internal.macro.office.OfficeMacro
> \ No newline at end of file
>
>
> Property changes on: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/resources/META-INF/components.txt
> ___________________________________________________________________
> Added: svn:eol-style
> + native
On Tue, Sep 28, 2010 at 18:00, Vincent Massol <vincent(a)massol.net> wrote:
> hmmm IMO this macro should be in the xwiki-office/ directory along with the other 2 projects.
>
> WDYT?
+1 it's not really a standard standalone macro but more one of the
office module interfaces
>
> Thanks
> -Vincent
>
> On Sep 28, 2010, at 5:52 PM, mflorea (SVN) wrote:
>
>> Author: mflorea
>> Date: 2010-09-28 17:52:58 +0200 (Tue, 28 Sep 2010)
>> New Revision: 31441
>>
>> Added:
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/pom.xml
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/macro/
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/macro/office/
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/macro/office/OfficeMacro.java
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/macro/
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/macro/office/
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/macro/office/OfficeMacroParameters.java
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/resources/
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/resources/META-INF/
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/resources/META-INF/components.txt
>> Modified:
>> platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/pom.xml
>> Log:
>> XWIKI-5538: Create a macro to view office attachments
>>
>>
>> Modified: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/pom.xml
>> ===================================================================
>> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/pom.xml 2010-09-28 14:59:38 UTC (rev 31440)
>> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/pom.xml 2010-09-28 15:52:58 UTC (rev 31441)
>> @@ -116,5 +116,6 @@
>> <module>xwiki-rendering-macro-ruby</module>
>> <module>xwiki-rendering-macro-python</module>
>> <module>xwiki-rendering-macro-php</module>
>> + <module>xwiki-rendering-macro-office</module>
>> </modules>
>> </project>
>>
>> Added: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/pom.xml
>> ===================================================================
>> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/pom.xml (rev 0)
>> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/pom.xml 2010-09-28 15:52:58 UTC (rev 31441)
>> @@ -0,0 +1,58 @@
>> +<?xml version="1.0" encoding="UTF-8"?>
>> +
>> +<!--
>> + *
>> + * 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.
>> + *
>> +-->
>> +
>> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/maven-v4_0_0.xsd">
>> + <parent>
>> + <artifactId>xwiki-core-rendering-macros-parent</artifactId>
>> + <groupId>org.xwiki.platform</groupId>
>> + <version>2.5-SNAPSHOT</version>
>> + </parent>
>> + <modelVersion>4.0.0</modelVersion>
>> + <artifactId>xwiki-core-rendering-macro-office</artifactId>
>> + <name>XWiki Platform - Core - Rendering - Macro - Office</name>
>> + <version>2.5-SNAPSHOT</version>
>> + <description>View office attachments (doc, ppt, xls, odt, odp, ods etc.) inside wiki pages without downloading or
>> + importing them.</description>
>> + <dependencies>
>> + <dependency>
>> + <groupId>org.xwiki.platform</groupId>
>> + <artifactId>xwiki-core-office-viewer</artifactId>
>> + <version>${project.version}</version>
>> + </dependency>
>> + </dependencies>
>> + <build>
>> + <plugins>
>> + <plugin>
>> + <!-- Apply the Checkstyle configurations defined in the top level pom.xml file -->
>> + <groupId>org.apache.maven.plugins</groupId>
>> + <artifactId>maven-checkstyle-plugin</artifactId>
>> + </plugin>
>> + </plugins>
>> + </build>
>> + <properties>
>> + <!-- Skip Clirr execution since this is the first release of this module. Remove once XE 2.5M2 is released. -->
>> + <xwiki.clirr.skip>true</xwiki.clirr.skip>
>> + </properties>
>> +</project>
>>
>>
>> Property changes on: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/pom.xml
>> ___________________________________________________________________
>> Added: svn:keywords
>> + Author Id Revision HeadURL
>> Added: svn:eol-style
>> + native
>>
>> Added: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/macro/office/OfficeMacro.java
>> ===================================================================
>> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/macro/office/OfficeMacro.java (rev 0)
>> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/macro/office/OfficeMacro.java 2010-09-28 15:52:58 UTC (rev 31441)
>> @@ -0,0 +1,108 @@
>> +/*
>> + * 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.rendering.internal.macro.office;
>> +
>> +import java.util.Collections;
>> +import java.util.List;
>> +import java.util.Map;
>> +
>> +import org.xwiki.bridge.DocumentAccessBridge;
>> +import org.xwiki.component.annotation.Component;
>> +import org.xwiki.component.annotation.Requirement;
>> +import org.xwiki.model.EntityType;
>> +import org.xwiki.model.reference.AttachmentReference;
>> +import org.xwiki.model.reference.DocumentReference;
>> +import org.xwiki.model.reference.EntityReferenceResolver;
>> +import org.xwiki.office.viewer.OfficeViewer;
>> +import org.xwiki.rendering.block.Block;
>> +import org.xwiki.rendering.macro.AbstractMacro;
>> +import org.xwiki.rendering.macro.MacroExecutionException;
>> +import org.xwiki.rendering.macro.office.OfficeMacroParameters;
>> +import org.xwiki.rendering.transformation.MacroTransformationContext;
>> +
>> +/**
>> + * View office attachments (doc, ppt, xls, odt, odp, ods etc.) inside wiki pages without downloading or importing them.
>> + *
>> + * @version $Id$
>> + * @since 2.5M2
>> + */
>> +@Component("office")
>> +public class OfficeMacro extends AbstractMacro<OfficeMacroParameters>
>> +{
>> + /**
>> + * The component used to resolve the attachment string reference relative to the current document reference.
>> + */
>> + @Requirement("explicit")
>> + private EntityReferenceResolver<String> explicitStringEntityReferenceResolver;
>> +
>> + /**
>> + * The component used to get the current document reference.
>> + */
>> + @Requirement
>> + private DocumentAccessBridge documentAccessBridge;
>> +
>> + /**
>> + * The component used to view the office attachments.
>> + */
>> + @Requirement
>> + private OfficeViewer officeViewer;
>> +
>> + /**
>> + * Default constructor.
>> + */
>> + public OfficeMacro()
>> + {
>> + super("Office Document Viewer", "View office attachments (doc, ppt, xls, odt, odp, ods etc.) inside "
>> + + "wiki pages without downloading or importing them.", OfficeMacroParameters.class);
>> +
>> + setDefaultCategory(DEFAULT_CATEGORY_CONTENT);
>> + }
>> +
>> + /**
>> + * {@inheritDoc}
>> + *
>> + * @see AbstractMacro#execute(Object, String, MacroTransformationContext)
>> + */
>> + public List<Block> execute(OfficeMacroParameters parameters, String content, MacroTransformationContext context)
>> + throws MacroExecutionException
>> + {
>> + DocumentReference currentDocumentReference = documentAccessBridge.getCurrentDocumentReference();
>> + AttachmentReference attachmentReference =
>> + new AttachmentReference(explicitStringEntityReferenceResolver.resolve(parameters.getAttachment(),
>> + EntityType.ATTACHMENT, currentDocumentReference));
>> + Map<String, String> viewParameters =
>> + Collections.singletonMap("filterStyles", String.valueOf(parameters.isFilterStyles()));
>> + try {
>> + return officeViewer.createView(attachmentReference, viewParameters).getChildren();
>> + } catch (Exception e) {
>> + throw new MacroExecutionException("Failed to view office attachment.", e);
>> + }
>> + }
>> +
>> + /**
>> + * {@inheritDoc}
>> + *
>> + * @see AbstractMacro#supportsInlineMode()
>> + */
>> + public boolean supportsInlineMode()
>> + {
>> + return false;
>> + }
>> +}
>>
>>
>> Property changes on: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/internal/macro/office/OfficeMacro.java
>> ___________________________________________________________________
>> Added: svn:keywords
>> + Author Id Revision HeadURL
>> Added: svn:eol-style
>> + native
>>
>> Added: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/macro/office/OfficeMacroParameters.java
>> ===================================================================
>> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/macro/office/OfficeMacroParameters.java (rev 0)
>> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/macro/office/OfficeMacroParameters.java 2010-09-28 15:52:58 UTC (rev 31441)
>> @@ -0,0 +1,89 @@
>> +/*
>> + * 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.rendering.macro.office;
>> +
>> +import org.xwiki.properties.annotation.PropertyDescription;
>> +import org.xwiki.properties.annotation.PropertyMandatory;
>> +
>> +/**
>> + * Parameters for the {@link org.xwiki.rendering.internal.macro.office.OfficeMacro}.
>> + *
>> + * @version $Id$
>> + * @since 2.5M2
>> + */
>> +public class OfficeMacroParameters
>> +{
>> + /**
>> + * The office attachment to be viewed. Use an attachment string reference to specify which office file should be
>> + * viewed: {@code file.ppt}, {@code Page(a)file.doc}, {@code Space.Page(a)file.xls} or {@code wiki:Space.Page@file.odt}.
>> + */
>> + private String attachment;
>> +
>> + /**
>> + * Whether to filter in-line CSS styles present in the HTML content produced by the OpenOffice server. Office
>> + * content is usually better integrated in the host wiki page when styles are filtered.
>> + * <p>
>> + * Styles are filtered by default.
>> + */
>> + private boolean filterStyles = true;
>> +
>> + /**
>> + * @return a string reference to the office attachment to be viewed
>> + */
>> + public String getAttachment()
>> + {
>> + return attachment;
>> + }
>> +
>> + /**
>> + * Sets the office attachment to be viewed.
>> + *
>> + * @param attachment an attachment string reference
>> + */
>> + @PropertyDescription("The office attachment to be viewed. Use an attachment string reference to specify which "
>> + + "office file should be viewed: file.ppt, Page(a)file.doc, Space.Page(a)file.xls or wiki:Space.Page@file.odt.")
>> + @PropertyMandatory
>> + public void setAttachment(String attachment)
>> + {
>> + this.attachment = attachment;
>> + }
>> +
>> + /**
>> + * @return {@code true} if the CSS styles present in the HTML content produces by the OpenOffice server are
>> + * filtered, {@code false} otherwise
>> + */
>> + public boolean isFilterStyles()
>> + {
>> + return filterStyles;
>> + }
>> +
>> + /**
>> + * Sets whether to filter in-line CSS styles present in the HTML content produced by the OpenOffice server.
>> + *
>> + * @param filterStyles {@code true} to filter the CSS style present in the HTML content produces by the OpenOffice
>> + * server, {@code false} otherwise
>> + */
>> + @PropertyDescription("Whether to filter in-line CSS styles present in the HTML content produced by the OpenOffice "
>> + + "server. Office content is usually better integrated in the host wiki page when styles are filtered.")
>> + public void setFilterStyles(boolean filterStyles)
>> + {
>> + this.filterStyles = filterStyles;
>> + }
>> +}
>>
>>
>> Property changes on: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/java/org/xwiki/rendering/macro/office/OfficeMacroParameters.java
>> ___________________________________________________________________
>> Added: svn:keywords
>> + Author Id Revision HeadURL
>> Added: svn:eol-style
>> + native
>>
>> Added: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/resources/META-INF/components.txt
>> ===================================================================
>> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/resources/META-INF/components.txt (rev 0)
>> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/resources/META-INF/components.txt 2010-09-28 15:52:58 UTC (rev 31441)
>> @@ -0,0 +1 @@
>> +org.xwiki.rendering.internal.macro.office.OfficeMacro
>> \ No newline at end of file
>>
>>
>> Property changes on: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-office/src/main/resources/META-INF/components.txt
>> ___________________________________________________________________
>> Added: svn:eol-style
>> + native
>
> _______________________________________________
> devs mailing list
> devs(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/devs
>
--
Thomas Mortagne
Hi devs,
Vincent suggested that I should rename xwiki-officeimporter and
xwiki-officepreview to xwiki-office-importer and xwiki-office-preview
respectively. The rules are:
* module name starts with "xwiki"
* separate words with - (dash) (e.g. xwiki-shared-tests)
* prefer short names (fewer words) (xwiki-csrf instead of xwiki-csrftoken)
* avoid generic words like "service", "manger" (e.g. xwiki-patch instead
of xwiki-patch-service)
I'm +1 for these rules. If you agree I'll rename the office modules.
Thanks,
Marius
Hi devs,
I'm going to create a macro for previewing office attachments. It's main
usage will be:
{{officepreview attachment="presentation.ppt" filterStyles="true"/}}
"officepreview" is a bit long for a macro name. "preview" is shorter but
is too generic and thus can be confusing. "preview" could be the name of
a more generic macro that previews any type of attachment, based on its
mime type (so not just office documents).
"attachment" is the only required parameter. It is also a bit long, but
"file", which is shorter, is confusing. Some users might try to preview
office documents from their file system or from the web.
"filterStyles" is optional, and defaults to false.
The office preview macro will be just a wrapper for the office preview
script service. This means no decorations (e.g. borders, headings, etc.)
will be added around the output of the script service:
{{velocity}}
{{html}}
$services.officepreview.preview($attachmentReference, $filterStyles)
{{/html}}
{{/velocity}}
I'm not sure if the office preview macro should be a wiki macro or a
Java macro. One disadvantage for wiki macros is
http://jira.xwiki.org/jira/browse/XWIKI-4262 . This means that the
attachment string reference must be resolve before calling the office
preview script service. Currently there's no clean way to resolve a
reference relative to a given document in velocity so I would have to
use groovy which raises programming rights issue. Alternative we can
extend the
http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-model/src/main…
.
There's nothing to customize so the power of wiki macros wouldn't be
used. You can create a wiki macro that wraps the office preview macro
and add decorations specific to your needs.
One the other hand, the advantages of a Java macro are not significant
either because the macro is just a simple wrapper for the office preview
script service.
WDYT?
Thanks,
Marius
Hi devs,
I'd like to rename the office-preview module to office-viewer since it
better matches the current provided functionality: view office
attachments (either inside a wiki page or standalone) without
downloading them.
Let me know if you are against this rename.
Thanks,
Marius
As planned i just pre-released XE/XEM 2.4.3 on maven and subversion.
I'm now waiting for as many testers as possible to try and validate
that it does not contains important regression.
You can download XE/XEM on:
- XE jetty+hsqldb:
http://maven.xwiki.org/releases/com/xpn/xwiki/products/xwiki-enterprise-jet…
- XE war: http://maven.xwiki.org/releases/com/xpn/xwiki/products/xwiki-enterprise-web…
- XE xar: http://maven.xwiki.org/releases/com/xpn/xwiki/products/xwiki-enterprise-wik…
- XEM war: http://maven.xwiki.org/releases/com/xpn/xwiki/products/xwiki-enterprise-man…
- XEM xar: http://maven.xwiki.org/releases/com/xpn/xwiki/products/xwiki-enterprise-man…
If nothing is found i will finish the release tomorrow morning (GMT).
Thanks
On Mon, Sep 27, 2010 at 09:34, Thomas Mortagne
<thomas.mortagne(a)xwiki.com> wrote:
> 5.5 for 2.4.3 and 1.5 for 2.4.2.1
>
> 2.4.3 it is. Starting now.
>
> On Fri, Sep 24, 2010 at 15:42, Thomas Mortagne
> <thomas.mortagne(a)xwiki.com> wrote:
>> Hi devs,
>>
>> 2.4 is a blessed branch, now the issue is that there is no parent
>> field anymore because XE has been release with the wrong version of
>> panels applications.
>>
>> This seems pretty blocker to me and deserve to be fixed ASAP, i can
>> see the following solutions:
>>
>> 1. complete new release of XE/XEM 2.4.3
>> 2. release of XE/XEM 2.4.2.1 with the existing core/web 2.4.2
>> 3. re-release XE 2.3.2
>>
>> 1: +1, probably the cleanest but if I don't have to release core i
>> would be more than glad...
>> 2: +0.5, probably the clean solutions that needs the less work IMO.
>> After all technically XE and core have different versions
>> 3: -1, it's already public and downloaded by some users
>>
>> Also whatever the chosen solution before announcing the release i will
>> as much people as possible to validate it.
>>
>> So WDYT ?
>>
>> --
>> Thomas Mortagne
>>
>
>
>
> --
> Thomas Mortagne
>
--
Thomas Mortagne
Hi devs,
I'd like to propose that we always go through Nexus staging from now on for our Main and Bugfix releases. The process would be:
1) Release to a staged repo (with the final version name)
2) Send a testing mail on devs and users lists to allow people to test the release. Note: we don't make the release avail on xwiki.org, just a mail is sent.
3) Wait for 48 hours
4) Promote the staged release to final and finish the release process (xwiki.org update, announcements, etc)
We could start with 2.5.
- Note 1: This means that in our release dates we should allow for 2 days more in order not to be late because of this.
- Note 2: This is not for milestones or RC. Just for final and bugfix releases.
WDYT?
Thanks
-Vincent
Hi devs,
We've been working on improving the editors (content, class, object),
and now I have some pretty important UI changes to commit, but not
everybody seems to agree with them, so I bring up a vote.
The whole improvements can be seen on
http://incubator.myxwiki.org/xwiki/bin/Improvements/ImprovedEdit
Here are the individual voted points:
0 Remove all panels in edit mode
1a Parent and title above the content in wiki/wysiwyg mode
1b The same style in edit mode as in view mode for the parent/title fields
1c AJAX Suggest for the parent field
2a New label for the content textarea ("Content")
2b List of included documents after the Content label
3a Syntax switcher in the top right corner of the content
3b Syntax help in the top right corner of the content
3c Syntax help and switcher only in the wiki editor
4 Better label for the version comment
5a Right float the Minor edit field
5b Put the Minor edit label after the checkbox
6 Move autosave in line with the submit buttons
7 Introduce new AJAX-powered Add Object
i) above the objects
ii) bellow the objects
8 Introduce new AJAX-powered Add Object from this class
i) at the top of the list of existing objects
ii) at the end of the list
9 Move the class switcher in the top right corner
9b Remove the class switcher
10 Introduce new AJAX-powered Add Property
i) at the top of the list of properties
ii) at the end of the list
I vote +1 for all of the above, except 9b (-0), and with options 7i),
8ii), and 10ii)
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
Hi devs,
2.4 is a blessed branch, now the issue is that there is no parent
field anymore because XE has been release with the wrong version of
panels applications.
This seems pretty blocker to me and deserve to be fixed ASAP, i can
see the following solutions:
1. complete new release of XE/XEM 2.4.3
2. release of XE/XEM 2.4.2.1 with the existing core/web 2.4.2
3. re-release XE 2.3.2
1: +1, probably the cleanest but if I don't have to release core i
would be more than glad...
2: +0.5, probably the clean solutions that needs the less work IMO.
After all technically XE and core have different versions
3: -1, it's already public and downloaded by some users
Also whatever the chosen solution before announcing the release i will
as much people as possible to validate it.
So WDYT ?
--
Thomas Mortagne