gatein SVN: r4655 - in portal/branches/wci: component/pc/src/main/java/org/exoplatform/portal/pc and 1 other directories.
by do-not-reply@jboss.org
Author: alain_defrance
Date: 2010-10-13 09:59:23 -0400 (Wed, 13 Oct 2010)
New Revision: 4655
Added:
portal/branches/wci/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java
Removed:
portal/branches/wci/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java
Modified:
portal/branches/wci/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
portal/branches/wci/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java
portal/branches/wci/pom.xml
Log:
merged from trunk 4654
Modified: portal/branches/wci/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
===================================================================
--- portal/branches/wci/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java 2010-10-13 13:49:59 UTC (rev 4654)
+++ portal/branches/wci/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java 2010-10-13 13:59:23 UTC (rev 4655)
@@ -159,4 +159,9 @@
portletApplicationRegistry.stop();
}
}
+
+ public PortletApplicationDeployer getPortletApplicationRegistry()
+ {
+ return portletApplicationRegistry;
+ }
}
Copied: portal/branches/wci/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java (from rev 4654, portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java)
===================================================================
--- portal/branches/wci/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java (rev 0)
+++ portal/branches/wci/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPConsumerStructureProvider.java 2010-10-13 13:59:23 UTC (rev 4655)
@@ -0,0 +1,214 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * 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.gatein.portal.wsrp;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.portal.mop.Described;
+import org.exoplatform.portal.pom.config.POMSession;
+import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.data.PageKey;
+import org.exoplatform.portal.pom.spi.wsrp.WSRP;
+import org.gatein.common.util.ParameterValidation;
+import org.gatein.mop.api.content.Customization;
+import org.gatein.mop.api.workspace.ObjectType;
+import org.gatein.mop.api.workspace.Page;
+import org.gatein.mop.api.workspace.Site;
+import org.gatein.mop.api.workspace.Workspace;
+import org.gatein.mop.api.workspace.ui.UIComponent;
+import org.gatein.mop.api.workspace.ui.UIContainer;
+import org.gatein.mop.api.workspace.ui.UIWindow;
+import org.gatein.pc.api.PortletContext;
+import org.gatein.pc.api.PortletStateType;
+import org.gatein.pc.api.StatefulPortletContext;
+import org.gatein.wsrp.api.context.ConsumerStructureProvider;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class MOPConsumerStructureProvider implements ConsumerStructureProvider
+{
+ private final POMSessionManager pomManager;
+ private Map<String, PageInfo> pageInfos;
+ private Map<String, String> windowIdToUUIDs;
+
+ public MOPConsumerStructureProvider(ExoContainer container)
+ {
+ pomManager = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ windowIdToUUIDs = new HashMap<String, String>();
+ }
+
+ public List<String> getPageIdentifiers()
+ {
+ if (pageInfos == null)
+ {
+ POMSession session = pomManager.getSession();
+ Workspace workspace = session.getWorkspace();
+ Collection<Site> sites = workspace.getSites(ObjectType.PORTAL_SITE);
+
+ pageInfos = new HashMap<String, PageInfo>();
+ for (Site site : sites)
+ {
+ Page page = site.getRootPage().getChild("pages");
+ if (page != null)
+ {
+ processPage(page, true);
+ }
+ }
+ }
+
+ LinkedList<String> identifiers = new LinkedList<String>(pageInfos.keySet());
+ Collections.sort(identifiers);
+ return identifiers;
+ }
+
+ private void processPage(Page page, boolean ignoreCurrent)
+ {
+ if (!ignoreCurrent)
+ {
+ Described described = page.adapt(Described.class);
+ PageInfo pageInfo = new PageInfo(page.getObjectId());
+ pageInfos.put(described.getName(), pageInfo);
+ UIContainer container = page.getRootComponent();
+ processContainer(container, pageInfo);
+ }
+
+ Collection<Page> children = page.getChildren();
+ if (ParameterValidation.existsAndIsNotEmpty(children))
+ {
+ for (Page child : children)
+ {
+ processPage(child, false);
+ }
+ }
+ }
+
+ public List<String> getWindowIdentifiersFor(String pageId)
+ {
+ PageInfo pageInfo = pageInfos.get(pageId);
+ ParameterValidation.throwIllegalArgExceptionIfNull(pageInfo, "PageInfo for " + pageId);
+
+ return pageInfo.getChildrenWindows();
+ }
+
+ private void processContainer(UIContainer container, PageInfo pageInfo)
+ {
+ List<UIComponent> components = container.getComponents();
+ for (UIComponent component : components)
+ {
+ ObjectType<? extends UIComponent> type = component.getObjectType();
+ if (ObjectType.WINDOW.equals(type))
+ {
+ Described described = component.adapt(Described.class);
+ String name = described.getName();
+ windowIdToUUIDs.put(name, component.getObjectId());
+ pageInfo.addWindow(name);
+ }
+ else if (ObjectType.CONTAINER.equals(type))
+ {
+ processContainer((UIContainer)component, pageInfo);
+ }
+ else
+ {
+ // ignore
+ }
+ }
+ }
+
+ public void assignPortletToWindow(PortletContext portletContext, String windowId, String pageId)
+ {
+ String uuid = windowIdToUUIDs.get(windowId);
+ ParameterValidation.throwIllegalArgExceptionIfNull(uuid, "UUID for " + windowId);
+
+ // get the window
+ POMSession session = pomManager.getSession();
+ UIWindow window = session.findObjectById(ObjectType.WINDOW, uuid);
+
+ // construct the new customization state
+ WSRP wsrp = new WSRP();
+ String portletId = portletContext.getId();
+ wsrp.setPortletId(portletId);
+ if (portletContext instanceof StatefulPortletContext)
+ {
+ StatefulPortletContext context = (StatefulPortletContext)portletContext;
+ if (PortletStateType.OPAQUE.equals(context.getType()))
+ {
+ wsrp.setState((byte[])context.getState());
+ }
+ else
+ {
+ throw new IllegalArgumentException("Don't know how to deal with state: " + context.getState());
+ }
+ }
+
+ // destroy existing customization as otherwise re-customizing will fail
+ Customization<?> customization = window.getCustomization();
+ customization.destroy();
+
+ // and re-customize
+ window.customize(WSRP.CONTENT_TYPE, portletId, wsrp);
+
+ // mark page for cache invalidation otherwise DataCache will use the previous customization id when trying to set
+ // the portlet state in UIPortlet.setState and will not find it resulting in an error
+ Page page = window.getPage();
+ session.scheduleForEviction(new PageKey("portal", page.getSite().getName(), page.getName()));
+
+ // save
+ session.close(true);
+ }
+
+ private static class PageInfo
+ {
+ private String uuid;
+ private List<String> childrenWindows;
+
+ private PageInfo(String uuid)
+ {
+ this.uuid = uuid;
+ childrenWindows = new LinkedList<String>();
+ }
+
+ public String getUUID()
+ {
+ return uuid;
+ }
+
+ public List<String> getChildrenWindows()
+ {
+ return childrenWindows;
+ }
+
+ public void addWindow(String windowName)
+ {
+ childrenWindows.add(windowName);
+ }
+ }
+}
Deleted: portal/branches/wci/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java
===================================================================
--- portal/branches/wci/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java 2010-10-13 13:49:59 UTC (rev 4654)
+++ portal/branches/wci/component/wsrp/src/main/java/org/gatein/portal/wsrp/MOPPortalStructureProvider.java 2010-10-13 13:59:23 UTC (rev 4655)
@@ -1,214 +0,0 @@
-/*
- * JBoss, a division of Red Hat
- * Copyright 2010, Red Hat Middleware, LLC, and individual
- * contributors as indicated by the @authors tag. See the
- * copyright.txt in the distribution for a full listing of
- * individual contributors.
- *
- * 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.gatein.portal.wsrp;
-
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.portal.mop.Described;
-import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.portal.pom.data.PageKey;
-import org.exoplatform.portal.pom.spi.wsrp.WSRP;
-import org.gatein.common.util.ParameterValidation;
-import org.gatein.mop.api.content.Customization;
-import org.gatein.mop.api.workspace.ObjectType;
-import org.gatein.mop.api.workspace.Page;
-import org.gatein.mop.api.workspace.Site;
-import org.gatein.mop.api.workspace.Workspace;
-import org.gatein.mop.api.workspace.ui.UIComponent;
-import org.gatein.mop.api.workspace.ui.UIContainer;
-import org.gatein.mop.api.workspace.ui.UIWindow;
-import org.gatein.pc.api.PortletContext;
-import org.gatein.pc.api.PortletStateType;
-import org.gatein.pc.api.StatefulPortletContext;
-import org.gatein.wsrp.api.context.ConsumerStructureProvider;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
- * @version $Revision$
- */
-public class MOPPortalStructureProvider implements ConsumerStructureProvider
-{
- private final POMSessionManager pomManager;
- private Map<String, PageInfo> pageInfos;
- private Map<String, String> windowIdToUUIDs;
-
- public MOPPortalStructureProvider(ExoContainer container)
- {
- pomManager = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
- windowIdToUUIDs = new HashMap<String, String>();
- }
-
- public List<String> getPageIdentifiers()
- {
- if (pageInfos == null)
- {
- POMSession session = pomManager.getSession();
- Workspace workspace = session.getWorkspace();
- Collection<Site> sites = workspace.getSites(ObjectType.PORTAL_SITE);
-
- pageInfos = new HashMap<String, PageInfo>();
- for (Site site : sites)
- {
- Page page = site.getRootPage().getChild("pages");
- if (page != null)
- {
- processPage(page, true);
- }
- }
- }
-
- LinkedList<String> identifiers = new LinkedList<String>(pageInfos.keySet());
- Collections.sort(identifiers);
- return identifiers;
- }
-
- private void processPage(Page page, boolean ignoreCurrent)
- {
- if (!ignoreCurrent)
- {
- Described described = page.adapt(Described.class);
- PageInfo pageInfo = new PageInfo(page.getObjectId());
- pageInfos.put(described.getName(), pageInfo);
- UIContainer container = page.getRootComponent();
- processContainer(container, pageInfo);
- }
-
- Collection<Page> children = page.getChildren();
- if (ParameterValidation.existsAndIsNotEmpty(children))
- {
- for (Page child : children)
- {
- processPage(child, false);
- }
- }
- }
-
- public List<String> getWindowIdentifiersFor(String pageId)
- {
- PageInfo pageInfo = pageInfos.get(pageId);
- ParameterValidation.throwIllegalArgExceptionIfNull(pageInfo, "PageInfo for " + pageId);
-
- return pageInfo.getChildrenWindows();
- }
-
- private void processContainer(UIContainer container, PageInfo pageInfo)
- {
- List<UIComponent> components = container.getComponents();
- for (UIComponent component : components)
- {
- ObjectType<? extends UIComponent> type = component.getObjectType();
- if (ObjectType.WINDOW.equals(type))
- {
- Described described = component.adapt(Described.class);
- String name = described.getName();
- windowIdToUUIDs.put(name, component.getObjectId());
- pageInfo.addWindow(name);
- }
- else if (ObjectType.CONTAINER.equals(type))
- {
- processContainer((UIContainer)component, pageInfo);
- }
- else
- {
- // ignore
- }
- }
- }
-
- public void assignPortletToWindow(PortletContext portletContext, String windowId, String pageId)
- {
- String uuid = windowIdToUUIDs.get(windowId);
- ParameterValidation.throwIllegalArgExceptionIfNull(uuid, "UUID for " + windowId);
-
- // get the window
- POMSession session = pomManager.getSession();
- UIWindow window = session.findObjectById(ObjectType.WINDOW, uuid);
-
- // construct the new customization state
- WSRP wsrp = new WSRP();
- String portletId = portletContext.getId();
- wsrp.setPortletId(portletId);
- if (portletContext instanceof StatefulPortletContext)
- {
- StatefulPortletContext context = (StatefulPortletContext)portletContext;
- if (PortletStateType.OPAQUE.equals(context.getType()))
- {
- wsrp.setState((byte[])context.getState());
- }
- else
- {
- throw new IllegalArgumentException("Don't know how to deal with state: " + context.getState());
- }
- }
-
- // destroy existing customization as otherwise re-customizing will fail
- Customization<?> customization = window.getCustomization();
- customization.destroy();
-
- // and re-customize
- window.customize(WSRP.CONTENT_TYPE, portletId, wsrp);
-
- // mark page for cache invalidation otherwise DataCache will use the previous customization id when trying to set
- // the portlet state in UIPortlet.setState and will not find it resulting in an error
- Page page = window.getPage();
- session.scheduleForEviction(new PageKey("portal", page.getSite().getName(), page.getName()));
-
- // save
- session.close(true);
- }
-
- private static class PageInfo
- {
- private String uuid;
- private List<String> childrenWindows;
-
- private PageInfo(String uuid)
- {
- this.uuid = uuid;
- childrenWindows = new LinkedList<String>();
- }
-
- public String getUUID()
- {
- return uuid;
- }
-
- public List<String> getChildrenWindows()
- {
- return childrenWindows;
- }
-
- public void addWindow(String windowName)
- {
- childrenWindows.add(windowName);
- }
- }
-}
Modified: portal/branches/wci/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java
===================================================================
--- portal/branches/wci/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java 2010-10-13 13:49:59 UTC (rev 4654)
+++ portal/branches/wci/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java 2010-10-13 13:59:23 UTC (rev 4655)
@@ -27,6 +27,7 @@
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.portal.pc.ExoKernelIntegration;
import org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator;
import org.exoplatform.services.listener.ListenerService;
import org.gatein.common.logging.Logger;
@@ -85,11 +86,12 @@
private ConsumerRegistry consumerRegistry;
private ExoContainer container;
+ private final ExoKernelIntegration exoKernelIntegration;
private final boolean bypass;
private static final String WSRP_ADMIN_GUI_CONTEXT_PATH = "/wsrp-admin-gui";
public WSRPServiceIntegration(ExoContainerContext context, InitParams params, ConfigurationManager configurationManager,
- org.exoplatform.portal.pc.ExoKernelIntegration pc, NodeHierarchyCreator nhc) throws Exception
+ ExoKernelIntegration pc, NodeHierarchyCreator nhc) throws Exception
{
// IMPORTANT: even though PC ExoKernelIntegration and NodeHierarchyCreator is not used anywhere in the code, it's still needed for pico
// to properly make sure that this service is started after the PC one. Yes, Pico is crap. :/
@@ -114,6 +116,8 @@
container = context.getContainer();
+ exoKernelIntegration = pc;
+
bypass = false;
}
else
@@ -124,6 +128,7 @@
producerConfigLocation = null;
consumersConfigLocation = null;
configurationIS = null;
+ exoKernelIntegration = null;
bypass = true;
}
}
@@ -212,6 +217,7 @@
producer.setPortletInvoker(wsrpPortletInvoker);
producer.setRegistrationManager(registrationManager);
producer.setConfigurationService(producerConfigurationService);
+ exoKernelIntegration.getPortletApplicationRegistry().addListener(producer);
producer.start();
}
@@ -238,7 +244,7 @@
// migration service
MigrationService migrationService = new JCRMigrationService(container);
- migrationService.setStructureProvider(new MOPPortalStructureProvider(container));
+ migrationService.setStructureProvider(new MOPConsumerStructureProvider(container));
consumerRegistry.setMigrationService(migrationService);
consumerRegistry.start();
Modified: portal/branches/wci/pom.xml
===================================================================
--- portal/branches/wci/pom.xml 2010-10-13 13:49:59 UTC (rev 4654)
+++ portal/branches/wci/pom.xml 2010-10-13 13:59:23 UTC (rev 4655)
@@ -48,7 +48,7 @@
<org.gatein.wci.version>2.1.0-Alpha01-SNAPSHOT</org.gatein.wci.version>
<org.gatein.pc.version>2.2.0-Beta05</org.gatein.pc.version>
<org.picketlink.idm>1.1.6.GA</org.picketlink.idm>
- <org.gatein.wsrp.version>2.0.0-Beta01</org.gatein.wsrp.version>
+ <org.gatein.wsrp.version>2.0.0-Beta02-SNAPSHOT</org.gatein.wsrp.version>
<org.gatein.mop.version>1.0.3-GA</org.gatein.mop.version>
<org.slf4j.version>1.5.6</org.slf4j.version>
<rhino.version>1.6R5</rhino.version>
14 years, 3 months
gatein SVN: r4654 - in portal/branches/wci: component/web/security/src/main/java/org/exoplatform/web/security/security and 1 other directories.
by do-not-reply@jboss.org
Author: alain_defrance
Date: 2010-10-13 09:49:59 -0400 (Wed, 13 Oct 2010)
New Revision: 4654
Added:
portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/security/TicketConfiguration.java
Modified:
portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java
portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java
portal/branches/wci/web/portal/src/main/webapp/WEB-INF/conf/common/autologin-configuration.xml
Log:
Some bugs fixed
Modified: portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java
===================================================================
--- portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java 2010-10-13 13:46:15 UTC (rev 4653)
+++ portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java 2010-10-13 13:49:59 UTC (rev 4654)
@@ -22,6 +22,7 @@
import org.exoplatform.container.web.AbstractHttpServlet;
import org.exoplatform.web.security.security.AbstractTokenService;
import org.exoplatform.web.security.security.CookieTokenService;
+import org.exoplatform.web.security.security.TicketConfiguration;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.wci.authentication.AuthenticationResult;
@@ -53,6 +54,10 @@
/** . */
public static final String COOKIE_NAME = "rememberme";
+ /** . */
+ public static final long LOGIN_VALIDITY =
+ 1000 * TicketConfiguration.getInstance(TicketConfiguration.class).getValidityTime();
+
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
@@ -106,7 +111,7 @@
{
// WCI authentication
AuthenticationResult result = DefaultServletContainerFactory.getInstance().getServletContainer()
- .login(req, resp, credentials.getUsername(), credentials.getPassword());
+ .login(req, resp, credentials.getUsername(), credentials.getPassword(), LOGIN_VALIDITY);
log.debug("Login initiated with credentials in session, performing authentication");
if (result instanceof GenericAuthenticationResult)
Modified: portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java
===================================================================
--- portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java 2010-10-13 13:46:15 UTC (rev 4653)
+++ portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java 2010-10-13 13:49:59 UTC (rev 4654)
@@ -25,10 +25,6 @@
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.common.text.FastURLEncoder;
-import org.gatein.wci.authentication.AuthenticationResult;
-import org.gatein.wci.authentication.GenericAuthenticationResult;
-import org.gatein.wci.authentication.ProgrammaticAuthenticationResult;
-import org.gatein.wci.impl.DefaultServletContainerFactory;
import org.gatein.wci.security.Credentials;
import javax.servlet.*;
@@ -64,7 +60,6 @@
String token = InitiateLoginServlet.getRememberMeTokenCookie(req);
if (token != null)
{
- String s = privateUri(req);
ExoContainer container = getContainer();
Object o =
@@ -72,25 +67,23 @@
token, false);
if (o instanceof Credentials)
{
- Credentials credentials = (Credentials) o;
- AuthenticationResult result = DefaultServletContainerFactory.getInstance().getServletContainer()
- .login(req, resp, credentials.getUsername(), credentials.getPassword());
- if (result instanceof GenericAuthenticationResult)
- {
- ((GenericAuthenticationResult) result).perform(req, resp);
- resp.sendRedirect(s);
- }
- else if (result instanceof ProgrammaticAuthenticationResult)
- {
- resp.sendRedirect(s);
- }
- return;
+ req.getSession().setAttribute(Credentials.CREDENTIALS, o);
+ resp.sendRedirect(resp.encodeRedirectURL(
+ loginUrl(
+ req.getContextPath(),
+ privateUri(req)
+ )
+ ));
+ resp.flushBuffer();
}
}
}
//
- chain.doFilter(req, resp);
+ if (!resp.isCommitted())
+ {
+ chain.doFilter(req, resp);
+ }
}
public void destroy()
@@ -122,4 +115,12 @@
}
return builder.toString();
}
+
+ private String loginUrl(String context, String initUrl)
+ {
+ return String.format(
+ "%s/login?initialURI=%s",
+ context, initUrl
+ );
+ }
}
Added: portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/security/TicketConfiguration.java
===================================================================
--- portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/security/TicketConfiguration.java (rev 0)
+++ portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/security/TicketConfiguration.java 2010-10-13 13:49:59 UTC (rev 4654)
@@ -0,0 +1,76 @@
+/*
+* Copyright (C) 2003-2009 eXo Platform SAS.
+*
+* 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.exoplatform.web.security.security;
+
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.management.annotations.Managed;
+import org.exoplatform.web.security.GateInToken;
+import org.gatein.wci.security.Credentials;
+import sun.reflect.generics.reflectiveObjects.NotImplementedException;
+
+/**
+ * This class is only used to get validity form configuration.
+ *
+ * @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
+ * @version $Revision$
+ */
+public class TicketConfiguration extends AbstractTokenService<GateInToken, String>
+{
+
+ public TicketConfiguration(InitParams initParams)
+ {
+ super(initParams);
+ }
+
+ @Override
+ public GateInToken getToken(String id)
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ public GateInToken deleteToken(String id)
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ public String[] getAllTokens()
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ protected String decodeKey(String stringKey)
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ public long size() throws Exception
+ {
+ throw new NotImplementedException();
+ }
+
+ public String createToken(Credentials credentials) throws IllegalArgumentException, NullPointerException
+ {
+ throw new NotImplementedException();
+ }
+}
Modified: portal/branches/wci/web/portal/src/main/webapp/WEB-INF/conf/common/autologin-configuration.xml
===================================================================
--- portal/branches/wci/web/portal/src/main/webapp/WEB-INF/conf/common/autologin-configuration.xml 2010-10-13 13:46:15 UTC (rev 4653)
+++ portal/branches/wci/web/portal/src/main/webapp/WEB-INF/conf/common/autologin-configuration.xml 2010-10-13 13:49:59 UTC (rev 4654)
@@ -39,18 +39,18 @@
</init-params>
</component>
- <!--<component>
- <key>org.exoplatform.web.security.security.TransientTokenService</key>
- <type>org.exoplatform.web.security.security.TransientTokenService</type>
+ <component>
+ <key>org.exoplatform.web.security.security.TicketConfiguration</key>
+ <type>org.exoplatform.web.security.security.TicketConfiguration</type>
<init-params>
<values-param>
<name>service.configuration</name>
- <value>memory-token</value>
+ <value>wci-ticket</value>
<value>1</value>
<value>MINUTE</value>
</values-param>
</init-params>
- </component>-->
+ </component>
<external-component-plugins>
<target-component>org.exoplatform.commons.chromattic.ChromatticManager</target-component>
14 years, 3 months
gatein SVN: r4653 - in components/wci/branches/adf: test/core/src/main/java/org/gatein/wci/container and 9 other directories.
by do-not-reply@jboss.org
Author: alain_defrance
Date: 2010-10-13 09:46:15 -0400 (Wed, 13 Oct 2010)
New Revision: 4653
Modified:
components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java
components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java
components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/spi/SPIAuthenticationTestCase.java
components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java
components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/ServletContainer.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/TicketService.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/security/WCILoginController.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/security/WCILoginModule.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/spi/ServletContainerContext.java
Log:
Some bugs fixed
Modified: components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java
===================================================================
--- components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java 2010-10-13 12:20:34 UTC (rev 4652)
+++ components/wci/branches/adf/jetty/src/main/java/org/gatein/wci/jetty/Jetty6ServletContainerContext.java 2010-10-13 13:46:15 UTC (rev 4653)
@@ -62,16 +62,18 @@
this.registration = null;
}
- public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password) {
- return GenericAuthentication.getInstance().login(userName, password, request, response);
+ public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password, long validity)
+ {
+ return GenericAuthentication.getInstance().login(userName, password, request, response, validity);
}
- public void logout(HttpServletRequest request, HttpServletResponse response) {
- GenericAuthentication.getInstance().logout(request, response);
+ public void logout(HttpServletRequest request, HttpServletResponse response)
+ {
+ GenericAuthentication.getInstance().logout(request, response);
}
- public void start()
+ public void start()
{
DefaultServletContainerFactory.registerContext(this);
Modified: components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java
===================================================================
--- components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java 2010-10-13 12:20:34 UTC (rev 4652)
+++ components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/container/ServletContainerContextImpl.java 2010-10-13 13:46:15 UTC (rev 4653)
@@ -61,7 +61,7 @@
this.registration = null;
}
- public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password)
+ public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password, long validity)
{
throw new UnsupportedOperationException();
}
Modified: components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/spi/SPIAuthenticationTestCase.java
===================================================================
--- components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/spi/SPIAuthenticationTestCase.java 2010-10-13 12:20:34 UTC (rev 4652)
+++ components/wci/branches/adf/test/core/src/main/java/org/gatein/wci/spi/SPIAuthenticationTestCase.java 2010-10-13 13:46:15 UTC (rev 4653)
@@ -30,6 +30,7 @@
import org.gatein.wci.authentication.GenericAuthentication;
import org.gatein.wci.authentication.GenericAuthenticationResult;
import org.gatein.wci.authentication.ProgrammaticAuthenticationResult;
+import org.gatein.wci.authentication.TicketService;
import org.gatein.wci.security.Credentials;
import org.gatein.wci.impl.DefaultServletContainerFactory;
import org.jboss.unit.Failure;
@@ -71,7 +72,7 @@
container = DefaultServletContainerFactory.getInstance().getServletContainer();
container.addAuthenticationListener(new TestListener(v));
assertEquals("", v.value);
- result = container.login(req, resp, username, password);
+ result = container.login(req, resp, username, password, TicketService.DEFAULT_VALIDITY);
assertNotNull(result);
if (result instanceof GenericAuthenticationResult)
{
@@ -79,16 +80,16 @@
// Test Ticket Service
Credentials srcCredentials = new Credentials(username, password);
String ticket = GenericAuthentication.TICKET_SERVICE.createTicket(srcCredentials);
- Credentials resultCredentials = GenericAuthentication.TICKET_SERVICE.validateToken(ticket, false);
+ Credentials resultCredentials = GenericAuthentication.TICKET_SERVICE.validateTicket(ticket, false);
assertEquals(srcCredentials.getUsername(), resultCredentials.getUsername());
assertEquals(srcCredentials.getPassword(), resultCredentials.getPassword());
- assertNotNull(GenericAuthentication.TICKET_SERVICE.validateToken(ticket, true));
- assertNull(GenericAuthentication.TICKET_SERVICE.validateToken(ticket, true));
+ assertNotNull(GenericAuthentication.TICKET_SERVICE.validateTicket(ticket, true));
+ assertNull(GenericAuthentication.TICKET_SERVICE.validateTicket(ticket, true));
// Test Generic login
GenericAuthenticationResult gResult = (GenericAuthenticationResult) result;
String t = gResult.getTicket();
- Credentials credentials = GenericAuthentication.TICKET_SERVICE.validateToken(t, true);
+ Credentials credentials = GenericAuthentication.TICKET_SERVICE.validateTicket(t, true);
assertNotNull(credentials);
assertEquals("", v.value);
gAuthentication.perform(req, resp);
Modified: components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java
===================================================================
--- components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java 2010-10-13 12:20:34 UTC (rev 4652)
+++ components/wci/branches/adf/tomcat6/src/main/java/org/gatein/wci/tomcat/TC6ServletContainerContext.java 2010-10-13 13:46:15 UTC (rev 4653)
@@ -99,9 +99,9 @@
this.registration = null;
}
- public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password)
+ public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password, long validity)
{
- return GenericAuthentication.getInstance().login(userName, password, request, response);
+ return GenericAuthentication.getInstance().login(userName, password, request, response, validity);
}
public void logout(HttpServletRequest request, HttpServletResponse response)
Modified: components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java
===================================================================
--- components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java 2010-10-13 12:20:34 UTC (rev 4652)
+++ components/wci/branches/adf/tomcat7/src/main/java/org/gatein/wci/tomcat/TC7ServletContainerContext.java 2010-10-13 13:46:15 UTC (rev 4653)
@@ -40,6 +40,7 @@
import org.gatein.wci.authentication.GenericAuthentication;
import org.gatein.wci.authentication.GenericAuthenticationResult;
import org.gatein.wci.authentication.ProgrammaticAuthenticationResult;
+import org.gatein.wci.authentication.TicketService;
import org.gatein.wci.command.CommandDispatcher;
import org.gatein.wci.impl.DefaultServletContainerFactory;
import org.gatein.wci.security.Credentials;
@@ -103,7 +104,7 @@
this.registration = null;
}
- public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password) throws ServletException
+ public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password, long validity) throws ServletException
{
try
{
@@ -113,6 +114,7 @@
{
try
{
+ GenericAuthentication.TICKET_SERVICE.setValidityMillis(TicketService.DEFAULT_VALIDITY);
String ticket = GenericAuthentication.TICKET_SERVICE.createTicket(new Credentials(userName, password));
String url = "j_security_check?j_username=" + userName + "&j_password=" + ticket;
url = response.encodeRedirectURL(url);
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/ServletContainer.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/ServletContainer.java 2010-10-13 12:20:34 UTC (rev 4652)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/ServletContainer.java 2010-10-13 13:46:15 UTC (rev 4653)
@@ -102,7 +102,7 @@
* @param userName the username which try to login
* @param password the password of the username
*/
- AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password) throws ServletException;
+ AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password, long validity) throws ServletException;
/**
* Authentication support.
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java 2010-10-13 12:20:34 UTC (rev 4652)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthentication.java 2010-10-13 13:46:15 UTC (rev 4653)
@@ -28,15 +28,16 @@
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
* @version $Revision$
*/
-public class GenericAuthentication //extends AbstractAuthentication
+public class GenericAuthentication
{
public static final TicketService TICKET_SERVICE = new TicketService();
private static final GenericAuthentication GENERIC_AUTHENTICATION = new GenericAuthentication();
private GenericAuthentication() {}
- public AuthenticationResult login(String login, String password, HttpServletRequest request, HttpServletResponse response)
+ public AuthenticationResult login(String login, String password, HttpServletRequest request, HttpServletResponse response, long validity)
{
+ TICKET_SERVICE.setValidityMillis(validity);
String ticket = TICKET_SERVICE.createTicket(new Credentials(login, password));
return new GenericAuthenticationResult(login, ticket);
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/TicketService.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/TicketService.java 2010-10-13 12:20:34 UTC (rev 4652)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/TicketService.java 2010-10-13 13:46:15 UTC (rev 4653)
@@ -30,8 +30,9 @@
*/
public class TicketService
{
-
- protected long validityMillis = 1000 * 60; // TODO : Init from confguration
+ public static final long DEFAULT_VALIDITY = 60 * 1000;
+
+ protected long validityMillis;
protected final ConcurrentHashMap<String, Ticket> tickets = new ConcurrentHashMap<String, Ticket>();
@@ -53,7 +54,7 @@
return tokenId;
}
- public Credentials validateToken(String stringKey, boolean remove)
+ public Credentials validateTicket(String stringKey, boolean remove)
{
if (stringKey == null)
{
@@ -94,7 +95,18 @@
return null;
}
- private String nextTicketId() {
- return "wci-ticket-" + random.nextInt();
+ private String nextTicketId()
+ {
+ return "wci-ticket-" + random.nextInt();
}
+
+ public long getValidityMillis()
+ {
+ return validityMillis;
+ }
+
+ public void setValidityMillis(long validityMillis)
+ {
+ this.validityMillis = validityMillis;
+ }
}
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java 2010-10-13 12:20:34 UTC (rev 4652)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java 2010-10-13 13:46:15 UTC (rev 4653)
@@ -99,9 +99,9 @@
}
/** . */
- public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password) throws ServletException
+ public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password, long validity) throws ServletException
{
- AuthenticationResult result = registration.context.login(request, response, userName, password);
+ AuthenticationResult result = registration.context.login(request, response, userName, password, validity);
//
if (!(result instanceof GenericAuthenticationResult))
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java 2010-10-13 12:20:34 UTC (rev 4652)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java 2010-10-13 13:46:15 UTC (rev 4653)
@@ -130,9 +130,9 @@
this.registration = null;
}
- public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password)
+ public AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password, long validity)
{
- return GenericAuthentication.getInstance().login(userName, password, request, response);
+ return GenericAuthentication.getInstance().login(userName, password, request, response, validity);
}
public void logout(HttpServletRequest request, HttpServletResponse response)
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/security/WCILoginController.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/security/WCILoginController.java 2010-10-13 12:20:34 UTC (rev 4652)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/security/WCILoginController.java 2010-10-13 13:46:15 UTC (rev 4653)
@@ -45,6 +45,12 @@
String username = req.getParameter("username");
String password = req.getParameter("password");
+ if (
+ req.getSession().getAttribute(Credentials.CREDENTIALS) != null
+ && username == null
+ && password == null
+ ) return;
+
//
if (username == null)
{
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/security/WCILoginModule.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/security/WCILoginModule.java 2010-10-13 12:20:34 UTC (rev 4652)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/security/WCILoginModule.java 2010-10-13 13:46:15 UTC (rev 4653)
@@ -62,7 +62,7 @@
callbackHandler.handle(callbacks);
String password = new String(((PasswordCallback)callbacks[1]).getPassword());
- Credentials credentials = GenericAuthentication.TICKET_SERVICE.validateToken(password, true);
+ Credentials credentials = GenericAuthentication.TICKET_SERVICE.validateTicket(password, true);
sharedState.put("javax.security.auth.login.name", credentials.getUsername());
sharedState.put("javax.security.auth.login.password", credentials.getPassword());
}
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/spi/ServletContainerContext.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/spi/ServletContainerContext.java 2010-10-13 12:20:34 UTC (rev 4652)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/spi/ServletContainerContext.java 2010-10-13 13:46:15 UTC (rev 4653)
@@ -82,7 +82,7 @@
* @param userName the username which try to login
* @param password the password of the username
*/
- AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password) throws ServletException;
+ AuthenticationResult login(HttpServletRequest request, HttpServletResponse response, String userName, String password, long validity) throws ServletException;
/**
* Authentication support.
14 years, 3 months
gatein SVN: r4652 - exo/portal/branches/3.1.5-PLF_REL/packaging/pkg.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-10-13 08:20:34 -0400 (Wed, 13 Oct 2010)
New Revision: 4652
Modified:
exo/portal/branches/3.1.5-PLF_REL/packaging/pkg/pom.xml
Log:
PLF-716 JBoss EAP distribution
Modified: exo/portal/branches/3.1.5-PLF_REL/packaging/pkg/pom.xml
===================================================================
--- exo/portal/branches/3.1.5-PLF_REL/packaging/pkg/pom.xml 2010-10-13 12:17:07 UTC (rev 4651)
+++ exo/portal/branches/3.1.5-PLF_REL/packaging/pkg/pom.xml 2010-10-13 12:20:34 UTC (rev 4652)
@@ -76,6 +76,11 @@
<version>3.1.5-PLF-SNAPSHOT</version>
<type>js</type>
</dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.server.jboss.patch-ear</artifactId>
+ <version>3.1.5-PLF-SNAPSHOT</version>
+ </dependency>
</dependencies>
<build>
@@ -126,6 +131,99 @@
</execution>
</executions>
</plugin>
+ <!-- JBoss-EAR packaging - not in a specific profile so hudson will generate the zip and publish it on maven repo -->
+ <!-- Ensure your environment is correctly setup -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jbossas-check-environment-ready</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireProperty>
+ <property>exo.projects.directory.dependencies</property>
+ <message>"You must define the property exo.projects.directory.dependencies to give the path to the directory where you store your applications servers"</message>
+ </requireProperty>
+ <requireProperty>
+ <property>exo.projects.app.jboss.version</property>
+ <message>"You must define the property exo.projects.app.jboss.version to give the name of the directory where is stored JBossAS"</message>
+ </requireProperty>
+ <requireFilesExist>
+ <files>
+ <file>${exo.projects.directory.dependencies}/${exo.projects.app.jboss.version}/</file>
+ </files>
+ <message>"The following JBossAS directory doesn't exist : ${exo.projects.directory.dependencies}/${{exo.projects.app.jboss.version}"</message>
+ </requireFilesExist>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- run exo buils -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jbossas-packaging</id>
+ <phase>package</phase>
+ <configuration>
+ <executable>java</executable>
+ <workingDirectory>${basedir}</workingDirectory>
+ <arguments>
+ <argument>-Dexo.package.home=${basedir}/target/packager</argument>
+ <argument>-Dexo.current.dir=${basedir}</argument>
+ <argument>-Dexo.base.dir=${exo.projects.directory.base}</argument>
+ <argument>-Dexo.conf.dir=${basedir}/target/packager-conf</argument>
+ <argument>-Dexo.working.dir=${gatein.working.dir}</argument>
+ <!--argument>-Dexo.src.dir=NONE</argument-->
+ <argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!-- to get the server ref install -->
+ <argument>-Dexo.m2.repos=file:${settings.localRepository},http://repository.exoplatform.org/public,https://repository.jboss.org</argument>
+ <argument>-Dclean.server=${exo.projects.app.jboss.version}</argument>
+ <argument>-Dexo.m2.home=${maven.home}</argument>
+ <argument>-Xms128m</argument>
+ <argument>-Xmx512m</argument>
+ <argument>-classpath</argument>
+ <argument>${basedir}/target/packager/lib/js.jar</argument>
+ <argument>org.mozilla.javascript.tools.shell.Main</argument>
+ <argument>${basedir}/target/packager/javascript/eXo/eXo.js</argument>
+ <argument>exobuild</argument>
+ <argument>--product=portal</argument>
+ <argument>--deploy=jbossear</argument>
+ </arguments>
+ </configuration>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jboss-ear-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/gatein-ear.xml</descriptor>
+ </descriptors>
+ <attach>true</attach>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- End of JBoss-EAR packaging -->
+
</plugins>
</build>
@@ -534,112 +632,5 @@
</plugins>
</build>
</profile>
-
-
-
-
-
-
-
- <profile>
- <id>pkg-jbossear</id>
- <build>
- <finalName>GateIn-${project.version}</finalName>
- <plugins>
- <!-- Ensure your environment is correctly setup -->
- <!--plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <executions>
- <execution>
- <id>jbossas-check-environment-ready</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireProperty>
- <property>exo.projects.directory.dependencies</property>
- <message>"You must define the property exo.projects.directory.dependencies to give the path to the directory where you store your applications servers"</message>
- </requireProperty>
- <requireProperty>
- <property>exo.projects.app.jboss.version</property>
- <message>"You must define the property exo.projects.app.jboss.version to give the name of the directory where is stored JBossAS"</message>
- </requireProperty>
- <requireFilesExist>
- <files>
- <file>${exo.projects.directory.dependencies}/${exo.projects.app.jboss.version}/</file>
- </files>
- <message>"The following JBossAS directory doesn't exist : ${exo.projects.directory.dependencies}/${{exo.projects.app.jboss.version}"</message>
- </requireFilesExist>
- </rules>
- <fail>true</fail>
- </configuration>
- </execution>
- </executions>
- </plugin-->
- <!-- run exo buils -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>jbossas-packaging</id>
- <phase>package</phase>
- <configuration>
- <executable>java</executable>
- <workingDirectory>${basedir}</workingDirectory>
- <arguments>
- <argument>-Dexo.package.home=${basedir}/target/packager</argument>
- <argument>-Dexo.current.dir=${basedir}</argument>
- <argument>-Dexo.base.dir=${exo.projects.directory.base}</argument>
- <argument>-Dexo.conf.dir=${basedir}/target/packager-conf</argument>
- <argument>-Dexo.working.dir=${gatein.working.dir}</argument>
- <!--argument>-Dexo.src.dir=NONE</argument-->
- <argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!-- to get the server ref install -->
- <argument>-Dexo.m2.repos=file:${settings.localRepository},http://maven2.exoplatform.org/rest/maven2,http://repository.jboss.org/maven2</argument>
- <argument>-Dclean.server=${exo.projects.app.jboss.version}</argument>
- <argument>-Dexo.m2.home=${maven.home}</argument>
- <argument>-Xms128m</argument>
- <argument>-Xmx512m</argument>
- <argument>-classpath</argument>
- <argument>${basedir}/target/packager/lib/js.jar</argument>
- <argument>org.mozilla.javascript.tools.shell.Main</argument>
- <argument>${basedir}/target/packager/javascript/eXo/eXo.js</argument>
- <argument>exobuild</argument>
- <argument>--product=portal</argument>
- <argument>--deploy=jbossear</argument>
- </arguments>
- </configuration>
- <goals>
- <goal>exec</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>jboss-ear-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <descriptors>
- <descriptor>src/main/assembly/gatein-ear.xml</descriptor>
- </descriptors>
- <attach>true</attach>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
-
</profiles>
</project>
14 years, 3 months
gatein SVN: r4651 - exo/portal/branches/3.1.x/packaging/pkg.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-10-13 08:17:07 -0400 (Wed, 13 Oct 2010)
New Revision: 4651
Modified:
exo/portal/branches/3.1.x/packaging/pkg/pom.xml
Log:
PLF-716 JBoss EAP distribution
Modified: exo/portal/branches/3.1.x/packaging/pkg/pom.xml
===================================================================
--- exo/portal/branches/3.1.x/packaging/pkg/pom.xml 2010-10-13 11:49:16 UTC (rev 4650)
+++ exo/portal/branches/3.1.x/packaging/pkg/pom.xml 2010-10-13 12:17:07 UTC (rev 4651)
@@ -76,6 +76,11 @@
<version>3.1.6-PLF-SNAPSHOT</version>
<type>js</type>
</dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.server.jboss.patch-ear</artifactId>
+ <version>3.1.5-PLF-SNAPSHOT</version>
+ </dependency>
</dependencies>
<build>
@@ -126,6 +131,99 @@
</execution>
</executions>
</plugin>
+ <!-- JBoss-EAR packaging - not in a specific profile so hudson will generate the zip and publish it on maven repo -->
+ <!-- Ensure your environment is correctly setup -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jbossas-check-environment-ready</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireProperty>
+ <property>exo.projects.directory.dependencies</property>
+ <message>"You must define the property exo.projects.directory.dependencies to give the path to the directory where you store your applications servers"</message>
+ </requireProperty>
+ <requireProperty>
+ <property>exo.projects.app.jboss.version</property>
+ <message>"You must define the property exo.projects.app.jboss.version to give the name of the directory where is stored JBossAS"</message>
+ </requireProperty>
+ <requireFilesExist>
+ <files>
+ <file>${exo.projects.directory.dependencies}/${exo.projects.app.jboss.version}/</file>
+ </files>
+ <message>"The following JBossAS directory doesn't exist : ${exo.projects.directory.dependencies}/${{exo.projects.app.jboss.version}"</message>
+ </requireFilesExist>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- run exo buils -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jbossas-packaging</id>
+ <phase>package</phase>
+ <configuration>
+ <executable>java</executable>
+ <workingDirectory>${basedir}</workingDirectory>
+ <arguments>
+ <argument>-Dexo.package.home=${basedir}/target/packager</argument>
+ <argument>-Dexo.current.dir=${basedir}</argument>
+ <argument>-Dexo.base.dir=${exo.projects.directory.base}</argument>
+ <argument>-Dexo.conf.dir=${basedir}/target/packager-conf</argument>
+ <argument>-Dexo.working.dir=${gatein.working.dir}</argument>
+ <!--argument>-Dexo.src.dir=NONE</argument-->
+ <argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!-- to get the server ref install -->
+ <argument>-Dexo.m2.repos=file:${settings.localRepository},http://repository.exoplatform.org/public,https://repository.jboss.org</argument>
+ <argument>-Dclean.server=${exo.projects.app.jboss.version}</argument>
+ <argument>-Dexo.m2.home=${maven.home}</argument>
+ <argument>-Xms128m</argument>
+ <argument>-Xmx512m</argument>
+ <argument>-classpath</argument>
+ <argument>${basedir}/target/packager/lib/js.jar</argument>
+ <argument>org.mozilla.javascript.tools.shell.Main</argument>
+ <argument>${basedir}/target/packager/javascript/eXo/eXo.js</argument>
+ <argument>exobuild</argument>
+ <argument>--product=portal</argument>
+ <argument>--deploy=jbossear</argument>
+ </arguments>
+ </configuration>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jboss-ear-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/gatein-ear.xml</descriptor>
+ </descriptors>
+ <attach>true</attach>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- End of JBoss-EAR packaging -->
+
</plugins>
</build>
@@ -534,112 +632,5 @@
</plugins>
</build>
</profile>
-
-
-
-
-
-
-
- <profile>
- <id>pkg-jbossear</id>
- <build>
- <finalName>GateIn-${project.version}</finalName>
- <plugins>
- <!-- Ensure your environment is correctly setup -->
- <!--plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <executions>
- <execution>
- <id>jbossas-check-environment-ready</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireProperty>
- <property>exo.projects.directory.dependencies</property>
- <message>"You must define the property exo.projects.directory.dependencies to give the path to the directory where you store your applications servers"</message>
- </requireProperty>
- <requireProperty>
- <property>exo.projects.app.jboss.version</property>
- <message>"You must define the property exo.projects.app.jboss.version to give the name of the directory where is stored JBossAS"</message>
- </requireProperty>
- <requireFilesExist>
- <files>
- <file>${exo.projects.directory.dependencies}/${exo.projects.app.jboss.version}/</file>
- </files>
- <message>"The following JBossAS directory doesn't exist : ${exo.projects.directory.dependencies}/${{exo.projects.app.jboss.version}"</message>
- </requireFilesExist>
- </rules>
- <fail>true</fail>
- </configuration>
- </execution>
- </executions>
- </plugin-->
- <!-- run exo buils -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>jbossas-packaging</id>
- <phase>package</phase>
- <configuration>
- <executable>java</executable>
- <workingDirectory>${basedir}</workingDirectory>
- <arguments>
- <argument>-Dexo.package.home=${basedir}/target/packager</argument>
- <argument>-Dexo.current.dir=${basedir}</argument>
- <argument>-Dexo.base.dir=${exo.projects.directory.base}</argument>
- <argument>-Dexo.conf.dir=${basedir}/target/packager-conf</argument>
- <argument>-Dexo.working.dir=${gatein.working.dir}</argument>
- <!--argument>-Dexo.src.dir=NONE</argument-->
- <argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!-- to get the server ref install -->
- <argument>-Dexo.m2.repos=file:${settings.localRepository},http://maven2.exoplatform.org/rest/maven2,http://repository.jboss.org/maven2</argument>
- <argument>-Dclean.server=${exo.projects.app.jboss.version}</argument>
- <argument>-Dexo.m2.home=${maven.home}</argument>
- <argument>-Xms128m</argument>
- <argument>-Xmx512m</argument>
- <argument>-classpath</argument>
- <argument>${basedir}/target/packager/lib/js.jar</argument>
- <argument>org.mozilla.javascript.tools.shell.Main</argument>
- <argument>${basedir}/target/packager/javascript/eXo/eXo.js</argument>
- <argument>exobuild</argument>
- <argument>--product=portal</argument>
- <argument>--deploy=jbossear</argument>
- </arguments>
- </configuration>
- <goals>
- <goal>exec</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <executions>
- <execution>
- <id>jboss-ear-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- <configuration>
- <descriptors>
- <descriptor>src/main/assembly/gatein-ear.xml</descriptor>
- </descriptors>
- <attach>true</attach>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
-
</profiles>
</project>
14 years, 3 months
gatein SVN: r4650 - in portal/branches/branch-GTNPORTAL-1537: webui/portal/src/main/java/org/exoplatform/portal/webui/application and 1 other directory.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-10-13 07:49:16 -0400 (Wed, 13 Oct 2010)
New Revision: 4650
Modified:
portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
Log:
GTNPORTAL-1523 Shouldnot display edit icon with gadgets which havennot gadget preferences
Modified: portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2010-10-13 08:46:49 UTC (rev 4649)
+++ portal/branches/branch-GTNPORTAL-1537/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2010-10-13 11:49:16 UTC (rev 4650)
@@ -39,8 +39,10 @@
<div class="<%=isMini ? "RestoreGadget": "MinimizeGadget";%> MinimizeAction IconControl"
onclick="eXo.gadget.UIGadget.minimizeGadget(this)" onmousedown="event.cancelBubble=true;" style="display:none;"
title="<%=isMini ? unminiTitle : miniTitle%>" miniTitle="$miniTitle" unminiTitle="$unminiTitle"><span></span></div>
- <div class="EditGadget IconControl" onclick="eXo.gadget.UIGadget.editGadget('$id')" onmousedown="event.cancelBubble=true;" title="<%=_ctx.appRes("UIGadget.tooltip.editGadget")%>"><span></span></div>
- <div class="GadgetDragHandleArea"><span></span></div>
+ <% if(uicomponent.isSettingUserPref()) { %>
+ <div class="EditGadget IconControl" onclick="eXo.gadget.UIGadget.editGadget('$id')" onmousedown="event.cancelBubble=true;" title="<%=_ctx.appRes("UIGadget.tooltip.editGadget")%>"><span></span></div>
+ <% } %>
+ <div class="GadgetDragHandleArea"><span></span></div>
<div class="GadgetTitle" style="display: none; float: none; width: auto; margin-right: 75px"><%= uicomponent.getApplicationName() %></div>
</div>
</div>
Modified: portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-10-13 08:46:49 UTC (rev 4649)
+++ portal/branches/branch-GTNPORTAL-1537/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-10-13 11:49:16 UTC (rev 4650)
@@ -38,6 +38,7 @@
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
import org.exoplatform.webui.exception.MessageException;
+import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -88,6 +89,16 @@
public static final String HOME_VIEW = "home";
public static final String CANVAS_VIEW = "canvas";
+
+ public static final String METADATA_GADGETS = "gadgets";
+
+ public static final String METADATA_USERPREFS = "userPrefs";
+
+ public static final String METADATA_USERPREFS_TYPE = "type";
+
+ public static final String METADATA_USERPREFS_TYPE_HIDDEN = "hidden";
+
+ public static final String METADATA_USERPREFS_TYPE_LIST = "list";
public String view = HOME_VIEW;
@@ -205,7 +216,7 @@
String strMetadata = GadgetUtil.fetchGagdetMetadata(getUrl());
metadata_ = new JSONObject(strMetadata);
}
- JSONObject obj = metadata_.getJSONArray("gadgets").getJSONObject(0);
+ JSONObject obj = metadata_.getJSONArray(METADATA_GADGETS).getJSONObject(0);
String token = GadgetUtil.createToken(this.getUrl(), new Random().nextLong());
obj.put("secureToken", token);
return metadata_.toString();
@@ -215,6 +226,39 @@
return null;
}
}
+ /**
+ * Check if content of gadget has <UserPref>? (Content is parsed from gadget specification in .xml file)
+ * @return boolean
+ */
+ public boolean isSettingUserPref()
+ {
+ try
+ {
+ if(metadata_ != null)
+ {
+ JSONObject obj = metadata_.getJSONArray(METADATA_GADGETS).getJSONObject(0);
+ JSONObject userPrefs = obj.getJSONObject(METADATA_USERPREFS);
+ JSONArray names = userPrefs.names();
+ int count = names.length();
+ if(count > 0)
+ {
+ for(int i = 0; i < count; i++)
+ {
+ JSONObject o = (JSONObject) userPrefs.get(names.get(i).toString());
+ if(!(o.get(METADATA_USERPREFS_TYPE).equals(METADATA_USERPREFS_TYPE_HIDDEN) ||
+ o.get(METADATA_USERPREFS_TYPE).equals(METADATA_USERPREFS_TYPE_LIST)))
+ return true;
+ }
+ return false;
+ }
+ }
+ return false;
+ }
+ catch (JSONException e)
+ {
+ return false;
+ }
+ }
@Override
public boolean isRendered()
14 years, 3 months
gatein SVN: r4649 - in portal/branches/branch-GTNPORTAL-1537: webui/core/src/main/java/org/exoplatform/webui/form and 1 other directory.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2010-10-13 04:46:49 -0400 (Wed, 13 Oct 2010)
New Revision: 4649
Modified:
portal/branches/branch-GTNPORTAL-1537/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js
portal/branches/branch-GTNPORTAL-1537/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java
Log:
GTNPORTAL-1509 Error with mini-calendar in Content Search form
Modified: portal/branches/branch-GTNPORTAL-1537/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js 2010-10-13 07:29:24 UTC (rev 4648)
+++ portal/branches/branch-GTNPORTAL-1537/web/eXoResources/src/main/webapp/javascript/eXo/webui/UICalendar.js 2010-10-13 08:46:49 UTC (rev 4649)
@@ -68,7 +68,7 @@
}
UICalendar.prototype.show = function() {
- document.onmousedown = new Function('eXo.webui.UICalendar.hide()') ;
+ document.onclick = new Function('eXo.webui.UICalendar.hide()') ;
var re = /^(\d{1,2}\/\d{1,2}\/\d{1,4})\s*(\s+\d{1,2}:\d{1,2}:\d{1,2})?$/i ;
this.selectedDate = new Date() ;
@@ -150,35 +150,27 @@
clndr.firstChild.style.top = -heightCal.offsetHeight + 'px';
}
- var drag = document.getElementById("BlockCaledar");
- var component = eXo.core.DOMUtil.findAncestorByClass(drag, "UICalendarComponent");
- var calendar = eXo.core.DOMUtil.findFirstChildByClass(drag, "div", "UICalendar");
- var innerWidth = drag.offsetWidth;
- drag.onmousedown = function(evt) {
- var event = evt || window.event;
- event.cancelBubble = true;
- drag.style.position = "absolute";
- if(eXo.core.Browser.isIE7()) drag.style.height = calendar.offsetHeight + "px";
- drag.style.width = innerWidth + "px";
- eXo.core.DragDrop.init(null, drag, component, event);
- }
-
- //
- var primary = eXo.core.DOMUtil.findAncestorById(this.dateField, "UIECMSearch");
- if (primary && eXo.core.Browser.isFF()) {
- calendar = clndr.firstChild;
- calendar.style.top = "0px";
- calendar.style.left = this.dateField.offsetLeft - this.dateField.offsetWidth - 32 + "px";
- }
+ eXo.webui.UICalendar.initDragDrop();
+
+ var drag = document.getElementById("BlockCaledar");
+ var calendar = eXo.core.DOMUtil.findFirstChildByClass(drag, "div", "UICalendar");
+ var primary = eXo.core.DOMUtil.findAncestorById(this.dateField, "UIECMSearch");
+ if (primary && eXo.core.Browser.isFF()) {
+ calendar = clndr.firstChild;
+ calendar.style.top = "0px";
+ calendar.style.left = this.dateField.offsetLeft - this.dateField.offsetWidth - 32 + "px";
+ }
}
UICalendar.prototype.hide = function() {
if (this.dateField) {
document.getElementById(this.calendarId).firstChild.style.display = 'none' ;
// this.dateField.parentNode.style.position = '' ;
+ this.dateField.blur();
this.dateField = null ;
}
- document.onmousedown = null ;
+ document.onclick = null ;
+ //document.onmousedown = null;
}
/* TODO: Move HTML code to a javascript template file (.jstmpl) */
@@ -188,7 +180,7 @@
var startDayOfWeek = this.getDayOfWeek(this.currentDate.getFullYear(), this.currentDate.getMonth() + 1, dayOfMonth) ;
var daysInMonth = this.getDaysInMonth(this.currentDate.getFullYear(), this.currentDate.getMonth()) ;
var clazz = null;
- var table = '<div id="BlockCaledar" class="BlockCalendar">' ;
+ var table = '<div id="BlockCaledar" class="BlockCalendar" onclick="event.cancelBubble = true">' ;
table += '<div class="UICalendar" onmousedown="event.cancelBubble = true">' ;
table += ' <table class="MonthYearBox">' ;
table += ' <tr>' ;
@@ -258,13 +250,41 @@
this.currentDate.setMonth(this.currentDate.getMonth() + change) ;
var clndr = document.getElementById(this.calendarId) ;
clndr.firstChild.lastChild.innerHTML = this.renderCalendar() ;
+
+ eXo.webui.UICalendar.initDragDrop();
}
+UICalendar.prototype.initDragDrop = function() {
+ var drag = document.getElementById("BlockCaledar");
+ var component = eXo.core.DOMUtil.findAncestorByClass(drag, "UICalendarComponent");
+ var calendar = eXo.core.DOMUtil.findFirstChildByClass(drag, "div", "UICalendar");
+ var innerWidth = drag.offsetWidth;
+
+ eXo.core.DragDrop2.init(drag, component);
+ component.onDragStart = function() {
+ if(eXo.core.Browser.isIE7()) drag.style.height = calendar.offsetHeight + "px";
+ drag.style.width = innerWidth + "px";
+ }
+
+// var calendar = eXo.core.DOMUtil.findFirstChildByClass(drag, "div", "UICalendar");
+// var innerWidth = drag.offsetWidth;
+// drag.onmousedown = function(evt) {
+// var event = evt || window.event;
+// event.cancelBubble = true;
+// drag.style.position = "absolute";
+// if(eXo.core.Browser.isIE7()) drag.style.height = calendar.offsetHeight + "px";
+// drag.style.width = innerWidth + "px";
+// eXo.core.DragDrop2.init(drag, component);
+// }
+}
+
UICalendar.prototype.changeYear = function(change) {
this.currentDate.setFullYear(this.currentDate.getFullYear() + change) ;
this.currentDay = 0 ;
var clndr = document.getElementById(this.calendarId) ;
clndr.firstChild.lastChild.innerHTML = this.renderCalendar() ;
+
+ eXo.webui.UICalendar.initDragDrop();
}
UICalendar.prototype.setDate = function(year, month, day) {
Modified: portal/branches/branch-GTNPORTAL-1537/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java 2010-10-13 07:29:24 UTC (rev 4648)
+++ portal/branches/branch-GTNPORTAL-1537/webui/core/src/main/java/org/exoplatform/webui/form/UIFormDateTimeInput.java 2010-10-13 08:46:49 UTC (rev 4649)
@@ -234,6 +234,6 @@
w.write(value_.toString());
w.write('\'');
}
- w.write(" onmousedown='event.cancelBubble = true' />");
+ w.write(" onclick='event.cancelBubble = true'/>");
}
}
14 years, 3 months
gatein SVN: r4648 - portal/branches/branch-GTNPORTAL-1537/web/eXoResources/src/main/webapp/javascript/eXo/webui.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-10-13 03:29:24 -0400 (Wed, 13 Oct 2010)
New Revision: 4648
Modified:
portal/branches/branch-GTNPORTAL-1537/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js
Log:
GTNPORTAL-1520 Dont show Add gadget icon after delete gadget in special case
Modified: portal/branches/branch-GTNPORTAL-1537/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js 2010-10-13 06:52:50 UTC (rev 4647)
+++ portal/branches/branch-GTNPORTAL-1537/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js 2010-10-13 07:29:24 UTC (rev 4648)
@@ -255,7 +255,7 @@
};
UIDashboard.prototype.onLoad = function(windowId, canEdit) {
- var portletWindow = document.getElementById(windowId);
+ var portletWindow = document.getElementById(windowId) ? document.getElementById(windowId) : document.getElementById("UIPortlet-" + windowId);
if(!portletWindow) return;
var DOMUtil = eXo.core.DOMUtil;
14 years, 3 months
gatein SVN: r4647 - in epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US: modules/Usage and 1 other directory.
by do-not-reply@jboss.org
Author: smumford
Date: 2010-10-13 02:52:50 -0400 (Wed, 13 Oct 2010)
New Revision: 4647
Added:
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/addlanguage.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/addlanguageform.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/addtranslationicon.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/availablelanguages.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/choosetargetnode.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/cloudicon.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/languagelist.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/languageuploadedfile.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/localisedcontents.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/multi-language.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/newlanguage.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/relationbutton.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/selectarticle.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/selectlanguage.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/symlinkmanager2.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/symlinkmanagersave.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/tagdelete.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/tageditform.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/tagform.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/taggingdocument.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/taglist.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/taglistiediticon.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/tagmanager.png
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/tagmanagericon.png
Modified:
epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/modules/Usage/SitesExplorer.xml
Log:
JBEPP-518: Further conversion
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/addlanguage.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/addlanguage.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/addlanguageform.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/addlanguageform.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/addtranslationicon.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/addtranslationicon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/availablelanguages.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/availablelanguages.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/choosetargetnode.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/choosetargetnode.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/cloudicon.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/cloudicon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/languagelist.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/languagelist.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/languageuploadedfile.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/languageuploadedfile.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/localisedcontents.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/localisedcontents.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/multi-language.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/multi-language.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/newlanguage.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/newlanguage.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/relationbutton.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/relationbutton.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/selectarticle.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/selectarticle.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/selectlanguage.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/selectlanguage.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/symlinkmanager2.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/symlinkmanager2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/symlinkmanagersave.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/symlinkmanagersave.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/tagdelete.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/tagdelete.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/tageditform.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/tageditform.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/tagform.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/tagform.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/taggingdocument.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/taggingdocument.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/taglist.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/taglist.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/taglistiediticon.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/taglistiediticon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/tagmanager.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/tagmanager.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/tagmanagericon.png
===================================================================
(Binary files differ)
Property changes on: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/images/tagmanagericon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/modules/Usage/SitesExplorer.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/modules/Usage/SitesExplorer.xml 2010-10-13 02:58:33 UTC (rev 4646)
+++ epp/docs/branches/EPP_5_1_Branch/Site_Publisher_User_Guide/en-US/modules/Usage/SitesExplorer.xml 2010-10-13 06:52:50 UTC (rev 4647)
@@ -4125,6 +4125,7 @@
</step>
</procedure>
</section>
+
<section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Edit_documents">
<title>Edit documents</title>
<para>
@@ -4181,6 +4182,7 @@
</step>
</procedure>
</section> <!--Close Section: 3.3.4.4.10. Edit documents -->
+
<section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Delete_documents">
<title>Delete documents</title>
<procedure>
@@ -4211,6 +4213,7 @@
</para>
</note>
</section> <!-- Close Section: 3.3.4.4.11 Delete Documents -->
+
<section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Cut_Copy_Paste_Documents" >
<title>Cut/Copy/Paste Documents</title>
<para>
@@ -4357,6 +4360,7 @@
</itemizedlist>
</note>
</section> <!-- Close Section: 3.3.4.4.12 Cut/Copy/Paste Documents -->
+
<section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Drag_and_drop_documents" >
<title>Drag and drop documents</title>
<para>
@@ -4381,6 +4385,7 @@
</step>
</procedure>
</section> <!-- Close Section:3.3.4.4.13 Drag and drop documents -->
+
<section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Lock_Unlock_documents" >
<title>Lock/Unlock documents</title>
<para>
@@ -4441,6 +4446,7 @@
</para>
</formalpara>
</section> <!-- Close Section: 3.3.4.4.14 Lock/Unlock documents -->
+
<section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Rename_documents" >
<title>Rename documents</title>
<para>
@@ -4493,6 +4499,7 @@
</itemizedlist>
</note>
</section> <!-- Close Section: 3.3.4.4.15 Rename documents -->
+
<section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Add_symlink" >
<title>Add symlink</title>
<para>
@@ -4517,6 +4524,7 @@
</step>
</procedure>
</section> <!-- Close Section: 3.3.4.4.16 Add symlink -->
+
<section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-View_WebDAV">
<title>View WebDAV</title>
<para>
@@ -4584,6 +4592,7 @@
</para>
</note>
</section> <!-- Close Section: 3.3.4.4.17 View WebDAV -->
+
<section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Add_to_favorites" >
<title>Add to favorites</title>
<para>
@@ -4606,6 +4615,7 @@
A symlink of your favorite nodes (folders, documents, files) will be created in the <emphasis role="bold">Favorite</emphasis> folder.
</para>
</section> <!-- Close Section: 3.3.4.4.18 Add to favorites -->
+
<section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Watch_Unwatch_documents">
<title>Watch/Unwatch documents</title>
<para>
@@ -4651,7 +4661,506 @@
<para>
A message will appeared confirming the action.
</para>
- </section> <!-- Close Section: 33.4.4.19 Watch/Unwatch documents -->
+ </section> <!-- Close Section: 3.3.4.4.19 Watch/Unwatch documents -->
+
+ <section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Add_tags_to_documents">
+ <title>Add tags to documents</title>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Select a document that you want to add tags.
+ </para>
+ </step>
+ <step>
+ <para>
+ Chose the <emphasis role="bold">Collaboration</emphasis> tab then click <inlinemediaobject><imageobject><imagedata fileref="images/taggingdocument.png"/></imageobject></inlinemediaobject> on the Action bar. The <emphasis role="bold">Tag Manager</emphasis> will be displayed:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/tagmanager.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/tagmanager.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ <table>
+ <title></title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ Fields
+ </entry>
+ <entry>
+ Details
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ Tag names
+ </entry>
+ <entry>
+ The tag names that users want to add tags for documents.
+ </entry>
+ </row>
+ <row>
+ <entry>
+ Tag Scopes
+ </entry>
+ <entry>
+ To classify tags. There are four tag types: private, public, group, site. Currently, the two first types are activated(Private: a user who create tags can view and edit tags; public: all users can view and edit tags).
+ </entry>
+ </row>
+ <row>
+ <entry>
+ Linked tags
+ </entry>
+ <entry>
+ To list all tags of a document after you click the Add Tags button.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </step>
+ <step>
+ <para>
+ Input a value for the <emphasis role="bold">Tag names</emphasis> field. A document can be added several tags at a time. To do that, input all tag names in the <emphasis role="bold">Tag names</emphasis> field and separate by “,”.
+ </para>
+ </step>
+ <step>
+ <para>
+ Select a value for the <emphasis role="bold">Tag Scopes</emphasis> field.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click <emphasis role="bold">Add Tags</emphasis> to accept, or Close to quit. Only you can see this tag in this document.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click the <inlinemediaobject><imageobject><imagedata fileref="images/trashicon.png"/></imageobject></inlinemediaobject> to delete tags.
+ </para>
+ </step>
+ </procedure>
+ <note>
+ <title>Tagging Notes </title>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ A tag name can not contain some special characters, including: ! @ $ % * [ ] ' : \ /
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ You can add multiple tags to the same documents.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ You can add multiple documents to the same named tag.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ All tags of a document will be listed in <emphasis role="bold">Linked tags</emphasis>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ When you add a tag for a document, anyone can select that tag so anyone can see your document but they only can take actions on it if they have the permission.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </note>
+ </section> <!-- Close Section: 3.3.4.4.20 Add tags to documents -->
+
+ <section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Use_Created_tags">
+ <title>Use Created tags</title>
+ <para>
+ Select the Tag cloud <inlinemediaobject><imageobject><imagedata fileref="images/cloudicon.png"/></imageobject></inlinemediaobject> you will see all existing tags: All existing tags are listed and classified by private or public tags.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/taglist.png" format="PNG" align="center" scale="60" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/taglist.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ <para>
+ Tags will be displayed differently depending on popularity. The font size, weight, color, family and text-decoration will be used to visuall communicate popularity.
+ </para>
+ <para>
+ For example, tags added to over ten documents will be displayed in red, at 20px and bold. These settings can be configured in WCM Administration portlet.
+ </para>
+ <para>
+ Each tag is also link to all documents with the same tag. Click a tag name to see these documents listed in the right panel.
+ </para>
+ </section> <!-- Close Section: 3.3.4.4.21 Use Created tags -->
+
+ <section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Manage_tags">
+ <title>Manage Tags</title>
+ <para>
+ Tags are easily managed by editing or deleting them with the <emphasis role="bold">Tag Manager</emphasis>.
+ </para>
+ <procedure>
+ <title>Edit a tag</title>
+ <step>
+ <para>
+ Click the <inlinemediaobject><imageobject><imagedata fileref="images/cloudicon.png"/></imageobject></inlinemediaobject> icon at the upper-right corner of the tags panel.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/taglistiediticon.png" format="PNG" align="center" scale="60" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/taglistiediticon.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ <para>
+ The <emphasis role="bold">Edit tag form</emphasis> will appear:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/tageditform.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/tageditform.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ Click the <inlinemediaobject><imageobject><imagedata fileref="images/editicon4.png"/></imageobject></inlinemediaobject> that corresponds to the tag you want to edit.
+ </para>
+ </step>
+ <step>
+ <para>
+ Edit the tag as desired.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/tagform.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/tagform.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ Click <emphasis role="bold">Save</emphasis> button to commit the change or <emphasis role="bold">Cancel</emphasis> to quit without changes.
+ </para>
+ </step>
+ </procedure>
+ <procedure>
+ <title>Delete a tag</title>
+ <step>
+ <para>
+ Perform <emphasis role="bold">Step 1</emphasis> from the procedure above.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click the <inlinemediaobject><imageobject><imagedata fileref="images/trashicon.png"/></imageobject></inlinemediaobject>.
+ </para>
+ <para>
+ A confirmation box will appear:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/tagdelete.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/tagdelete.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ <para>
+ Click <emphasis role="bold">OK</emphasis> button to delete the tag or <emphasis role="bold">Cancel</emphasis> to quit.
+ </para>
+ </step>
+ </procedure>
+ </section> <!-- Close Section: 3.3.4.4.22 Manage Tags -->
+
+ <section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Add_language_for_a_document">
+ <title>Add a language for a document</title>
+ <para>
+ This function is used to support users to add multiple languages for a document. Each document can be displayed in many languages.
+ </para>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Select a document that you want to add language(s).
+ </para>
+ </step>
+ <step>
+ <para>
+ Select the <emphasis role="bold">Collaboration</emphasis> tab to show some advanced actions on the Action bar.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click <inlinemediaobject><imageobject><imagedata fileref="images/localisedcontents.png"/></imageobject></inlinemediaobject> on the <emphasis role="bold">Action</emphasis> bar.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/addlanguage.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/addlanguage.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ <para>
+ The <emphasis role="bold">Multi-language</emphasis> form will appear.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/multi-language.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/multi-language.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ <para>
+ The <emphasis role="bold">View language</emphasis> tab contains a list of all languages. The default language for the document will be automatically populated.
+ </para>
+ </step>
+ <step>
+ <para>
+ Select the <emphasis role="bold">Add language</emphasis> tab. This tab will be displayed differently, depending on what file you selected. However, the area where you can add languages for document is the same. The below illustration shows the <emphasis role="bold">Add language</emphasis> tab for a <emphasis role="bold">Sample node</emphasis> file:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/addlanguageform.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/addlanguageform.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ Select a language you want to add from the <emphasis role="bold">Language</emphasis> drop-down list.
+ </para>
+ <para>
+ If the selected language has not been added for current document, the content field will be blank.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/selectlanguage.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/selectlanguage.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ <para>
+ Select the <emphasis role="bold">Set default</emphasis> checkbox if you want to set your selected language as default language.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click <emphasis role="bold">Save</emphasis>, you will be returned to the <emphasis role="bold">View language</emphasis>tab. Your selected language is now added to the <emphasis role="bold">Language</emphasis> field:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/newlanguage.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/newlanguage.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ <para>
+ You can view this document in new added language by selecting the language from the language drop-down list then click the <emphasis role="bold">View </emphasis> button.
+ </para>
+ </step>
+ </procedure>
+ <para>
+ To view the languages list of a document, do the following:
+ </para>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Select a document that you want to view the language list then click the <emphasis role="bold">Relation</emphasis> button on side panel:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/relationbutton.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/relationbutton.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ The list of language (and all related documents) will be displayed on the left panel:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/languagelist.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/languagelist.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ <para>
+ You can view the document in the new language by clicking the corresponding link in <emphasis role="bold">Languages List</emphasis>.
+ </para>
+ <para>
+ For more details about <emphasis role="bold">Relations</emphasis>, refer to xref="" (View Relations of nodes)
+ </para>
+ </step>
+ </procedure>
+ <note>
+ <title>Language Notes</title>
+ <para>
+ You cannot add multiple languages for a <emphasis role="bold">File Plan</emphasis>.
+ </para>
+ <para>
+ When a document is a sub-node of <emphasis role="bold">File Plan</emphasis>, you also cannot add language to it.
+ </para>
+ </note>
+ </section> <!-- Close Section: 3.3.4.4.23 Add a language for a document -->
+
+ <section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Add_translations_to_a_document">
+ <title>Add translations to a document</title>
+ <para>
+ This function allows users to add multiple languages for a document. This action is similar to adding a language.
+ </para>
+ <para>
+ By default, the <emphasis role="bold">Add translation</emphasis> button is not displayed on the toolbar.
+ </para>
+ <para>
+ Enable this function by navigating to <emphasis role="bold">Sites Administration</emphasis>, then <emphasis role="bold">Content Presentation</emphasis>, then <emphasis role="bold">Manage Views</emphasis>.
+ </para>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Select the document you want to add the translation for. For example; select an <emphasis role="bold">Article</emphasis> which is in <emphasis>English</emphasis>:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/selectarticle.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/selectarticle.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ Click <inlinemediaobject><imageobject><imagedata fileref="images/addtranslationicon.png"/></imageobject></inlinemediaobject> in the <emphasis role="bold">Action</emphasis> bar. The <emphasis role="bold">Symlink Manager</emphasis> will appear:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/symlinkmanager2.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/symlinkmanager2.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ Click <inlinemediaobject><imageobject><imagedata fileref="images/addplusicon.png"/></imageobject></inlinemediaobject>, then browse to the target document that has different language with the first document. For example, the <emphasis role="bold">Article</emphasis> version in French.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/choosetargetnode.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/choosetargetnode.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ After you have selected the document, click <emphasis role="bold">Save</emphasis> on the <emphasis role="bold">Symlink Manager</emphasis> form:
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/symlinkmanagersave.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/symlinkmanagersave.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ Select the document which you have added the translation to, then click the <emphasis role="bold">Relation</emphasis> button on the sidebar.
+ </para>
+ <para>
+ You will see the available language for the selected document. Click the language on this panel to view the document in the corresponding language version.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/availablelanguages.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/availablelanguages.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ </procedure>
+ </section> <!-- Close Section: 3.3.4.4.24 Add translations to a document -->
+
+ <section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Add_a_language_for_an_uploaded_document">
+ <title>Add a language for an uploaded document</title>
+ <important>
+ <title>DOC NOTE</title>
+ <para>
+ This section is not very informative. Fill it out during further edits.
+ </para>
+ </important>
+ <para>
+ To add a language to an uploaded file, do the following:
+ </para>
+ <procedure>
+ <title></title>
+ <step>
+ <para>
+ Click <emphasis role="bold">Browse</emphasis> to select a file from your computer, then click the upload <inlinemediaobject><imageobject><imagedata fileref="images/uploadicon.png"/></imageobject></inlinemediaobject> icon.
+ </para>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata fileref="images/languageuploadedfile.png" format="PNG" align="center" scale="" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/languageuploadedfile.png" format="PNG" align="center" contentwidth="150mm" />
+ </imageobject>
+ </mediaobject>
+ </step>
+ <step>
+ <para>
+ Input a value in the <emphasis role="bold">Name</emphasis> field if you want to change the display name of the uploaded file.
+ </para>
+ </step>
+ <step>
+ <para>
+ Click <emphasis role="bold">Save</emphasis> to commit the values.
+ </para>
+ </step>
+ </procedure>
+ </section> <!-- Close Section: 3.3.4.4.25 Add a language for an uploaded document -->
+
+ <section id="sect-Site_Publisher_User_Guide-Manage_Documents_in_Sites_Explorer-Vote_for_documents">
+ <title>Vote for documents</title>
+ <para>
+
+ </para>
+
+ </section> <!-- Close Section: 3.3.4.4.26 Vote for documents -->
</section> <!--Close Section: 3.3.4.4. Manage Documents in Sites Explorer-->
</section> <!--Close Section: 3.3.4 Actions in Sites Explorer-->
14 years, 3 months
gatein SVN: r4646 - in portal/branches/branch-GTNPORTAL-1537/portlet/dashboard/src/main: webapp/groovy/gadget/webui/component and 1 other directory.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-10-12 22:58:33 -0400 (Tue, 12 Oct 2010)
New Revision: 4646
Modified:
portal/branches/branch-GTNPORTAL-1537/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java
portal/branches/branch-GTNPORTAL-1537/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl
Log:
GTNPORTAL-1497 Misleading error message when Gadget does not exist
Modified: portal/branches/branch-GTNPORTAL-1537/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java 2010-10-13 01:41:23 UTC (rev 4645)
+++ portal/branches/branch-GTNPORTAL-1537/portlet/dashboard/src/main/java/org/exoplatform/gadget/webui/component/UIGadgetPortlet.java 2010-10-13 02:58:33 UTC (rev 4646)
@@ -75,6 +75,14 @@
{
return GadgetUtil.reproduceUrl(gadget.getUrl(), gadget.isLocal());
}
+ else
+ {
+ if (log.isWarnEnabled())
+ {
+ log.warn("The local gadget '" + gadgetName + "' was not found, nothing rendered");
+ }
+ return null;
+ }
}
catch (Exception e)
{
@@ -94,6 +102,11 @@
uiApplication.addMessage(new ApplicationMessage("UIGadgetPortlet.msg.url-invalid", null));
}
+ return getMetadata(url);
+ }
+
+ public String getMetadata(String url)
+ {
String metadata_ = GadgetUtil.fetchGagdetMetadata(url);
try
{
Modified: portal/branches/branch-GTNPORTAL-1537/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1537/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl 2010-10-13 01:41:23 UTC (rev 4645)
+++ portal/branches/branch-GTNPORTAL-1537/portlet/dashboard/src/main/webapp/groovy/gadget/webui/component/UIGadgetViewMode.gtmpl 2010-10-13 02:58:33 UTC (rev 4646)
@@ -5,19 +5,23 @@
import org.exoplatform.webui.application.portlet.PortletRequestContext;
def hostName = GadgetUtil.getRelGadgetServerUrl();
- def rcontext = _ctx.getRequestContext() ;
- def windowId = rcontext.getWindowId();
- def id = uicomponent.getId() + "-" + windowId ;
- def url = uicomponent.getParent().getUrl();
- def metadata = uicomponent.getParent().getMetadata();
- def userPref = null;//uicomponent.getUserPref() ;
- JavascriptManager jsmanager = rcontext.getJavascriptManager();
- jsmanager.importJavascript("eXo.gadget.UIGadget") ;
- jsmanager.addCustomizedOnLoadScript("eXo.gadget.UIGadget.createGadget('$url','$id', $metadata, $userPref, 'canvas', '$hostName');") ;
- java.util.Map<String, String> metadataMap = GadgetUtil.getMapMetadata(url) ;
- String height = "auto" ;
- if(metadataMap.containsKey("height") && Integer.parseInt(metadataMap.get("height")) > 0)
- height = (Integer.parseInt(metadataMap.get("height")) + 10) + "px" ;
+ def rcontext = _ctx.getRequestContext() ;
+ def windowId = rcontext.getWindowId();
+ def id = uicomponent.getId() + "-" + windowId ;
+ def url = uicomponent.getParent().getUrl();
+ def height = "auto" ;
+
+ if(url != null) {
+ def metadata = uicomponent.getParent().getMetadata(url);
+ def userPref = null;
+ JavascriptManager jsmanager = rcontext.getJavascriptManager();
+ jsmanager.importJavascript("eXo.gadget.UIGadget") ;
+ jsmanager.addCustomizedOnLoadScript("eXo.gadget.UIGadget.createGadget('$url','$id', $metadata, $userPref, 'canvas', '$hostName');") ;
+ java.util.Map<String, String> metadataMap = GadgetUtil.getMapMetadata(url) ;
+
+ if(metadataMap.containsKey("height") && Integer.parseInt(metadataMap.get("height")) > 0)
+ height = (Integer.parseInt(metadataMap.get("height")) + 10) + "px" ;
+ }
%>
<div class="UIGadgetViewMode" id="$id" style="height: <%=height%>;"></div>
14 years, 3 months