[gatein-commits] gatein SVN: r7159 - in portal/trunk: component and 14 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Aug 16 10:52:04 EDT 2011
Author: julien_viet
Date: 2011-08-16 10:52:03 -0400 (Tue, 16 Aug 2011)
New Revision: 7159
Removed:
portal/trunk/component/api-impl/
portal/trunk/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/ContentRegistryPortlet.java
portal/trunk/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/api/
Modified:
portal/trunk/
portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/ApplicationRegistryService.java
portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
portal/trunk/component/pc/pom.xml
portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoPortletApplicationDeployer.java
portal/trunk/component/pom.xml
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java
portal/trunk/examples/portlets/api/pom.xml
portal/trunk/examples/portlets/api/src/main/webapp/WEB-INF/portlet.xml
portal/trunk/packaging/jboss-as5/pkg/pom.xml
portal/trunk/packaging/jboss-as6/pkg/pom.xml
portal/trunk/packaging/jetty/pkg/pom.xml
portal/trunk/packaging/tomcat/pkg/pom.xml
portal/trunk/pom.xml
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/configuration.xml
Log:
rollback API change
Property changes on: portal/trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_Branch:6841
/portal/branches/api:6849-7030
/portal/branches/branch-GTNPORTAL-1790:5864-5919
/portal/branches/branch-GTNPORTAL-1822:5938-5991
/portal/branches/branch-GTNPORTAL-1832:5993-6105
/portal/branches/branch-GTNPORTAL-1872:6327-6594
/portal/branches/branch-GTNPORTAL-1921:6597-6803
/portal/branches/branch-GTNPORTAL-1963:6902-6986
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/branches/wsrp-extraction:5828-6031
+ /epp/portal/branches/EPP_5_1_Branch:6841
/portal/branches/branch-GTNPORTAL-1790:5864-5919
/portal/branches/branch-GTNPORTAL-1822:5938-5991
/portal/branches/branch-GTNPORTAL-1832:5993-6105
/portal/branches/branch-GTNPORTAL-1872:6327-6594
/portal/branches/branch-GTNPORTAL-1921:6597-6803
/portal/branches/branch-GTNPORTAL-1963:6902-6986
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/branches/wsrp-extraction:5828-6031
Modified: portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/ApplicationRegistryService.java
===================================================================
--- portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/ApplicationRegistryService.java 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/ApplicationRegistryService.java 2011-08-16 14:52:03 UTC (rev 7159)
@@ -21,7 +21,6 @@
import org.exoplatform.container.component.ComponentPlugin;
import org.exoplatform.portal.config.model.ApplicationType;
-import org.gatein.mop.api.content.ContentType;
import java.util.Comparator;
import java.util.List;
@@ -32,21 +31,21 @@
String REMOTE_DISPLAY_NAME_SUFFIX = " (remote)";
/**
- * Return list of ApplicationCatgory (and applications in each category)
- *
+ * Return list of ApplicationCatgory (and applications in each category)
* @param accessUser
- * @param appTypes - array of ApplicationType, used to filter applications in each application category
- */
+ * @param appTypes - array of ApplicationType, used to filter applications in each application category
+ */
public List<ApplicationCategory> getApplicationCategories(String accessUser, ApplicationType<?>... appTypes) throws Exception;
public void initListener(ComponentPlugin com) throws Exception;
- /** Return list of all current application categories (unsorted, all Application in all ApplicationType) */
+ /**
+ * Return list of all current application categories (unsorted, all Application in all ApplicationType)
+ */
public List<ApplicationCategory> getApplicationCategories() throws Exception;
/**
* Return list of all current application categories (sorted, all applications in all types)
- *
* @param sortComparator - Comparator used to sort the returned list
*/
public List<ApplicationCategory> getApplicationCategories(Comparator<ApplicationCategory> sortComparator)
@@ -55,7 +54,6 @@
/**
* Return ApplicationCategory with name provided <br/>
* if not found, return null
- *
* @param name - ApplicationCategory's name
*/
public ApplicationCategory getApplicationCategory(String name) throws Exception;
@@ -63,7 +61,6 @@
/**
* Save an ApplicationCategory to database <br/>
* If it doesn't exist, a new one will be created, if not, it will be updated
- *
* @param category - ApplicationCategory object that will be saved
*/
public void save(ApplicationCategory category) throws Exception;
@@ -71,14 +68,12 @@
/**
* Remove application category (and all application in it) from database <br/>
* If it doesn't exist, it will be ignored
- *
* @param category - ApplicationCategory object that will be removed
*/
public void remove(ApplicationCategory category) throws Exception;
/**
* Return list of applications (unsorted) in specific category and have specific type
- *
* @param category - ApplicationCategory that you want to list applications
* @param appTypes - array of application type
*/
@@ -86,14 +81,12 @@
/**
* Return list of applications (sorted) in specific category and have specific type
- *
- * @param category - ApplicationCategory that you want to list applications
+ * @param category - ApplicationCategory that you want to list applications
* @param sortComparator - comparator used to sort application list
- * @param appTypes - array of application type
+ * @param appTypes - array of application type
*/
public List<Application> getApplications(ApplicationCategory category, Comparator<Application> sortComparator,
ApplicationType<?>... appTypes) throws Exception;
-
/**
* Return list of all Application in database (unsorted) <br/>
* If there are not any Application in database, return an empty list
@@ -102,7 +95,6 @@
/**
* Return Application with id provided
- *
* @param id - must be valid applicationId (catgoryname/applicationName), if not, this will throw exception
*/
public Application getApplication(String id) throws Exception;
@@ -110,9 +102,8 @@
/**
* Return Application in specific category and have name provided in param <br/>
* If it can't be found, return null
- *
* @param category - name of application category
- * @param name - name of application
+ * @param name - name of application
*/
public Application getApplication(String category, String name) throws Exception;
@@ -120,16 +111,14 @@
* Save Application in an ApplicationCategory <br/>
* If ApplicationCategory or Application don't exist, they'll be created <br/>
* If Application has been already existed, it will be updated <br/>
- *
- * @param category - ApplicationCategory that your application'll be saved to
- * @param application - Application that will be saved
+ * @param category - ApplicationCategory that your application'll be saved to
+ * @param application - Application that will be saved
*/
public void save(ApplicationCategory category, Application application) throws Exception;
/**
* Update an Application <br/>
* It must be existed in database, if not, this will throw an IllegalStateException
- *
* @param application - Application that you want to update
*/
public void update(Application application) throws Exception;
@@ -137,7 +126,6 @@
/**
* Remove an Application from database <br/>
* If it can't be found, it will be ignored (no exception)
- *
* @param app - Application that you want to remove, must not be null
*/
public void remove(Application app) throws Exception;
@@ -145,21 +133,16 @@
/**
* Get all deployed portlet, add to portlet's ApplicationCategory <br/>
* If ApplicationCategory currently doesn't exist, it'll be created <br/>
- * If Application've already existed, it'll be ignored
+ * If Application've already existed, it'll be ignored
*/
public void importAllPortlets() throws Exception;
//TODO: dang.tung
-
/**
* Get all Gadget, add to eXoGadgets application category <br/>
* When first added, it's access permission will be Everyone <br/>
* If ApplicationCategory currently doesn't exist, it'll be created <br/>
- * Gadget that has been imported will be ignored
+ * Gadget that has been imported will be ignored
*/
public void importExoGadgets() throws Exception;
-
- Application createOrUpdateApplication(String categoryName, String definitionName, ContentType<?> contentType, String contentId, String displayName, String description, List<String> permissions);
-
- Application createApplicationFrom(org.gatein.pc.api.Portlet portlet);
}
\ No newline at end of file
Modified: portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
===================================================================
--- portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2011-08-16 14:52:03 UTC (rev 7159)
@@ -259,7 +259,7 @@
// If the application name contained a beginning slash (which can happen with WSRP), we need to hack around the
// hardcoding of portlet id expectations >_<
- if (fragments.length == 3 && applicationName.length() == 0)
+ if(fragments.length == 3 && applicationName.length() == 0)
{
applicationName = "/" + fragments[2];
}
@@ -371,6 +371,8 @@
public void importExoGadgets() throws Exception
{
+ ContentRegistry registry = getContentRegistry();
+
//
ExoContainer container = ExoContainerContext.getCurrentContainer();
GadgetRegistryService gadgetService = (GadgetRegistryService)container.getComponentInstanceOfType(GadgetRegistryService.class);
@@ -384,16 +386,22 @@
String categoryName = "Gadgets";
//
- CategoryDefinition category = getOrCreateCategoryDefinition(categoryName, permissions);
+ CategoryDefinition category = registry.getCategory(categoryName);
+ if (category == null)
+ {
+ category = registry.createCategory(categoryName);
+ category.setDisplayName(categoryName);
+ category.setDescription(categoryName);
+ category.setAccessPermissions(permissions);
+ }
//
for (Gadget ele : eXoGadgets)
{
- String name = ele.getName();
- ContentDefinition app = category.getContentMap().get(name);
+ ContentDefinition app = category.getContentMap().get(ele.getName());
if (app == null)
{
- app = category.createContent(name, org.exoplatform.portal.pom.spi.gadget.Gadget.CONTENT_TYPE, name);
+ app = category.createContent(ele.getName(), org.exoplatform.portal.pom.spi.gadget.Gadget.CONTENT_TYPE, ele.getName());
app.setDisplayName(ele.getTitle());
app.setDescription(ele.getDescription());
app.setAccessPermissions(permissions);
@@ -402,53 +410,10 @@
}
}
- public Application createOrUpdateApplication(String categoryName, String definitionName, ContentType<?> contentType, String contentId, String displayName, String description, List<String> permissions)
+ public void importAllPortlets() throws Exception
{
- CategoryDefinition definition = getOrCreateCategoryDefinition(categoryName, permissions);
- ContentDefinition content = definition.getContentMap().get(definitionName);
- if (content == null)
- {
- content = createContent(definitionName, contentType, contentId, displayName, description, permissions, definition);
- }
- else
- {
- content.setAccessPermissions(permissions);
- content.setDescription(description);
- content.setDisplayName(displayName);
- }
- return load(content);
- }
-
- private ContentDefinition createContent(String definitionName, ContentType<?> contentType, String contentId, String displayName, String description, List<String> permissions, CategoryDefinition category)
- {
- ContentDefinition content = category.createContent(definitionName, contentType, contentId);
- content.setDisplayName(displayName);
- content.setDescription(description);
- content.setAccessPermissions(permissions);
- return content;
- }
-
- private ContentDefinition createContentFrom(Application application, CategoryDefinition category)
- {
- return createContent(application.getApplicationName(), application.getType().getContentType(), application.getContentId(), application.getDisplayName(), application.getDescription(), application.getAccessPermissions(), category);
- }
-
- private CategoryDefinition getOrCreateCategoryDefinition(String categoryName, List<String> permissions)
- {
ContentRegistry registry = getContentRegistry();
- CategoryDefinition category = registry.getCategory(categoryName);
- if (category == null)
- {
- category = registry.createCategory(categoryName);
- category.setDisplayName(categoryName);
- category.setDescription(categoryName);
- category.setAccessPermissions(permissions);
- }
- return category;
- }
- public void importAllPortlets() throws Exception
- {
//
log.info("About to import portlets in application registry");
@@ -462,17 +427,21 @@
for (org.gatein.pc.api.Portlet portlet : portlets)
{
PortletInfo info = portlet.getInfo();
-
- final Application application = createApplicationFrom(portlet);
-
String portletApplicationName = info.getApplicationName();
- final String portletName = application.getApplicationName();
+ String portletName = portlet.getContext().getId();
+ // Need to sanitize portlet and application names in case they contain characters that would
+ // cause an improper Application name
+ portletApplicationName = portletApplicationName.replace('/', '_');
+ portletName = portletName.replace('/', '_');
+
MetaInfo metaInfo = portlet.getInfo().getMeta();
LocalizedString keywordsLS = metaInfo.getMetaValue(MetaInfo.KEYWORDS);
- // Process keywords
+ //
Set<String> categoryNames = new HashSet<String>();
+
+ // Process keywords
if (keywordsLS != null)
{
String keywords = keywordsLS.getDefaultString();
@@ -523,89 +492,62 @@
// Process category names
for (String categoryName : categoryNames)
{
- CategoryDefinition category = getOrCreateCategoryDefinition(categoryName, permissions);
+ CategoryDefinition category = registry.getCategory(categoryName);
//
+ if (category == null)
+ {
+ category = registry.createCategory(categoryName);
+ category.setDisplayName(categoryName);
+ category.setAccessPermissions(permissions);
+ }
+
+ //
ContentDefinition app = category.getContentMap().get(portletName);
if (app == null)
{
+ LocalizedString descriptionLS = metaInfo.getMetaValue(MetaInfo.DESCRIPTION);
+ LocalizedString displayNameLS = metaInfo.getMetaValue(MetaInfo.DISPLAY_NAME);
+ String displayName = getLocalizedStringValue(displayNameLS, portletName);
+
+ ContentType<?> contentType;
+ String contentId;
+ if (remote)
+ {
+ contentType = WSRP.CONTENT_TYPE;
+ contentId = portlet.getContext().getId();
+ displayName += REMOTE_DISPLAY_NAME_SUFFIX; // add remote to display name to make it more obvious that the portlet is remote
+ }
+ else
+ {
+ contentType = Portlet.CONTENT_TYPE;
+ contentId = info.getApplicationName() + "/" + info.getName();
+ }
+
// Check if the portlet has already existed in this category
List<Application> applications = load(category).getApplications();
boolean isExist = false;
- for (Application categoryApp : applications)
+ for (Application application : applications)
{
- if (categoryApp.getContentId().equals(application.getContentId()))
+ if (application.getContentId().equals(contentId))
{
isExist = true;
break;
}
}
-
+
if (!isExist)
{
- app = createContentFrom(application, category);
+ app = category.createContent(portletName, contentType, contentId);
+ app.setDisplayName(displayName);
+ app.setDescription(getLocalizedStringValue(descriptionLS, portletName));
+ app.setAccessPermissions(permissions);
}
}
}
}
}
- public Application createApplicationFrom(org.gatein.pc.api.Portlet portlet)
- {
- PortletInfo info = portlet.getInfo();
-
- String portletName = portlet.getContext().getId();
-
- portletName = sanitize(portletName);
-
- MetaInfo metaInfo = portlet.getInfo().getMeta();
-
- ArrayList<String> permissions = new ArrayList<String>();
- permissions.add(UserACL.EVERYONE);
-
- // Additionally categorise the portlet as remote
- boolean remote = portlet.isRemote();
-
- LocalizedString descriptionLS = metaInfo.getMetaValue(MetaInfo.DESCRIPTION);
- LocalizedString displayNameLS = metaInfo.getMetaValue(MetaInfo.DISPLAY_NAME);
- String displayName = getLocalizedStringValue(displayNameLS, portletName);
-
- ApplicationType appType;
- String contentId;
- if (remote)
- {
- appType = ApplicationType.WSRP_PORTLET;
- contentId = portlet.getContext().getId();
- displayName += REMOTE_DISPLAY_NAME_SUFFIX; // add remote to display name to make it more obvious that the portlet is remote
- }
- else
- {
- appType = ApplicationType.PORTLET;
- contentId = info.getApplicationName() + "/" + info.getName();
- }
-
- Application app = new Application();
- app.setApplicationName(portletName);
- app.setType(appType);
- app.setDisplayName(displayName);
- app.setDescription(getLocalizedStringValue(descriptionLS, portletName));
- app.setAccessPermissions(permissions);
- app.setContentId(contentId);
-
- return app;
- }
-
- /**
- * Sanitizes the specified name in case it contains characters that would cause improper Application name.
- *
- * @param name
- * @return
- */
- private String sanitize(String name)
- {
- return name.replace('/', '_');
- }
-
private boolean isApplicationType(Application app, ApplicationType<?>... appTypes)
{
if (appTypes == null || appTypes.length == 0)
Modified: portal/trunk/component/pc/pom.xml
===================================================================
--- portal/trunk/component/pc/pom.xml 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/component/pc/pom.xml 2011-08-16 14:52:03 UTC (rev 7159)
@@ -19,62 +19,55 @@
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.component</artifactId>
- <version>3.2.0-M02-SNAPSHOT</version>
- </parent>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component</artifactId>
+ <version>3.2.0-M02-SNAPSHOT</version>
+ </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>exo.portal.component.pc</artifactId>
- <packaging>jar</packaging>
- <name>GateIn Portal Component PC integration</name>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>exo.portal.component.pc</artifactId>
+ <packaging>jar</packaging>
+ <name>GateIn Portal Component PC integration</name>
- <dependencies>
+ <dependencies>
- <dependency>
- <groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.component.resources</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.common</groupId>
- <artifactId>common-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.pc</groupId>
- <artifactId>pc-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.pc</groupId>
- <artifactId>pc-portlet</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.pc</groupId>
- <artifactId>pc-federation</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.pc</groupId>
- <artifactId>pc-bridge</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.wci</groupId>
- <artifactId>wci-wci</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.container</artifactId>
- </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.resources</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.common</groupId>
+ <artifactId>common-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-portlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-federation</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-bridge</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-wci</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ </dependency>
- <!-- GateIn API support -->
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>gatein-java-api</artifactId>
- </dependency>
-
- </dependencies>
-
- <build>
- </build>
+ </dependencies>
+
+ <build>
+ </build>
</project>
Modified: portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java
===================================================================
--- portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoKernelIntegration.java 2011-08-16 14:52:03 UTC (rev 7159)
@@ -22,7 +22,6 @@
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.services.resources.ResourceBundleService;
-import org.gatein.api.GateIn;
import org.gatein.pc.api.PortletInvoker;
import org.gatein.pc.bridge.BridgeInterceptor;
import org.gatein.pc.federation.FederatingPortletInvoker;
@@ -67,7 +66,7 @@
* We enforce the dependency with the ResourceBundleService since it must be stared before the
* <code>portletApplicationRegistry</code>
*
- * @param context the exo container context
+ * @param context the exo container context
* @param resourceBundleService the resource bundle service that is here for the sake of creating a dependency
*/
public ExoKernelIntegration(ExoContainerContext context, ResourceBundleService resourceBundleService)
@@ -84,15 +83,13 @@
// The portlet application deployer
portletApplicationRegistry = new ExoPortletApplicationDeployer();
portletApplicationRegistry.setContainerPortletInvoker(containerPortletInvoker);
- GateIn gateIn = (GateIn)container.getComponentInstanceOfType(GateIn.class);
- ((ExoPortletApplicationDeployer)portletApplicationRegistry).setAPIInstance(gateIn);
//Container Stack
ContainerPortletDispatcher portletContainerDispatcher = new ContainerPortletDispatcher();
-
+
// Federating portlet invoker
FederatingPortletInvoker federatingPortletInvoker = new FederatingPortletInvokerService();
-
+
EventPayloadInterceptor eventPayloadInterceptor = new EventPayloadInterceptor();
eventPayloadInterceptor.setNext(portletContainerDispatcher);
RequestAttributeConversationInterceptor requestAttributeConversationInterceptor =
Modified: portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoPortletApplicationDeployer.java
===================================================================
--- portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoPortletApplicationDeployer.java 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/ExoPortletApplicationDeployer.java 2011-08-16 14:52:03 UTC (rev 7159)
@@ -1,16 +1,16 @@
/**
* Copyright (C) 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
@@ -21,7 +21,6 @@
import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.commons.utils.Safe;
-import org.gatein.api.GateIn;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.pc.portlet.impl.deployment.PortletApplicationDeployer;
@@ -47,9 +46,6 @@
/** . */
private final Logger log = LoggerFactory.getLogger(ExoPortletApplicationDeployer.class);
- /** . */
- private GateIn gateIn;
-
@Override
protected PortletApplication10MetaData buildPortletApplicationMetaData(WebApp webApp)
{
@@ -85,7 +81,6 @@
log.warn("The global portlet metadata is not configured");
}
- webApp.getServletContext().setAttribute(GateIn.GATEIN_API, gateIn);
}
return md;
}
@@ -111,9 +106,4 @@
Safe.close(in);
}
}
-
- public void setAPIInstance(GateIn gateIn)
- {
- this.gateIn = gateIn;
- }
}
Modified: portal/trunk/component/pom.xml
===================================================================
--- portal/trunk/component/pom.xml 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/component/pom.xml 2011-08-16 14:52:03 UTC (rev 7159)
@@ -45,7 +45,6 @@
<module>scripting</module>
<module>management</module>
<module>identity</module>
- <module>api-impl</module>
</modules>
</project>
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserACL.java 2011-08-16 14:52:03 UTC (rev 7159)
@@ -225,11 +225,6 @@
public boolean hasPermission(PortalConfig pconfig)
{
Identity identity = getIdentity();
- return hasPermission(identity, pconfig);
- }
-
- public boolean hasPermission(Identity identity, PortalConfig pconfig)
- {
if (hasPermission(identity, pconfig.getEditPermission()))
{
pconfig.setModifiable(true);
Modified: portal/trunk/examples/portlets/api/pom.xml
===================================================================
--- portal/trunk/examples/portlets/api/pom.xml 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/examples/portlets/api/pom.xml 2011-08-16 14:52:03 UTC (rev 7159)
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<!--
@@ -36,10 +35,5 @@
<artifactId>portlet-api</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>gatein-java-api</artifactId>
- <scope>provided</scope>
- </dependency>
</dependencies>
</project>
\ No newline at end of file
Deleted: portal/trunk/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/ContentRegistryPortlet.java
===================================================================
--- portal/trunk/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/ContentRegistryPortlet.java 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/ContentRegistryPortlet.java 2011-08-16 14:52:03 UTC (rev 7159)
@@ -1,90 +0,0 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2008, 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.samples.api;
-
-import org.gatein.api.GateIn;
-import org.gatein.api.content.Category;
-import org.gatein.api.content.ManagedContent;
-import org.gatein.api.util.IterableCollection;
-import org.gatein.api.util.IterableIdentifiableCollection;
-
-import javax.portlet.GenericPortlet;
-import javax.portlet.PortletConfig;
-import javax.portlet.PortletException;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import java.io.IOException;
-import java.io.PrintWriter;
-
-/** @author <a href="mailto:chris.laprun at jboss.com">Chris Laprun</a> */
-public class ContentRegistryPortlet extends GenericPortlet
-{
- private GateIn gateIn;
-
- @Override
- public void init(PortletConfig config) throws PortletException
- {
- super.init(config);
- gateIn = (GateIn)config.getPortletContext().getAttribute(GateIn.GATEIN_API);
- }
-
- @Override
- protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
- {
- PrintWriter writer = response.getWriter();
-
- writer.println("<h1>Categories</h1>");
-
- writer.println("<ul>");
- IterableIdentifiableCollection<Category> categories = gateIn.getDefaultPortal().getContentRegistry().getAllCategories();
- for (Category category : categories)
- {
- writer.println("<li>");
- outputCategory(category, writer);
- writer.println("</li>");
- }
- writer.println("</ul>");
- }
-
- private void outputCategory(Category category, PrintWriter writer) throws IOException
- {
- writer.println("<h2>" + category.getDisplayName() + "</h2>");
- writer.println("<ul>");
-
- final IterableCollection<ManagedContent> managedContents = category.getManagedContents();
- for (ManagedContent managedContent : managedContents)
- {
- outputManagedContent(managedContent, writer);
- }
-
- writer.println("</ul><br/>");
- }
-
- private void outputManagedContent(ManagedContent content, PrintWriter writer) throws IOException
- {
- writer.println("<h3>" + content.getDisplayName() + "</h3>");
- writer.println("<h4>Name:" + content.getName() + "</h4>");
- writer.println("Content: " + content.getContent());
- writer.println("<br/>");
- }
-}
Deleted: portal/trunk/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java
===================================================================
--- portal/trunk/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/examples/portlets/api/src/main/java/org/gatein/portal/samples/api/NavigationPortlet.java 2011-08-16 14:52:03 UTC (rev 7159)
@@ -1,113 +0,0 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2008, 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.samples.api;
-
-import org.gatein.api.GateIn;
-import org.gatein.api.id.Id;
-import org.gatein.api.portal.Navigation;
-import org.gatein.api.portal.Site;
-import org.gatein.api.util.IterableIdentifiableCollection;
-
-import javax.portlet.GenericPortlet;
-import javax.portlet.PortletConfig;
-import javax.portlet.PortletException;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import java.io.IOException;
-import java.io.PrintWriter;
-
-/** @author <a href="mailto:chris.laprun at jboss.com">Chris Laprun</a> */
-public class NavigationPortlet extends GenericPortlet
-{
- private GateIn gateIn;
-
- @Override
- public void init(PortletConfig config) throws PortletException
- {
- super.init(config);
- gateIn = (GateIn)config.getPortletContext().getAttribute(GateIn.GATEIN_API);
- }
-
- @Override
- protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
- {
- Id userId = gateIn.userId("root");
-
- PrintWriter writer = response.getWriter();
-
- writer.println("<h1>Portal Sites</h1>");
- IterableIdentifiableCollection<? extends Site> sites = gateIn.getPortalSites(userId);
- for (Site site : sites)
- {
- outputSite(site, writer);
- }
-
- writer.println("<h1>Group Sites</h1>");
- sites = gateIn.getGroupSites(userId);
- for (Site site : sites)
- {
- outputSite(site, writer);
- }
-
- writer.println("<h1>Dashboard</h1>");
- outputSite(gateIn.getDashboard(userId), writer);
- }
-
- private void outputSite(Site site, PrintWriter writer) throws IOException
- {
- Navigation navigation = site.getNavigation();
-
- IterableIdentifiableCollection<Navigation> adminNodes = navigation.getAll();
-
- writer.println("<h2>" + site.getDisplayName() + "</h2>");
- writer.println("<ul>");
-
- for (Navigation adminNode : adminNodes)
- {
- outputNode(adminNode, writer);
- }
-
- writer.println("</ul><br/>");
- }
-
- private void outputNode(Navigation node, PrintWriter writer)
- {
- IterableIdentifiableCollection<Navigation> children = node.getAll();
- int size = children.size();
- boolean isLeaf = size == 0;
- writer.println("<li>"
- + (isLeaf ? "<a style='font-weight: bold; text-decoration: underline; color: #336666;' href='" + node.getURI() + "'>" : "")
- + node.getDisplayName()
- + (isLeaf ? "</a>" : "")
- + "</li>");
- if (size != 0)
- {
- writer.println("<ul>");
- for (Navigation child : children)
- {
- outputNode(child, writer);
- }
- writer.println("</ul>");
- }
- }
-}
Modified: portal/trunk/examples/portlets/api/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- portal/trunk/examples/portlets/api/src/main/webapp/WEB-INF/portlet.xml 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/examples/portlets/api/src/main/webapp/WEB-INF/portlet.xml 2011-08-16 14:52:03 UTC (rev 7159)
@@ -26,72 +26,65 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
-->
-<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
- version="1.0">
+ <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="1.0">
<portlet>
- <description xml:lang="EN">Public Render Parameter API Portlet</description>
- <portlet-name>PRPAPIPortlet</portlet-name>
- <display-name xml:lang="EN">Public Render Parameter API Portlet</display-name>
- <portlet-class>org.gatein.portal.samples.api.PRPPortlet</portlet-class>
+ <description xml:lang="EN">Public Render Parameter API Portlet</description>
+ <portlet-name>PRPAPIPortlet</portlet-name>
+ <display-name xml:lang="EN">Public Render Parameter API Portlet</display-name>
+ <portlet-class>org.gatein.portal.samples.api.PRPPortlet</portlet-class>
- <supports>
- <mime-type>text/html</mime-type>
- </supports>
+ <supports>
+ <mime-type>text/html</mime-type>
+ </supports>
- <portlet-info>
- <title>PRP Portlet</title>
- <short-title>PRP Portlet</short-title>
- <keywords>Sample</keywords>
- </portlet-info>
+ <portlet-info>
+ <title>PRP Portlet</title>
+ <short-title>PRP Portlet</short-title>
+ <keywords>Sample</keywords>
+ </portlet-info>
- <supported-public-render-parameter>navigation_uri</supported-public-render-parameter>
- <supported-public-render-parameter>page_name</supported-public-render-parameter>
- <supported-public-render-parameter>site_type</supported-public-render-parameter>
- <supported-public-render-parameter>site_name</supported-public-render-parameter>
- <supported-public-render-parameter>window_width</supported-public-render-parameter>
- <supported-public-render-parameter>window_height</supported-public-render-parameter>
- <supported-public-render-parameter>window_show_info_bar</supported-public-render-parameter>
+ <supported-public-render-parameter>navigation_uri</supported-public-render-parameter>
+ <supported-public-render-parameter>page_name</supported-public-render-parameter>
+ <supported-public-render-parameter>site_type</supported-public-render-parameter>
+ <supported-public-render-parameter>site_name</supported-public-render-parameter>
+ <supported-public-render-parameter>window_width</supported-public-render-parameter>
+ <supported-public-render-parameter>window_height</supported-public-render-parameter>
+ <supported-public-render-parameter>window_show_info_bar</supported-public-render-parameter>
- </portlet>
+ </portlet>
- <portlet>
- <description xml:lang="EN">Navigation Portlet Example using GateIn's public API</description>
- <portlet-name>NavigationAPIPortlet</portlet-name>
- <display-name xml:lang="EN">API Navigation Portlet</display-name>
- <portlet-class>org.gatein.portal.samples.api.NavigationPortlet</portlet-class>
+ <public-render-parameter>
+ <identifier>navigation_uri</identifier>
+ <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:navigation_uri</qname>
+ </public-render-parameter>
+ <public-render-parameter>
+ <identifier>page_name</identifier>
+ <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:page_name</qname>
+ </public-render-parameter>
+ <public-render-parameter>
+ <identifier>site_type</identifier>
+ <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:site_type</qname>
+ </public-render-parameter>
+ <public-render-parameter>
+ <identifier>site_name</identifier>
+ <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:site_name</qname>
+ </public-render-parameter>
+ <public-render-parameter>
+ <identifier>window_width</identifier>
+ <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:window_width</qname>
+ </public-render-parameter>
+ <public-render-parameter>
+ <identifier>window_height</identifier>
+ <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:window_height</qname>
+ </public-render-parameter>
+ <public-render-parameter>
+ <identifier>window_show_info_bar</identifier>
+ <qname xmlns:prp='http://www.gatein.org/xml/ns/prp_1_0'>prp:window_show_info_bar</qname>
+ </public-render-parameter>
- <supports>
- <mime-type>text/html</mime-type>
- </supports>
-
- <portlet-info>
- <title>API Navigation Portlet</title>
- <short-title>Navigation Portlet</short-title>
- <keywords>Sample</keywords>
- </portlet-info>
- </portlet>
-
<portlet>
- <description xml:lang="EN">Content Registry Portlet Example using GateIn's public API</description>
- <portlet-name>ContentRegistryAPIPortlet</portlet-name>
- <display-name xml:lang="EN">API Content Registry Portlet</display-name>
- <portlet-class>org.gatein.portal.samples.api.ContentRegistryPortlet</portlet-class>
-
- <supports>
- <mime-type>text/html</mime-type>
- </supports>
-
- <portlet-info>
- <title>API Content Registry Portlet</title>
- <short-title>Content Registry Portlet</short-title>
- <keywords>Sample</keywords>
- </portlet-info>
- </portlet>
-
- <portlet>
<description xml:lang="EN">Locale URL Portlet</description>
<portlet-name>LocaleURLPortlet</portlet-name>
<display-name xml:lang="EN">A Portlet example demonstrating locale selection in URL</display-name>
Modified: portal/trunk/packaging/jboss-as5/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/jboss-as5/pkg/pom.xml 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/packaging/jboss-as5/pkg/pom.xml 2011-08-16 14:52:03 UTC (rev 7159)
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -19,7 +18,7 @@
<!-- The following two properties should not be changed! -->
<jbossas.version>5.1.0.GA</jbossas.version>
<jbossas.dist.version>5.1.0.GA-jdk6</jbossas.dist.version>
-
+
<servers.dir>${project.basedir}/../../servers</servers.dir>
<jbossas.path>${servers.dir}</jbossas.path>
<jbossas.name>jboss-${jbossas.version}</jbossas.name>
@@ -295,20 +294,6 @@
<artifactId>picketlink-idm-ldap</artifactId>
</dependency>
- <!-- GateIn API -->
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>java-api-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>gatein-java-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>generic-id-impl</artifactId>
- </dependency>
-
<!-- Gatein common -->
<dependency>
<groupId>org.gatein.common</groupId>
@@ -533,9 +518,9 @@
<!-- Provided -->
<dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>1</version>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ <version>1</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
@@ -667,8 +652,8 @@
<version>2.0.235</version>
</dependency>
<dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
@@ -837,19 +822,19 @@
<version>1.2.3</version>
</dependency>
<dependency>
- <groupId>org.apache.tika</groupId>
- <artifactId>tika-core</artifactId>
- <version>0.7</version>
+ <groupId>org.apache.tika</groupId>
+ <artifactId>tika-core</artifactId>
+ <version>0.7</version>
</dependency>
<dependency>
- <groupId>org.apache.tika</groupId>
- <artifactId>tika-parsers</artifactId>
- <version>0.7</version>
+ <groupId>org.apache.tika</groupId>
+ <artifactId>tika-parsers</artifactId>
+ <version>0.7</version>
</dependency>
<dependency>
- <groupId>com.google.javascript</groupId>
- <artifactId>closure-compiler</artifactId>
- <version>r706</version>
+ <groupId>com.google.javascript</groupId>
+ <artifactId>closure-compiler</artifactId>
+ <version>r706</version>
</dependency>
<dependency>
@@ -966,17 +951,17 @@
<requireProperty>
<property>jbossas.path</property>
<message>"
- You must define the property 'jbossas.path'
- to give the path to the directory where you store your applications servers.
- "
+You must define the property 'jbossas.path'
+to give the path to the directory where you store your applications servers.
+"
</message>
</requireProperty>
<requireProperty>
<property>jbossas.name</property>
<message>"
- You must define the property 'jbossas.name'
- to give the name of the directory where JBoss AS is stored.
- "
+You must define the property 'jbossas.name'
+to give the name of the directory where JBoss AS is stored.
+"
</message>
</requireProperty>
<requireFilesExist>
@@ -984,14 +969,13 @@
<file>${jbossas.path}/${jbossas.name}/</file>
</files>
<message>"
- The following JBoss AS directory doesn't exist :
+The following JBoss AS directory doesn't exist :
${jbossas.path}/${jbossas.name}
- Make JBoss AS instance available at that location, or use -Dservers.dir=PATH to point to
- the correct location of servers directory
- and/or -Djbossas.name=NAME to point to the correct directory under the servers directory.
- You can also use -Pdownload to automatically provide JBoss AS instance.
- "
+Make JBoss AS instance available at that location, or use -Dservers.dir=PATH to point to the correct location of servers directory
+and/or -Djbossas.name=NAME to point to the correct directory under the servers directory.
+You can also use -Pdownload to automatically provide JBoss AS instance.
+"
</message>
</requireFilesExist>
</rules>
@@ -1027,9 +1011,9 @@
<configuration>
<target>
<ant antfile="${project.basedir}/package.xml" inheritRefs="true">
- <target name="package"/>
- <property name="maven.project.basedir" value="${project.basedir}"/>
- <property name="maven.project.build.directory" value="${project.build.directory}"/>
+ <target name="package" />
+ <property name="maven.project.basedir" value="${project.basedir}" />
+ <property name="maven.project.build.directory" value="${project.build.directory}" />
</ant>
</target>
</configuration>
@@ -1038,8 +1022,8 @@
</plugin>
</plugins>
</build>
+
-
<profiles>
<profile>
<id>pkg-jbossas5</id>
@@ -1066,9 +1050,9 @@
<requireProperty>
<property>exo.projects.directory.dependencies</property>
<message>"
- You must define the property 'exo.projects.directory.dependencies'
- to specify the path to the directory where you store your application servers.
- "
+You must define the property 'exo.projects.directory.dependencies'
+to specify the path to the directory where you store your application servers.
+"
</message>
</requireProperty>
</rules>
@@ -1085,9 +1069,9 @@
<requireProperty>
<property>exo.projects.app.jboss5.version</property>
<message>"
- You must define the property 'exo.projects.app.jboss5.version'
- to specify the name of the directory where JBoss AS is stored.
- "
+You must define the property 'exo.projects.app.jboss5.version'
+to specify the name of the directory where JBoss AS is stored.
+"
</message>
</requireProperty>
</rules>
@@ -1108,15 +1092,13 @@
</file>
</files>
<message>"
- The following JBoss AS directory doesn't exist :
+The following JBoss AS directory doesn't exist :
${exo.projects.directory.dependencies}/${exo.projects.app.jboss5.version}
- Make JBoss AS instance available at that location, or use
- -Dexo.projects.directory.dependencies=PATH to point to the correct location
- of servers directory and/or -Dexo.projects.app.jboss5.version=NAME to point to the
- correct directory under the servers directory.
- You can also use -Pdownload to automatically provide JBoss AS instance.
- "
+Make JBoss AS instance available at that location, or use -Dexo.projects.directory.dependencies=PATH to point to the correct location
+of servers directory and/or -Dexo.projects.app.jboss5.version=NAME to point to the correct directory under the servers directory.
+You can also use -Pdownload to automatically provide JBoss AS instance.
+"
</message>
</requireFilesExist>
</rules>
@@ -1126,10 +1108,10 @@
<execution>
<id>check-jboss-environment-ready</id>
<phase>none</phase>
- </execution>
+ </execution>
</executions>
</plugin>
-
+
</plugins>
</build>
</profile>
@@ -1169,36 +1151,35 @@
</goals>
<configuration>
<target>
- <available property="jbossas.dir.exists" type="dir" file="${jbossas.dir}"/>
+ <available property="jbossas.dir.exists" type="dir" file="${jbossas.dir}" />
<fail if="jbossas.dir.exists">"
- Destination JBossAS directory exists already:
+Destination JBossAS directory exists already:
${jbossas.dir}
- Either rename it, delete it, or deactivate -Pdownload profile.
- "
+Either rename it, delete it, or deactivate -Pdownload profile.
+"
</fail>
- <property name="jbossas.zip" value="${jbossas.path}/jboss-${jbossas.dist.version}.zip"/>
+ <property name="jbossas.zip" value="${jbossas.path}/jboss-${jbossas.dist.version}.zip" />
<!-- Autocreate servers.dir if necessary -->
- <mkdir dir="${jbossas.path}"/>
+ <mkdir dir="${jbossas.path}" />
<!-- Download JBossAS unless already downloaded -->
<ant antfile="${project.basedir}/download-jboss.xml">
- <target name="download-jboss"/>
- <property name="url"
- value="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-${jbossas.version}/jboss-${jbossas.dist.version}.zip"/>
- <property name="dest" value="${jbossas.zip}"/>
+ <target name="download-jboss" />
+ <property name="url" value="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-${jbossas.version}/jboss-${jbossas.dist.version}.zip" />
+ <property name="dest" value="${jbossas.zip}" />
</ant>
<!-- Extract downloaded JBossAS to servers dir -->
- <unzip src="${jbossas.zip}" dest="${jbossas.path}" overwrite="false"/>
+ <unzip src="${jbossas.zip}" dest="${jbossas.path}" overwrite="false" />
<ant antfile="${project.basedir}/package.xml" inheritRefs="true">
- <target name="package"/>
- <property name="maven.project.basedir" value="${project.basedir}"/>
- <property name="maven.project.build.directory" value="${project.build.directory}"/>
+ <target name="package" />
+ <property name="maven.project.basedir" value="${project.basedir}" />
+ <property name="maven.project.build.directory" value="${project.build.directory}" />
</ant>
</target>
</configuration>
@@ -1208,7 +1189,7 @@
</plugins>
</build>
</profile>
-
+
<profile>
<id>bundle</id>
<build>
@@ -1226,10 +1207,8 @@
</goals>
<configuration>
<target>
- <zip destfile="${project.build.directory}/GateIn-${project.version}-jbossas.zip"
- basedir="${jbossas.target.dir}"/>
- <attachartifact file="${project.build.directory}/GateIn-${project.version}-jbossas.zip"
- classifier="bundle" type="zip"/>
+ <zip destfile="${project.build.directory}/GateIn-${project.version}-jbossas.zip" basedir="${jbossas.target.dir}" />
+ <attachartifact file="${project.build.directory}/GateIn-${project.version}-jbossas.zip" classifier="bundle" type="zip" />
</target>
</configuration>
</execution>
@@ -1238,5 +1217,5 @@
</plugins>
</build>
</profile>
- </profiles>
+ </profiles>
</project>
Modified: portal/trunk/packaging/jboss-as6/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/jboss-as6/pkg/pom.xml 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/packaging/jboss-as6/pkg/pom.xml 2011-08-16 14:52:03 UTC (rev 7159)
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -339,20 +338,6 @@
<artifactId>pc-bridge</artifactId>
</dependency>
- <!-- GateIn API -->
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>java-api-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>gatein-java-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>generic-id-impl</artifactId>
- </dependency>
-
<!-- GateIn MOP -->
<dependency>
<groupId>org.gatein.mop</groupId>
@@ -531,9 +516,9 @@
<!-- Provided -->
<dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>1</version>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ <version>1</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
@@ -658,8 +643,8 @@
<version>2.0.235</version>
</dependency>
<dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
@@ -828,19 +813,19 @@
<version>1.2.3</version>
</dependency>
<dependency>
- <groupId>org.apache.tika</groupId>
- <artifactId>tika-core</artifactId>
- <version>0.7</version>
+ <groupId>org.apache.tika</groupId>
+ <artifactId>tika-core</artifactId>
+ <version>0.7</version>
</dependency>
<dependency>
- <groupId>org.apache.tika</groupId>
- <artifactId>tika-parsers</artifactId>
- <version>0.7</version>
+ <groupId>org.apache.tika</groupId>
+ <artifactId>tika-parsers</artifactId>
+ <version>0.7</version>
</dependency>
<dependency>
- <groupId>com.google.javascript</groupId>
- <artifactId>closure-compiler</artifactId>
- <version>r706</version>
+ <groupId>com.google.javascript</groupId>
+ <artifactId>closure-compiler</artifactId>
+ <version>r706</version>
</dependency>
<dependency>
@@ -957,17 +942,17 @@
<requireProperty>
<property>jbossas.path</property>
<message>"
- You must define the property 'jbossas.path'
- to give the path to the directory where you store your applications servers.
- "
+You must define the property 'jbossas.path'
+to give the path to the directory where you store your applications servers.
+"
</message>
</requireProperty>
<requireProperty>
<property>jbossas.name</property>
<message>"
- You must define the property 'jbossas.name'
- to give the name of the directory where JBoss AS is stored.
- "
+You must define the property 'jbossas.name'
+to give the name of the directory where JBoss AS is stored.
+"
</message>
</requireProperty>
<requireFilesExist>
@@ -975,14 +960,13 @@
<file>${jbossas.path}/${jbossas.name}/</file>
</files>
<message>"
- The following JBoss AS directory doesn't exist :
+The following JBoss AS directory doesn't exist :
${jbossas.path}/${jbossas.name}
- Make JBoss AS instance available at that location, or use -Dservers.dir=PATH to point to
- the correct location of servers directory
- and/or -Djbossas.name=NAME to point to the correct directory under the servers directory.
- You can also use -Pdownload to automatically provide JBoss AS instance.
- "
+Make JBoss AS instance available at that location, or use -Dservers.dir=PATH to point to the correct location of servers directory
+and/or -Djbossas.name=NAME to point to the correct directory under the servers directory.
+You can also use -Pdownload to automatically provide JBoss AS instance.
+"
</message>
</requireFilesExist>
</rules>
@@ -1018,9 +1002,9 @@
<configuration>
<target>
<ant antfile="${project.basedir}/package.xml" inheritRefs="true">
- <target name="package"/>
- <property name="maven.project.basedir" value="${project.basedir}"/>
- <property name="maven.project.build.directory" value="${project.build.directory}"/>
+ <target name="package" />
+ <property name="maven.project.basedir" value="${project.basedir}" />
+ <property name="maven.project.build.directory" value="${project.build.directory}" />
</ant>
</target>
</configuration>
@@ -1057,9 +1041,9 @@
<requireProperty>
<property>exo.projects.directory.dependencies</property>
<message>"
- You must define the property 'exo.projects.directory.dependencies'
- to specify the path to the directory where you store your application servers.
- "
+You must define the property 'exo.projects.directory.dependencies'
+to specify the path to the directory where you store your application servers.
+"
</message>
</requireProperty>
</rules>
@@ -1076,9 +1060,9 @@
<requireProperty>
<property>exo.projects.app.jboss6.version</property>
<message>"
- You must define the property 'exo.projects.app.jboss6.version'
- to specify the name of the directory where JBoss AS is stored.
- "
+You must define the property 'exo.projects.app.jboss6.version'
+to specify the name of the directory where JBoss AS is stored.
+"
</message>
</requireProperty>
</rules>
@@ -1099,15 +1083,13 @@
</file>
</files>
<message>"
- The following JBoss AS directory doesn't exist :
+The following JBoss AS directory doesn't exist :
${exo.projects.directory.dependencies}/${exo.projects.app.jboss6.version}
- Make JBoss AS instance available at that location, or use
- -Dexo.projects.directory.dependencies=PATH to point to the correct location
- of servers directory and/or -Dexo.projects.app.jboss6.version=NAME to point to the
- correct directory under the servers directory.
- You can also use -Pdownload to automatically provide JBoss AS instance.
- "
+Make JBoss AS instance available at that location, or use -Dexo.projects.directory.dependencies=PATH to point to the correct location
+of servers directory and/or -Dexo.projects.app.jboss6.version=NAME to point to the correct directory under the servers directory.
+You can also use -Pdownload to automatically provide JBoss AS instance.
+"
</message>
</requireFilesExist>
</rules>
@@ -1160,37 +1142,35 @@
</goals>
<configuration>
<target>
- <available property="jbossas.dir.exists" type="dir" file="${jbossas.dir}"/>
+ <available property="jbossas.dir.exists" type="dir" file="${jbossas.dir}" />
<fail if="jbossas.dir.exists">"
- Destination JBossAS directory exists already:
+Destination JBossAS directory exists already:
${jbossas.dir}
- Either rename it, delete it, or deactivate -Pdownload profile.
- "
+Either rename it, delete it, or deactivate -Pdownload profile.
+"
</fail>
- <property name="jbossas.zip"
- value="${jbossas.path}/jboss-as-distribution-${jbossas.dist.version}.zip"/>
+ <property name="jbossas.zip" value="${jbossas.path}/jboss-as-distribution-${jbossas.dist.version}.zip" />
<!-- Autocreate servers.dir if necessary -->
- <mkdir dir="${jbossas.path}"/>
+ <mkdir dir="${jbossas.path}" />
<!-- Download JBossAS unless already downloaded -->
<ant antfile="${project.basedir}/download-jboss.xml">
- <target name="download-jboss"/>
- <property name="url"
- value="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-${jbossas.version}/jboss-as-distribution-${jbossas.dist.version}.zip"/>
- <property name="dest" value="${jbossas.zip}"/>
+ <target name="download-jboss" />
+ <property name="url" value="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-${jbossas.version}/jboss-as-distribution-${jbossas.dist.version}.zip" />
+ <property name="dest" value="${jbossas.zip}" />
</ant>
<!-- Extract downloaded JBossAS to servers dir -->
- <unzip src="${jbossas.zip}" dest="${jbossas.path}" overwrite="false"/>
+ <unzip src="${jbossas.zip}" dest="${jbossas.path}" overwrite="false" />
<ant antfile="${project.basedir}/package.xml" inheritRefs="true">
- <target name="package"/>
- <property name="maven.project.basedir" value="${project.basedir}"/>
- <property name="maven.project.build.directory" value="${project.build.directory}"/>
+ <target name="package" />
+ <property name="maven.project.basedir" value="${project.basedir}" />
+ <property name="maven.project.build.directory" value="${project.build.directory}" />
</ant>
</target>
</configuration>
@@ -1218,10 +1198,8 @@
</goals>
<configuration>
<target>
- <zip destfile="${project.build.directory}/GateIn-${project.version}-jbossas6.zip"
- basedir="${jbossas.target.dir}"/>
- <attachartifact file="${project.build.directory}/GateIn-${project.version}-jbossas6.zip"
- classifier="bundle" type="zip"/>
+ <zip destfile="${project.build.directory}/GateIn-${project.version}-jbossas6.zip" basedir="${jbossas.target.dir}" />
+ <attachartifact file="${project.build.directory}/GateIn-${project.version}-jbossas6.zip" classifier="bundle" type="zip" />
</target>
</configuration>
</execution>
@@ -1277,7 +1255,7 @@
<!-- Copy CDI specific configuration -->
<copy todir="${jbossas.target.dir}" preservelastmodified="true" overwrite="true">
<fileset dir="${project.basedir}/src/main/resources/cdi/jboss">
- <include name="**/*.xml"/>
+ <include name="**/*.xml" />
</fileset>
</copy>
</target>
Modified: portal/trunk/packaging/jetty/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/jetty/pkg/pom.xml 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/packaging/jetty/pkg/pom.xml 2011-08-16 14:52:03 UTC (rev 7159)
@@ -334,20 +334,6 @@
<artifactId>pc-bridge</artifactId>
</dependency>
- <!-- GateIn API -->
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>java-api-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>gatein-java-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>generic-id-impl</artifactId>
- </dependency>
-
<!-- GateIn MOP -->
<dependency>
<groupId>org.gatein.mop</groupId>
Modified: portal/trunk/packaging/tomcat/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/tomcat/pkg/pom.xml 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/packaging/tomcat/pkg/pom.xml 2011-08-16 14:52:03 UTC (rev 7159)
@@ -326,20 +326,6 @@
<artifactId>pc-bridge</artifactId>
</dependency>
- <!-- GateIn API -->
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>java-api-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>gatein-java-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>generic-id-impl</artifactId>
- </dependency>
-
<!-- GateIn MOP -->
<dependency>
<groupId>org.gatein.mop</groupId>
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/pom.xml 2011-08-16 14:52:03 UTC (rev 7159)
@@ -50,7 +50,6 @@
<org.gatein.wsrp.version>2.1.0-Beta04</org.gatein.wsrp.version>
<org.gatein.mop.version>1.1.0-Beta05</org.gatein.mop.version>
<org.gatein.mgmt.version>1.0.0-Beta01</org.gatein.mgmt.version>
- <org.gatein.api.version>1.0.0-Beta01</org.gatein.api.version>
<org.slf4j.version>1.5.8</org.slf4j.version>
<commons-pool.version>1.5.5</commons-pool.version>
<rhino.version>1.6R5</rhino.version>
@@ -397,23 +396,6 @@
<version>${org.gatein.wsrp.version}</version>
</dependency>
- <!-- API -->
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>gatein-java-api</artifactId>
- <version>${org.gatein.api.version}</version>
- </dependency>
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>generic-id-impl</artifactId>
- <version>${org.gatein.api.version}</version>
- </dependency>
- <dependency>
- <groupId>org.gatein.api</groupId>
- <artifactId>java-api-impl</artifactId>
- <version>${project.version}</version>
- </dependency>
-
<!-- GateIn -->
<dependency>
<groupId>org.exoplatform.portal</groupId>
@@ -873,11 +855,11 @@
<maxmem>1024m</maxmem>
</configuration>
</plugin>
- <plugin>
- <groupId>org.jibx</groupId>
- <artifactId>maven-jibx-plugin</artifactId>
- <version>1.2.2</version>
- </plugin>
+ <plugin>
+ <groupId>org.jibx</groupId>
+ <artifactId>maven-jibx-plugin</artifactId>
+ <version>1.2.2</version>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java 2011-08-16 14:52:03 UTC (rev 7159)
@@ -185,17 +185,41 @@
{
ExoContainer manager = ExoContainerContext.getCurrentContainer();
- ApplicationRegistryService appRegistry =
- (ApplicationRegistryService)manager.getComponentInstance(ApplicationRegistryService.class);
-
FederatingPortletInvoker portletInvoker =
(FederatingPortletInvoker)manager.getComponentInstance(FederatingPortletInvoker.class);
Set<Portlet> portlets = remote ? portletInvoker.getRemotePortlets() : portletInvoker.getLocalPortlets();
-
List<Application> applications = new ArrayList<Application>(portlets.size());
for (Portlet portlet : portlets)
{
- applications.add(appRegistry.createApplicationFrom(portlet));
+ PortletInfo info = portlet.getInfo();
+
+ LocalizedString descriptionLS = info.getMeta().getMetaValue(MetaInfo.DESCRIPTION);
+ LocalizedString displayNameLS = info.getMeta().getMetaValue(MetaInfo.DISPLAY_NAME);
+
+ String portletName = info.getName();
+ Application app = new Application();
+ app.setApplicationName(portletName);
+ // app.setApplicationGroup(info.getApplicationName());
+ ApplicationType appType;
+ String contentId;
+ String displayName = Util.getLocalizedStringValue(displayNameLS, portletName);
+ if (remote)
+ {
+ appType = ApplicationType.WSRP_PORTLET;
+ contentId = portlet.getContext().getId();
+ displayName += ApplicationRegistryService.REMOTE_DISPLAY_NAME_SUFFIX; // add remote to display name to make it more obvious that the portlet is remote
+ }
+ else
+ {
+ appType = ApplicationType.PORTLET;
+ contentId = info.getApplicationName() + "/" + info.getName();
+ }
+ app.setType(appType);
+ app.setDisplayName(displayName);
+ app.setDescription(Util.getLocalizedStringValue(descriptionLS, portletName));
+ app.setAccessPermissions(new ArrayList<String>());
+ app.setContentId(contentId);
+ applications.add(app);
}
return applications;
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/configuration.xml 2011-08-16 14:20:00 UTC (rev 7158)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/configuration.xml 2011-08-16 14:52:03 UTC (rev 7159)
@@ -31,7 +31,6 @@
<import>war:/conf/common/autologin-configuration.xml</import>
<import>war:/conf/common/remindpwd-configuration.xml</import>
<import>war:/conf/jcr/jcr-configuration.xml</import>
- <import>war:/conf/api/api-configuration.xml</import>
More information about the gatein-commits
mailing list