Author: julien_viet
Date: 2010-02-17 12:01:59 -0500 (Wed, 17 Feb 2010)
New Revision: 1771
Removed:
portal/trunk/component/common/src/main/java/org/exoplatform/commons/management/
Modified:
portal/trunk/component/management/src/main/java/org/exoplatform/management/RestManagementProvider.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java
portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateService.java
portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateStatisticService.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatisticService.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStatisticService.java
Log:
replace @Rest annotation by @RESTEndpoint annotation
Modified:
portal/trunk/component/management/src/main/java/org/exoplatform/management/RestManagementProvider.java
===================================================================
---
portal/trunk/component/management/src/main/java/org/exoplatform/management/RestManagementProvider.java 2010-02-17
13:52:56 UTC (rev 1770)
+++
portal/trunk/component/management/src/main/java/org/exoplatform/management/RestManagementProvider.java 2010-02-17
17:01:59 UTC (rev 1771)
@@ -19,9 +19,9 @@
package org.exoplatform.management;
-import org.exoplatform.commons.management.Rest;
import org.exoplatform.management.data.RestResource;
import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.management.management.annotations.RESTEndpoint;
import org.exoplatform.management.spi.ManagedResource;
import org.exoplatform.management.spi.ManagementProvider;
import org.exoplatform.portal.config.UserACL;
@@ -100,12 +100,12 @@
Object resource = managedResource.getResource();
//
- Rest annotation = resource.getClass().getAnnotation(Rest.class);
+ RESTEndpoint annotation = resource.getClass().getAnnotation(RESTEndpoint.class);
//
if (annotation != null)
{
- String name = annotation.value();
+ String name = annotation.path();
ResourceKey key = new ResourceKey(name);
resourceMap.put(key, new RestResource(name, managedResource));
return key;
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java 2010-02-17
13:52:56 UTC (rev 1770)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java 2010-02-17
17:01:59 UTC (rev 1771)
@@ -19,7 +19,6 @@
package org.exoplatform.portal.resource;
-import org.exoplatform.commons.management.Rest;
import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.commons.utils.Safe;
import org.exoplatform.container.ExoContainerContext;
@@ -30,6 +29,7 @@
import org.exoplatform.management.annotations.ManagedName;
import org.exoplatform.management.jmx.annotations.NameTemplate;
import org.exoplatform.management.jmx.annotations.Property;
+import org.exoplatform.management.management.annotations.RESTEndpoint;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.services.resources.Orientation;
@@ -59,7 +59,7 @@
@NameTemplate({@Property(key = "view", value = "portal"),
@Property(key = "service", value = "management"),
@Property(key = "type", value = "skin")})
@ManagedDescription("Skin service")
-@Rest("skinservice")
+@RESTEndpoint(path = "skinservice")
public class SkinService implements Startable
{
Modified:
portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateService.java
===================================================================
---
portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateService.java 2010-02-17
13:52:56 UTC (rev 1770)
+++
portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateService.java 2010-02-17
17:01:59 UTC (rev 1771)
@@ -22,7 +22,6 @@
import groovy.lang.Writable;
import groovy.text.Template;
-import org.exoplatform.commons.management.Rest;
import org.exoplatform.commons.utils.IOUtil;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.groovyscript.GroovyTemplate;
@@ -34,6 +33,7 @@
import org.exoplatform.management.annotations.ManagedName;
import org.exoplatform.management.jmx.annotations.NameTemplate;
import org.exoplatform.management.jmx.annotations.Property;
+import org.exoplatform.management.management.annotations.RESTEndpoint;
import org.exoplatform.resolver.ResourceResolver;
import org.exoplatform.services.cache.CacheService;
import org.exoplatform.services.cache.ExoCache;
@@ -48,7 +48,7 @@
@NameTemplate({@Property(key = "view", value = "portal"),
@Property(key = "service", value = "management"),
@Property(key = "type", value = "template")})
@ManagedDescription("Template management service")
-@Rest("templateservice")
+@RESTEndpoint(path = "templateservice")
public class TemplateService
{
Modified:
portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateStatisticService.java
===================================================================
---
portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateStatisticService.java 2010-02-17
13:52:56 UTC (rev 1770)
+++
portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateStatisticService.java 2010-02-17
17:01:59 UTC (rev 1771)
@@ -19,7 +19,6 @@
package org.exoplatform.groovyscript.text;
-import org.exoplatform.commons.management.Rest;
import org.exoplatform.management.annotations.Impact;
import org.exoplatform.management.annotations.ImpactType;
import org.exoplatform.management.annotations.Managed;
@@ -27,6 +26,7 @@
import org.exoplatform.management.annotations.ManagedName;
import org.exoplatform.management.jmx.annotations.NameTemplate;
import org.exoplatform.management.jmx.annotations.Property;
+import org.exoplatform.management.management.annotations.RESTEndpoint;
import java.util.ArrayList;
import java.util.Collections;
@@ -49,7 +49,7 @@
@Property(key = "view", value = "portal"),
@Property(key = "service", value = "statistic"),
@Property(key = "type", value = "template")})
-@Rest("templatestatistics")
+@RESTEndpoint(path = "templatestatistics")
public class TemplateStatisticService
{
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatisticService.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatisticService.java 2010-02-17
13:52:56 UTC (rev 1770)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatisticService.java 2010-02-17
17:01:59 UTC (rev 1771)
@@ -19,7 +19,6 @@
package org.exoplatform.portal.application;
-import org.exoplatform.commons.management.Rest;
import org.exoplatform.management.annotations.Impact;
import org.exoplatform.management.annotations.ImpactType;
import org.exoplatform.management.annotations.Managed;
@@ -27,6 +26,7 @@
import org.exoplatform.management.annotations.ManagedName;
import org.exoplatform.management.jmx.annotations.NameTemplate;
import org.exoplatform.management.jmx.annotations.Property;
+import org.exoplatform.management.management.annotations.RESTEndpoint;
import org.picocontainer.Startable;
import java.util.ArrayList;
@@ -46,7 +46,7 @@
@Property(key = "view", value = "portal"),
@Property(key = "service", value = "statistic"),
@Property(key = "type", value = "application")})
-@Rest("applicationstatistic")
+@RESTEndpoint(path = "applicationstatistic")
public class ApplicationStatisticService implements Startable
{
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStatisticService.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStatisticService.java 2010-02-17
13:52:56 UTC (rev 1770)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStatisticService.java 2010-02-17
17:01:59 UTC (rev 1771)
@@ -19,7 +19,6 @@
package org.exoplatform.portal.application;
-import org.exoplatform.commons.management.Rest;
import org.exoplatform.management.annotations.Impact;
import org.exoplatform.management.annotations.ImpactType;
import org.exoplatform.management.annotations.Managed;
@@ -27,6 +26,7 @@
import org.exoplatform.management.annotations.ManagedName;
import org.exoplatform.management.jmx.annotations.NameTemplate;
import org.exoplatform.management.jmx.annotations.Property;
+import org.exoplatform.management.management.annotations.RESTEndpoint;
import org.exoplatform.portal.config.UserPortalConfigService;
import org.picocontainer.Startable;
@@ -44,7 +44,7 @@
@Property(key = "view", value = "portal"),
@Property(key = "service", value = "statistic"),
@Property(key = "type", value = "portal")})
-@Rest("portalstatistic")
+@RESTEndpoint(path = "portalstatistic")
public class PortalStatisticService implements Startable
{