exo-jcr SVN: r287 - in core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization: cache and 1 other directory.
by do-not-reply@jboss.org
Author: tolusha
Date: 2009-10-16 04:08:49 -0400 (Fri, 16 Oct 2009)
New Revision: 287
Added:
core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/
core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableGroupHandlerImpl.java
core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableMembershipHandlerImpl.java
core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableMembershipTypeHandlerImpl.java
core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableUserHandlerImpl.java
core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableUserProfileHandlerImpl.java
core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/MembershipCacheKey.java
core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/OrganizationCacheHandler.java
Log:
EXOJCR-186: cacheable handlers
Added: core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableGroupHandlerImpl.java
===================================================================
--- core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableGroupHandlerImpl.java (rev 0)
+++ core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableGroupHandlerImpl.java 2009-10-16 08:08:49 UTC (rev 287)
@@ -0,0 +1,191 @@
+/*
+ * Copyright (C) 2003-2009 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.organization.cache;
+
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.organization.Group;
+import org.exoplatform.services.organization.GroupEventListener;
+import org.exoplatform.services.organization.GroupHandler;
+import org.exoplatform.services.organization.Membership;
+import org.exoplatform.services.organization.UserHandler;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date: 2009
+ *
+ * @author <a href="mailto:anatoliy.bazko@exoplatform.com.ua">Anatoliy Bazko</a>
+ * @version $Id$
+ */
+public class CacheableGroupHandlerImpl implements GroupHandler
+{
+
+ private final ExoCache groupCache;
+
+ private final ExoCache membershipCache;
+
+ private final GroupHandler groupHandler;
+
+ /**
+ * CacheableUserHandler constructor.
+ *
+ * @param OrganizationCacheHandler
+ * - organization cache handler
+ * @param handler
+ * - user handler
+ */
+ public CacheableGroupHandlerImpl(OrganizationCacheHandler organizationCacheHandler, GroupHandler handler)
+ {
+ this.groupCache = organizationCacheHandler.getGroupCache();
+ this.membershipCache = organizationCacheHandler.getMembershipCache();
+ this.groupHandler = handler;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addChild(Group parent, Group child, boolean broadcast) throws Exception
+ {
+ groupHandler.addChild(parent, child, broadcast);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addGroupEventListener(GroupEventListener listener)
+ {
+ groupHandler.addGroupEventListener(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void createGroup(Group group, boolean broadcast) throws Exception
+ {
+ groupHandler.createGroup(group, broadcast);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Group createGroupInstance()
+ {
+ return groupHandler.createGroupInstance();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Group findGroupById(String groupId) throws Exception
+ {
+ Group group = (Group)groupCache.get(groupId);
+ if (group != null)
+ return group;
+
+ group = groupHandler.findGroupById(groupId);
+ if (group != null)
+ groupCache.put(groupId, group);
+
+ return group;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection findGroupByMembership(String userName, String membershipType) throws Exception
+ {
+ Collection<Group> groups = groupHandler.findGroupByMembership(userName, membershipType);
+
+ for (Group group : groups)
+ groupCache.put(group.getId(), groups);
+
+ return groups;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection findGroups(Group parent) throws Exception
+ {
+ Collection<Group> groups = groupHandler.findGroups(parent);
+ for (Group group : groups)
+ groupCache.put(group.getId(), groups);
+
+ return groups;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection findGroupsOfUser(String user) throws Exception
+ {
+ Collection<Group> groups = groupHandler.findGroupsOfUser(user);
+ for (Group group : groups)
+ groupCache.put(group.getId(), groups);
+
+ return groups;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection getAllGroups() throws Exception
+ {
+ Collection<Group> groups = groupHandler.getAllGroups();
+ for (Group group : groups)
+ groupCache.put(group.getId(), groups);
+
+ return groups;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Group removeGroup(Group group, boolean broadcast) throws Exception
+ {
+ Group gr = groupHandler.removeGroup(group, broadcast);
+ if (gr != null)
+ {
+ groupCache.remove(gr.getId());
+
+ List<Membership> memberships = membershipCache.getCachedObjects();
+ for (Membership membership : memberships)
+ {
+ if (membership.getGroupId().equals(gr.getId()))
+ {
+ membershipCache.remove(membership.getId());
+ membershipCache.remove(new MembershipCacheKey(membership));
+ }
+ }
+ }
+
+ return gr;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void saveGroup(Group group, boolean broadcast) throws Exception
+ {
+ groupHandler.saveGroup(group, broadcast);
+ groupCache.put(group.getId(), group);
+ }
+
+}
Property changes on: core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableGroupHandlerImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableMembershipHandlerImpl.java
===================================================================
--- core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableMembershipHandlerImpl.java (rev 0)
+++ core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableMembershipHandlerImpl.java 2009-10-16 08:08:49 UTC (rev 287)
@@ -0,0 +1,208 @@
+/*
+ * Copyright (C) 2003-2009 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.organization.cache;
+
+import com.sun.org.apache.bcel.internal.generic.RETURN;
+
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.organization.Group;
+import org.exoplatform.services.organization.Membership;
+import org.exoplatform.services.organization.MembershipEventListener;
+import org.exoplatform.services.organization.MembershipHandler;
+import org.exoplatform.services.organization.MembershipType;
+import org.exoplatform.services.organization.User;
+import java.util.Collection;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date: 2009
+ *
+ * @author <a href="mailto:anatoliy.bazko@exoplatform.com.ua">Anatoliy Bazko</a>
+ * @version $Id$
+ */
+public class CacheableMembershipHandlerImpl implements MembershipHandler
+{
+
+ private final ExoCache membershipCache;
+
+ private final MembershipHandler membershipHandler;
+
+ /**
+ * CacheableUserHandler constructor.
+ *
+ * @param organizationCacheHandler
+ * - organization cache handler
+ * @param membershipHandler
+ * - membership handler
+ */
+ public CacheableMembershipHandlerImpl(OrganizationCacheHandler organizationCacheHandler,
+ MembershipHandler membershipHandler)
+ {
+ this.membershipCache = organizationCacheHandler.getMembershipCache();
+ this.membershipHandler = membershipHandler;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addMembershipEventListener(MembershipEventListener listener)
+ {
+ membershipHandler.addMembershipEventListener(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void createMembership(Membership m, boolean broadcast) throws Exception
+ {
+ membershipHandler.createMembership(m, broadcast);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Membership createMembershipInstance()
+ {
+ return membershipHandler.createMembershipInstance();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Membership findMembership(String id) throws Exception
+ {
+ Membership membership = (Membership)membershipCache.get(id);
+ if (membership != null)
+ return membership;
+
+ membership = membershipHandler.findMembership(id);
+
+ if (membership != null)
+ {
+ membershipCache.put(membership.getId(), membership);
+ membershipCache.put(new MembershipCacheKey(membership), membership);
+ }
+
+ return membership;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Membership findMembershipByUserGroupAndType(String userName, String groupId, String type) throws Exception
+ {
+ Membership membership = (Membership)membershipCache.get(new MembershipCacheKey(userName, groupId, type));
+ if (membership != null)
+ return membership;
+
+ membership = membershipHandler.findMembershipByUserGroupAndType(userName, groupId, type);
+
+ if (membership != null)
+ {
+ membershipCache.put(membership.getId(), membership);
+ membershipCache.put(new MembershipCacheKey(membership), membership);
+ }
+
+ return membership;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection findMembershipsByGroup(Group group) throws Exception
+ {
+ Collection<Membership> memberships = membershipHandler.findMembershipsByGroup(group);
+ for (Membership membership : memberships)
+ {
+ membershipCache.put(membership.getId(), membership);
+ membershipCache.put(new MembershipCacheKey(membership), membership);
+ }
+
+ return memberships;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection findMembershipsByUser(String userName) throws Exception
+ {
+ Collection<Membership> memberships = membershipHandler.findMembershipsByUser(userName);
+ for (Membership membership : memberships)
+ {
+ membershipCache.put(membership.getId(), membership);
+ membershipCache.put(new MembershipCacheKey(membership), membership);
+ }
+
+ return memberships;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection findMembershipsByUserAndGroup(String userName, String groupId) throws Exception
+ {
+ Collection<Membership> memberships = membershipHandler.findMembershipsByUserAndGroup(userName, groupId);
+ for (Membership membership : memberships)
+ {
+ membershipCache.put(membership.getId(), membership);
+ membershipCache.put(new MembershipCacheKey(membership), membership);
+ }
+
+ return memberships;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void linkMembership(User user, Group group, MembershipType m, boolean broadcast) throws Exception
+ {
+ membershipHandler.linkMembership(user, group, m, broadcast);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Membership removeMembership(String id, boolean broadcast) throws Exception
+ {
+ Membership membership = membershipHandler.removeMembership(id, broadcast);
+ if (membership != null)
+ {
+ membershipCache.remove(membership.getId());
+ membershipCache.remove(new MembershipCacheKey(membership));
+ }
+
+ return membership;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection removeMembershipByUser(String username, boolean broadcast) throws Exception
+ {
+ Collection<Membership> memberships = membershipHandler.removeMembershipByUser(username, broadcast);
+
+ for (Membership membership : memberships)
+ {
+ membershipCache.remove(membership.getId());
+ membershipCache.remove(new MembershipCacheKey(membership));
+ }
+
+ return memberships;
+ }
+
+}
Property changes on: core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableMembershipHandlerImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableMembershipTypeHandlerImpl.java
===================================================================
--- core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableMembershipTypeHandlerImpl.java (rev 0)
+++ core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableMembershipTypeHandlerImpl.java 2009-10-16 08:08:49 UTC (rev 287)
@@ -0,0 +1,145 @@
+/*
+ * Copyright (C) 2003-2009 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.organization.cache;
+
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.organization.Group;
+import org.exoplatform.services.organization.Membership;
+import org.exoplatform.services.organization.MembershipType;
+import org.exoplatform.services.organization.MembershipTypeHandler;
+import org.exoplatform.services.organization.UserHandler;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date: 2009
+ *
+ * @author <a href="mailto:anatoliy.bazko@exoplatform.com.ua">Anatoliy Bazko</a>
+ * @version $Id$
+ */
+public class CacheableMembershipTypeHandlerImpl implements MembershipTypeHandler
+{
+
+ private final ExoCache membershipTypeCache;
+
+ private final ExoCache membershipCache;
+
+ private final MembershipTypeHandler membershipTypeHandler;
+
+ /**
+ * CacheableMembershipTypeHandler constructor.
+ *
+ * @param organizationCacheHandler
+ * - organization cache handler
+ * @param membershipTypeHandler
+ * - membership type handler
+ */
+ public CacheableMembershipTypeHandlerImpl(OrganizationCacheHandler organizationCacheHandler,
+ MembershipTypeHandler membershipTypeHandler)
+ {
+ this.membershipTypeCache = organizationCacheHandler.getMembershipTypeCache();
+ this.membershipCache = organizationCacheHandler.getMembershipCache();
+ this.membershipTypeHandler = membershipTypeHandler;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public MembershipType createMembershipType(MembershipType mt, boolean broadcast) throws Exception
+ {
+ MembershipType membershipType = membershipTypeHandler.createMembershipType(mt, broadcast);
+ membershipTypeCache.put(membershipType.getName(), membershipType);
+
+ return membershipType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public MembershipType createMembershipTypeInstance()
+ {
+ return membershipTypeHandler.createMembershipTypeInstance();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public MembershipType findMembershipType(String name) throws Exception
+ {
+ MembershipType membershipType = (MembershipType)membershipTypeCache.get(name);
+ if (membershipType != null)
+ return membershipType;
+
+ membershipType = membershipTypeHandler.findMembershipType(name);
+ if (membershipType != null)
+ membershipTypeCache.put(name, membershipType);
+
+ return membershipType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection findMembershipTypes() throws Exception
+ {
+
+ Collection<MembershipType> membershipTypes = membershipTypeHandler.findMembershipTypes();
+ for (MembershipType membershipType : membershipTypes)
+ membershipTypeCache.put(membershipType.getName(), membershipType);
+
+ return membershipTypes;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public MembershipType removeMembershipType(String name, boolean broadcast) throws Exception
+ {
+ MembershipType membershipType = membershipTypeHandler.removeMembershipType(name, broadcast);
+ if (membershipType != null)
+ {
+ membershipTypeCache.remove(name);
+
+ List<Membership> memberships = membershipCache.getCachedObjects();
+ for (Membership membership : memberships)
+ {
+ if (membership.getMembershipType().equals(name))
+ {
+ membershipCache.remove(membership.getId());
+ membershipCache.remove(new MembershipCacheKey(membership));
+ }
+ }
+ }
+
+ return membershipType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public MembershipType saveMembershipType(MembershipType mt, boolean broadcast) throws Exception
+ {
+ MembershipType membershipType = membershipTypeHandler.saveMembershipType(mt, broadcast);
+ membershipTypeCache.put(membershipType.getName(), membershipType);
+
+ return membershipType;
+ }
+
+}
Property changes on: core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableMembershipTypeHandlerImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableUserHandlerImpl.java
===================================================================
--- core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableUserHandlerImpl.java (rev 0)
+++ core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableUserHandlerImpl.java 2009-10-16 08:08:49 UTC (rev 287)
@@ -0,0 +1,181 @@
+/*
+ * Copyright (C) 2003-2009 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.organization.cache;
+
+import org.exoplatform.commons.utils.PageList;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.organization.Membership;
+import org.exoplatform.services.organization.Query;
+import org.exoplatform.services.organization.User;
+import org.exoplatform.services.organization.UserEventListener;
+import org.exoplatform.services.organization.UserHandler;
+
+import java.util.List;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date: 2009
+ *
+ * @author <a href="mailto:anatoliy.bazko@exoplatform.com.ua">Anatoliy Bazko</a>
+ * @version $Id$
+ */
+public class CacheableUserHandlerImpl implements UserHandler
+{
+
+ private final ExoCache userCache;
+
+ private final ExoCache userProfileCache;
+
+ private final ExoCache membershipCache;
+
+ private final UserHandler userHandler;
+
+ /**
+ * CacheableUserHandler constructor.
+ *
+ * @param cacheHandler
+ * - cache handler
+ * @param userHandler
+ * - user handler
+ */
+ public CacheableUserHandlerImpl(OrganizationCacheHandler organizationCacheHandler, UserHandler userHandler)
+ {
+ this.userCache = organizationCacheHandler.getUserCache();
+ this.userProfileCache = organizationCacheHandler.getUserProfileCache();
+ this.membershipCache = organizationCacheHandler.getMembershipCache();
+ this.userHandler = userHandler;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addUserEventListener(UserEventListener listener)
+ {
+ userHandler.addUserEventListener(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean authenticate(String username, String password) throws Exception
+ {
+ boolean authenticated = userHandler.authenticate(username, password);
+ userCache.remove(username);
+
+ return authenticated;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void createUser(User user, boolean broadcast) throws Exception
+ {
+ userHandler.createUser(user, broadcast);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public User createUserInstance()
+ {
+ return userHandler.createUserInstance();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public User createUserInstance(String username)
+ {
+ return userHandler.createUserInstance(username);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public User findUserByName(String userName) throws Exception
+ {
+ User user = (User)userCache.get(userName);
+ if (user != null)
+ return user;
+
+ user = userHandler.findUserByName(userName);
+ if (user != null)
+ userCache.put(userName, user);
+
+ return user;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public PageList findUsers(Query query) throws Exception
+ {
+ return userHandler.findUsers(query);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public PageList findUsersByGroup(String groupId) throws Exception
+ {
+ return userHandler.findUsersByGroup(groupId);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public PageList getUserPageList(int pageSize) throws Exception
+ {
+ return userHandler.getUserPageList(pageSize);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public User removeUser(String userName, boolean broadcast) throws Exception
+ {
+ User user = userHandler.removeUser(userName, broadcast);
+ if (user != null)
+ {
+ userCache.remove(userName);
+ userProfileCache.remove(userName);
+
+ List<Membership> memberships = membershipCache.getCachedObjects();
+ for (Membership membership : memberships)
+ {
+ if (membership.getUserName().equals(userName))
+ {
+ membershipCache.remove(membership.getId());
+ membershipCache.remove(new MembershipCacheKey(membership));
+ }
+ }
+ }
+
+ return user;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void saveUser(User user, boolean broadcast) throws Exception
+ {
+ userHandler.saveUser(user, broadcast);
+ userCache.put(user.getUserName(), user);
+ }
+
+}
Property changes on: core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableUserHandlerImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableUserProfileHandlerImpl.java
===================================================================
--- core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableUserProfileHandlerImpl.java (rev 0)
+++ core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableUserProfileHandlerImpl.java 2009-10-16 08:08:49 UTC (rev 287)
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2003-2009 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.organization.cache;
+
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.organization.UserHandler;
+import org.exoplatform.services.organization.UserProfile;
+import org.exoplatform.services.organization.UserProfileEventListener;
+import org.exoplatform.services.organization.UserProfileHandler;
+
+import java.util.Collection;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date: 2009
+ *
+ * @author <a href="mailto:anatoliy.bazko@exoplatform.com.ua">Anatoliy Bazko</a>
+ * @version $Id$
+ */
+public class CacheableUserProfileHandlerImpl implements UserProfileHandler
+{
+
+ private final ExoCache userProfileCache;
+
+ private final UserProfileHandler userProfileHandler;
+
+ /**
+ * CacheableUserHandler constructor.
+ *
+ * @param organizationCacheHandler
+ * - organization cache handler
+ * @param userProfileHandler
+ * - user profile handler
+ */
+ public CacheableUserProfileHandlerImpl(OrganizationCacheHandler organizationCacheHandler,
+ UserProfileHandler userProfileHandler)
+ {
+ this.userProfileCache = organizationCacheHandler.getUserProfileCache();
+ this.userProfileHandler = userProfileHandler;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void addUserProfileEventListener(UserProfileEventListener listener)
+ {
+ userProfileHandler.addUserProfileEventListener(listener);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public UserProfile createUserProfileInstance()
+ {
+ return userProfileHandler.createUserProfileInstance();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public UserProfile createUserProfileInstance(String userName)
+ {
+ return userProfileHandler.createUserProfileInstance(userName);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public UserProfile findUserProfileByName(String userName) throws Exception
+ {
+ UserProfile userProfile = (UserProfile)userProfileCache.get(userName);
+ if (userProfile != null)
+ return userProfile;
+
+ userProfile = userProfileHandler.findUserProfileByName(userName);
+ if (userProfile != null)
+ userProfileCache.put(userName, userProfile);
+
+ return userProfile;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Collection findUserProfiles() throws Exception
+ {
+ Collection<UserProfile> userProfiles = userProfileHandler.findUserProfiles();
+ for (UserProfile userProfile : userProfiles)
+ userProfileCache.put(userProfile.getUserName(), userProfile);
+
+ return userProfiles;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public UserProfile removeUserProfile(String userName, boolean broadcast) throws Exception
+ {
+ UserProfile userProfile = userProfileHandler.removeUserProfile(userName, broadcast);
+ if (userProfile != null)
+ userProfileCache.remove(userName);
+
+ return userProfile;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void saveUserProfile(UserProfile profile, boolean broadcast) throws Exception
+ {
+ userProfileHandler.saveUserProfile(profile, broadcast);
+ userProfileCache.put(profile.getUserName(), profile);
+ }
+
+}
Property changes on: core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/CacheableUserProfileHandlerImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/MembershipCacheKey.java
===================================================================
--- core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/MembershipCacheKey.java (rev 0)
+++ core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/MembershipCacheKey.java 2009-10-16 08:08:49 UTC (rev 287)
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2003-2009 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.organization.cache;
+
+import org.exoplatform.services.organization.Membership;
+
+import java.io.Serializable;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date: 2009
+ *
+ * @author <a href="mailto:anatoliy.bazko@exoplatform.com.ua">Anatoliy Bazko</a>
+ * @version $Id$
+ */
+/**
+ * Will be used as key for cacheMembership.
+ */
+public class MembershipCacheKey implements Serializable
+{
+ /**
+ * serialVersionUID.
+ */
+ private static final long serialVersionUID = -188435911917156440L;
+
+ private final String userName;
+
+ private final String groupId;
+
+ private final String type;
+
+ private final int hashcode;
+
+ public MembershipCacheKey(String userName, String groupId, String type)
+ {
+ this.userName = userName;
+ this.groupId = groupId;
+ this.type = type;
+
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((groupId == null) ? 0 : groupId.hashCode());
+ result = prime * result + ((type == null) ? 0 : type.hashCode());
+ hashcode = prime * result + ((userName == null) ? 0 : userName.hashCode());
+ }
+
+ public MembershipCacheKey(Membership m)
+ {
+ this.userName = m.getUserName();
+ this.groupId = m.getGroupId();
+ this.type = m.getMembershipType();
+
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((groupId == null) ? 0 : groupId.hashCode());
+ result = prime * result + ((type == null) ? 0 : type.hashCode());
+ hashcode = prime * result + ((userName == null) ? 0 : userName.hashCode());
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return hashcode;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ MembershipCacheKey other = (MembershipCacheKey)obj;
+ if (groupId == null)
+ {
+ if (other.groupId != null)
+ return false;
+ }
+ else if (!groupId.equals(other.groupId))
+ return false;
+ if (type == null)
+ {
+ if (other.type != null)
+ return false;
+ }
+ else if (!type.equals(other.type))
+ return false;
+ if (userName == null)
+ {
+ if (other.userName != null)
+ return false;
+ }
+ else if (!userName.equals(other.userName))
+ return false;
+ return true;
+ }
+
+}
\ No newline at end of file
Property changes on: core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/MembershipCacheKey.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/OrganizationCacheHandler.java
===================================================================
--- core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/OrganizationCacheHandler.java (rev 0)
+++ core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/OrganizationCacheHandler.java 2009-10-16 08:08:49 UTC (rev 287)
@@ -0,0 +1,146 @@
+/*
+ * Copyright (C) 2003-2009 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.organization.cache;
+
+import org.exoplatform.services.cache.CacheService;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.organization.impl.GroupImpl;
+import org.exoplatform.services.organization.impl.MembershipImpl;
+import org.exoplatform.services.organization.impl.MembershipTypeImpl;
+import org.exoplatform.services.organization.impl.UserImpl;
+import org.exoplatform.services.organization.impl.UserProfileImpl;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date: 2009
+ *
+ * @author <a href="mailto:anatoliy.bazko@exoplatform.com.ua">Anatoliy Bazko</a>
+ * @version $Id$
+ */
+public class OrganizationCacheHandler
+{
+
+ /**
+ * Use cache.
+ */
+ private final ExoCache userCache;
+
+ /**
+ * User profile cache.
+ */
+ private final ExoCache userProfileCache;
+
+ /**
+ * Membership cache.
+ */
+ private final ExoCache membershipCache;
+
+ /**
+ * Membership type cache.
+ */
+ private final ExoCache membershipTypeCache;
+
+ /**
+ * Group cache.
+ */
+ private final ExoCache groupCache;
+
+ /**
+ * OrganizationCacheHandler constructor.
+ *
+ * @param cservice
+ * cache service
+ */
+ public OrganizationCacheHandler(CacheService cservice)
+ {
+ userCache = cservice.getCacheInstance(UserImpl.class.getName());
+ userProfileCache = cservice.getCacheInstance(UserProfileImpl.class.getName());
+ membershipCache = cservice.getCacheInstance(MembershipImpl.class.getName());
+ membershipTypeCache = cservice.getCacheInstance(MembershipTypeImpl.class.getName());
+ groupCache = cservice.getCacheInstance(GroupImpl.class.getName());
+ }
+
+ /**
+ * OrganizationCacheHandler constructor.
+ *
+ * @param cservice
+ * cache service
+ * @param lifeTime
+ * lifetime cache param
+ */
+ public OrganizationCacheHandler(CacheService cservice, long lifeTime)
+ {
+ this(cservice);
+
+ userCache.setLiveTime(lifeTime);
+ userProfileCache.setLiveTime(lifeTime);
+ membershipCache.setLiveTime(lifeTime);
+ membershipTypeCache.setLiveTime(lifeTime);
+ groupCache.setLiveTime(lifeTime);
+ }
+
+ /**
+ * Returns user profile cache.
+ *
+ * @return user profile cache
+ */
+ public ExoCache getUserProfileCache()
+ {
+ return userProfileCache;
+ }
+
+ /**
+ * Returns user cache.
+ *
+ * @return user cache
+ */
+ public ExoCache getUserCache()
+ {
+ return userCache;
+ }
+
+ /**
+ * Returns membership type cache.
+ *
+ * @return membership type cache
+ */
+ public ExoCache getMembershipTypeCache()
+ {
+ return membershipTypeCache;
+ }
+
+ /**
+ * Returns membership cache.
+ *
+ * @return membership cache
+ */
+ public ExoCache getMembershipCache()
+ {
+ return membershipCache;
+ }
+
+ /**
+ * Returns group cache.
+ *
+ * @return group cache
+ */
+ public ExoCache getGroupCache()
+ {
+ return groupCache;
+ }
+}
Property changes on: core/trunk/component/organization/api/src/main/java/org/exoplatform/services/organization/cache/OrganizationCacheHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
14 years, 8 months
exo-jcr SVN: r285 - in ws/branches/2.2.x: rest/core and 25 other directories.
by do-not-reply@jboss.org
Author: aparfonov
Date: 2009-10-15 12:21:30 -0400 (Thu, 15 Oct 2009)
New Revision: 285
Added:
ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/ext/method/MethodInvokerFilterComponentPlugin.java
ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/ExoContainerDependencyInjector.java
ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/RestInitializer.java
ws/branches/2.2.x/rest/ext/src/test/java/conf/
ws/branches/2.2.x/rest/ext/src/test/java/conf/standalone/
ws/branches/2.2.x/rest/ext/src/test/java/conf/standalone/test-configuration.xml
ws/branches/2.2.x/rest/ext/src/test/java/org/exoplatform/services/rest/BaseTest.java
Removed:
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RequestFilterComponentPlugin.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ResponseFilterComponentPlugin.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/MethodInvokerFilterComponentPlugin.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/EntityProviderComponentPlugin.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBContextComponentPlugin.java
Modified:
ws/branches/2.2.x/pom.xml
ws/branches/2.2.x/rest/core/pom.xml
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ApplicationContext.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Connector.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ConstructorDescriptor.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ConstructorParameter.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ContainerResponseWriter.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ExtHttpHeaders.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ExtMultivaluedMap.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/FieldInjector.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Filter.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/FilterDescriptor.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/GenericContainerRequest.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/GenericContainerResponse.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ObjectFactory.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ObjectModel.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Parameter.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/PerRequestObjectFactory.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/RequestFilter.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/RequestHandler.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ResponseFilter.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/SingletonObjectFactory.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/header/AbstractHeaderDelegate.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/header/QualityValue.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ApplicationContextImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/BaseResourceBinder.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ConstructorDescriptorImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ConstructorParameterImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ContainerRequest.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ContainerResponse.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/EnvironmentContext.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/FieldInjectorImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/FilterDescriptorImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/InputHeadersMap.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/InternalException.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/MultivaluedMapImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/OutputHeadersMap.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ProviderBinder.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RequestDispatcher.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RequestHandlerImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ResponseImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RuntimeDelegateImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/SimpleDependencyInjector.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/UnhandledException.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/VariantListBuilderImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/VariantsHandler.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptLanguage.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptLanguageHeaderDelegate.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptMediaType.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptMediaTypeHeaderDelegate.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptToken.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/CacheControlHeaderDelegate.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/CookieHeaderDelegate.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/DateHeaderDelegate.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/EntityTagHeaderDelegate.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/HeaderHelper.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/HeaderParameterParser.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/Language.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/ListHeaderProducer.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/LocaleHeaderDelegate.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/MediaTypeHeaderDelegate.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/MediaTypeHelper.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/NewCookieHeaderDelegate.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/StringHeaderDelegate.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/Token.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/URIHeaderDelegate.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/BaseCollectionProducer.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/BaseTypeProducer.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CollectionStringConstructorProducer.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CollectionStringProducer.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CollectionStringValueOfProducer.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ContextParameterResolver.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CookieParameterResolver.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/DefaultMethodInvoker.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/FormParameterResolver.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/HeaderParameterResolver.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/MatrixParameterResolver.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/MethodParameterImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/OptionsRequestMethodInvoker.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterHelper.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterResolver.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterResolverFactory.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/PathParameterResolver.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/PrimitiveTypeProducer.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/QueryParameterResolver.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/StringConstructorProducer.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/StringProducer.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/StringValueOfProducer.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/ByteEntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/DOMSourceEntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/DataSourceEntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/FileEntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/IOHelper.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/InputStreamEntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBContextResolver.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBElementEntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBObjectEntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JsonEntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/MultipartFormDataEntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/MultivaluedMapEntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/ProviderDescriptorImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/ReaderEntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/SAXSourceEntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/StreamOutputEntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/StreamSourceEntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/StringEntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/AbstractResourceDescriptorImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/OptionsRequestResourceMethodDescriptorImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/PathValue.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/ResourceDescriptorValidator.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/ResourceMethodDescriptorImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/SubResourceLocatorDescriptorImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/SubResourceMethodDescriptorImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/uri/PathSegmentImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/uri/UriBuilderImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/uri/UriComponent.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/MethodInvoker.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/MethodInvokerFilter.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/MethodParameter.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/TypeProducer.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/provider/EntityProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/provider/ProviderDescriptor.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/AbstractResourceDescriptor.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/GenericMethodResource.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceContainer.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceDescriptor.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceDescriptorVisitor.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceMethodDescriptor.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceMethodMap.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceLocatorDescriptor.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceLocatorMap.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceMethodDescriptor.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceMethodMap.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/RestEncodingFilter.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/ServletContainerRequest.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/tools/ByteArrayContainerResponseWriter.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/tools/DummyContainerResponseWriter.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/uri/UriPattern.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/uri/UriTemplateParser.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/util/MediaTypeMap.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/util/MediaTypeMultivaluedMap.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/util/UriPatternMap.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/wadl/BaseWadlGeneratorImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/wadl/WadlGenerator.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/wadl/WadlProcessor.java
ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/BaseTest.java
ws/branches/2.2.x/rest/ext/pom.xml
ws/branches/2.2.x/rest/ext/src/main/java/conf/portal/configuration.xml
ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/ExoContainerResourceBinder.java
Log:
EXOJCR-185 :
Modified: ws/branches/2.2.x/pom.xml
===================================================================
--- ws/branches/2.2.x/pom.xml 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/pom.xml 2009-10-15 16:21:30 UTC (rev 285)
@@ -85,6 +85,16 @@
</dependency>
<dependency>
<groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <version>${org.exoplatform.kernel.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ <version>${org.exoplatform.kernel.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.common</artifactId>
<version>${org.exoplatform.kernel.version}</version>
</dependency>
@@ -140,6 +150,16 @@
<artifactId>jsr250-api</artifactId>
<version>1.0</version>
</dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <version>1.4</version>
+ </dependency>
</dependencies>
</dependencyManagement>
Modified: ws/branches/2.2.x/rest/core/pom.xml
===================================================================
--- ws/branches/2.2.x/rest/core/pom.xml 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/pom.xml 2009-10-15 16:21:30 UTC (rev 285)
@@ -33,13 +33,9 @@
<name>eXo WS :: REST :: Core</name>
<dependencies>
- <!--dependency>
+ <dependency>
<groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.component.common</artifactId>
- </dependency-->
- <dependency>
- <groupId>org.exoplatform.core</groupId>
- <artifactId>exo.core.component.xml-processing</artifactId>
+ <artifactId>exo.kernel.commons</artifactId>
</dependency>
<dependency>
<groupId>org.exoplatform.ws</groupId>
@@ -72,9 +68,13 @@
<artifactId>commons-fileupload</artifactId>
</dependency>
<dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </dependency>
</dependencies>
<build>
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ApplicationContext.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ApplicationContext.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ApplicationContext.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -35,7 +35,7 @@
* information.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface ApplicationContext extends UriInfo, InitialProperties
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ApplicationContext.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Connector.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Connector.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Connector.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -30,7 +30,7 @@
* request."
*
* @author Gennady Azarenkov
- * @version $Id: $
+ * @version $Id$
*/
public interface Connector
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Connector.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ConstructorDescriptor.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ConstructorDescriptor.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ConstructorDescriptor.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -28,7 +28,7 @@
* type is used in per-request lifecycle.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface ConstructorDescriptor extends ResourceDescriptor
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ConstructorDescriptor.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ConstructorParameter.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ConstructorParameter.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ConstructorParameter.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -22,7 +22,7 @@
* Constructor parameter.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface ConstructorParameter extends Parameter
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ConstructorParameter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ContainerResponseWriter.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ContainerResponseWriter.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ContainerResponseWriter.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -27,7 +27,7 @@
* container response, e. g. servlet response.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface ContainerResponseWriter
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ContainerResponseWriter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ExtHttpHeaders.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ExtHttpHeaders.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ExtHttpHeaders.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -22,7 +22,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface ExtHttpHeaders extends HttpHeaders
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ExtHttpHeaders.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ExtMultivaluedMap.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ExtMultivaluedMap.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ExtMultivaluedMap.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -30,7 +30,7 @@
* @param <V> value
* @see #getList(Object)
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface ExtMultivaluedMap<K, V> extends MultivaluedMap<K, V>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ExtMultivaluedMap.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/FieldInjector.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/FieldInjector.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/FieldInjector.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
* per-request mode.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface FieldInjector extends Parameter, ResourceDescriptor
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/FieldInjector.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Filter.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Filter.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Filter.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -36,7 +36,7 @@
* @see ResponseFilter
* @see MethodInvokerFilter
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Filter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/FilterDescriptor.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/FilterDescriptor.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/FilterDescriptor.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -31,7 +31,7 @@
* @see ResponseFilter
* @see MethodInvokerFilter
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface FilterDescriptor extends ResourceDescriptor, ObjectModel
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/FilterDescriptor.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/GenericContainerRequest.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/GenericContainerRequest.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/GenericContainerRequest.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -29,7 +29,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface GenericContainerRequest extends Request, SecurityContext, ExtHttpHeaders
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/GenericContainerRequest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/GenericContainerResponse.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/GenericContainerResponse.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/GenericContainerResponse.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -27,7 +27,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface GenericContainerResponse
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/GenericContainerResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ObjectFactory.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ObjectFactory.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ObjectFactory.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
* @param <T> ObjectModel extensions
* @see ObjectModel
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface ObjectFactory<T extends ObjectModel>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ObjectModel.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ObjectModel.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ObjectModel.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
* Abstract description of object.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface ObjectModel
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ObjectModel.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Parameter.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Parameter.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Parameter.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
* Abstraction of method's, constructor's parameter or object field.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface Parameter
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Parameter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/PerRequestObjectFactory.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/PerRequestObjectFactory.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/PerRequestObjectFactory.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
* @param <T> ObjectModel extensions
* @see ObjectModel
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class PerRequestObjectFactory<T extends ObjectModel> implements ObjectFactory<T>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/PerRequestObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/RequestFilter.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/RequestFilter.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/RequestFilter.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
* wrong parameters.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface RequestFilter
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/RequestFilter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/RequestHandler.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/RequestHandler.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/RequestHandler.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -23,7 +23,7 @@
* control main components of JAX-RS implementation.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface RequestHandler
{
@@ -46,6 +46,13 @@
public static final int WS_RS_BUFFER_SIZE_VALUE = 204800;
/**
+ * Get {@link ResourceBinder}.
+ *
+ * @return ResourceBinder
+ */
+ ResourceBinder getResourceBinder();
+
+ /**
* Handle the HTTP request by dispatching request to appropriate resource. If
* no one appropriate resource found then error response will be produced.
*
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/RequestHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ResponseFilter.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ResponseFilter.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ResponseFilter.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
* not be used directly, it is part of REST framework.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface ResponseFilter
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ResponseFilter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/SingletonObjectFactory.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/SingletonObjectFactory.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/SingletonObjectFactory.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -22,7 +22,7 @@
* Provide object instance of components that support singleton lifecycle.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
* @param <T>
*/
public class SingletonObjectFactory<T extends ObjectModel> implements ObjectFactory<T>
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/SingletonObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/header/AbstractHeaderDelegate.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/header/AbstractHeaderDelegate.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/header/AbstractHeaderDelegate.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -22,7 +22,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
* @param <T> Java type for representing HTTP header
*/
public abstract class AbstractHeaderDelegate<T> implements HeaderDelegate<T>
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/header/AbstractHeaderDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/header/QualityValue.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/header/QualityValue.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/header/QualityValue.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
* {@link <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1">HTTP/1.1 documentation</a>}.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface QualityValue
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/header/QualityValue.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ApplicationContextImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ApplicationContextImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ApplicationContextImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -41,7 +41,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class ApplicationContextImpl implements ApplicationContext
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ApplicationContextImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/BaseResourceBinder.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/BaseResourceBinder.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/BaseResourceBinder.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -100,14 +100,12 @@
private int size = 0;
- /**
- * @see RuntimeDelegate
- */
- private final RuntimeDelegate rd;
-
public BaseResourceBinder()
{
- rd = new RuntimeDelegateImpl();
+ // Initialize RuntimeDelegate instance
+ // This is first component in life cycle what needs.
+ // TODO better solution to initialize RuntimeDelegate
+ RuntimeDelegate rd = new RuntimeDelegateImpl();
RuntimeDelegate.setInstance(rd);
}
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ConstructorDescriptorImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ConstructorDescriptorImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ConstructorDescriptorImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -48,7 +48,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class ConstructorDescriptorImpl implements ConstructorDescriptor
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ConstructorDescriptorImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ConstructorParameterImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ConstructorParameterImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ConstructorParameterImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -27,7 +27,7 @@
* Describes constructor's parameter.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class ConstructorParameterImpl implements ConstructorParameter
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ConstructorParameterImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ContainerRequest.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ContainerRequest.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ContainerRequest.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -46,7 +46,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class ContainerRequest implements GenericContainerRequest
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ContainerRequest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ContainerResponse.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ContainerResponse.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ContainerResponse.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -40,7 +40,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class ContainerResponse implements GenericContainerResponse
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ContainerResponse.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/EnvironmentContext.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/EnvironmentContext.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/EnvironmentContext.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
* in resource. Parameter must be annotated by {@link javax.ws.rs.core.Context}.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class EnvironmentContext extends HashMap<Class<?>, Object>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/EnvironmentContext.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/FieldInjectorImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/FieldInjectorImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/FieldInjectorImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -43,7 +43,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class FieldInjectorImpl implements FieldInjector
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/FieldInjectorImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/FilterDescriptorImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/FilterDescriptorImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/FilterDescriptorImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -35,7 +35,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class FilterDescriptorImpl implements FilterDescriptor
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/FilterDescriptorImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/InputHeadersMap.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/InputHeadersMap.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/InputHeadersMap.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -34,7 +34,7 @@
* Read only case insensitive {@link MultivaluedMap}.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
// TODO this implementation is not efficient, probably can be better extend
// java.util.AbstractMap
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/InputHeadersMap.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/InternalException.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/InternalException.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/InternalException.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
* used as wrapper for exception that may occur during request processing.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class InternalException extends RuntimeException
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/InternalException.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/MultivaluedMapImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/MultivaluedMapImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/MultivaluedMapImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -27,7 +27,7 @@
/**
* @see javax.ws.rs.core.MultivaluedMap
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class MultivaluedMapImpl extends HashMap<String, List<String>> implements ExtMultivaluedMap<String, String>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/MultivaluedMapImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/OutputHeadersMap.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/OutputHeadersMap.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/OutputHeadersMap.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -29,7 +29,7 @@
* Case insensitive {@link MultivaluedMap}.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
//TODO this implementation is not efficient, probably can be better extend
//java.util.AbstractMap
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/OutputHeadersMap.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ProviderBinder.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ProviderBinder.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ProviderBinder.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -72,7 +72,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class ProviderBinder implements Providers
{
@@ -178,7 +178,7 @@
addMessageBodyReader(MultipartFormDataEntityProvider.class);
// JAXB context
- addContextResolver(JAXBContextResolver.class);
+ addContextResolver(new JAXBContextResolver());
}
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ProviderBinder.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RequestDispatcher.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RequestDispatcher.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RequestDispatcher.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -57,7 +57,7 @@
* Lookup resource which can serve request.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class RequestDispatcher
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RequestDispatcher.java
___________________________________________________________________
Name: svn:keywords
+ Id
Deleted: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RequestFilterComponentPlugin.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RequestFilterComponentPlugin.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RequestFilterComponentPlugin.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -1,87 +0,0 @@
-/*
- * 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
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.rest.impl;
-
-import org.exoplatform.container.component.BaseComponentPlugin;
-import org.exoplatform.container.xml.InitParams;
-import org.exoplatform.container.xml.ValueParam;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.exoplatform.services.rest.RequestFilter;
-import org.exoplatform.services.rest.RequestHandler;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * For injection {@link RequestFilter} in {@link RequestHandler} at startup.
- *
- * @see RequestHandlerImpl
- * @see RequestFilter
- * @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
- */
-public class RequestFilterComponentPlugin extends BaseComponentPlugin
-{
-
- /**
- * Logger.
- */
- private static final Log LOG = ExoLogger.getLogger(RequestFilterComponentPlugin.class.getName());
-
- /**
- * See {@link RequestFilter}.
- */
- private Set<Class<? extends RequestFilter>> fs = new HashSet<Class<? extends RequestFilter>>();
-
- /**
- * @param params initialize parameters from configuration.
- * @see InitParams
- */
- @SuppressWarnings("unchecked")
- public RequestFilterComponentPlugin(InitParams params)
- {
- if (params != null)
- {
- Iterator<ValueParam> i = params.getValueParamIterator();
- while (i.hasNext())
- {
- ValueParam v = i.next();
- try
- {
- fs.add((Class<? extends RequestFilter>)Class.forName(v.getValue()));
- }
- catch (ClassNotFoundException e)
- {
- LOG.error("Failed load class " + v.getValue(), e);
- }
- }
- }
- }
-
- /**
- * @return Collection of classes RequestFilter supplied in configuration.
- */
- public Set<Class<? extends RequestFilter>> getFilters()
- {
- return fs;
- }
-
-}
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RequestHandlerImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RequestHandlerImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RequestHandlerImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -45,7 +45,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class RequestHandlerImpl implements RequestHandler
{
@@ -116,13 +116,6 @@
private final DependencyInjector depInjector;
-// public RequestHandlerImpl(DependencyInjector depInjector)
-// {
-// this.binder = new BaseResourceBinder();
-// this.dispatcher = new RequestDispatcher(binder);
-// this.depInjector = depInjector;
-// }
-
public RequestHandlerImpl(ResourceBinder binder, DependencyInjector depInjector)
{
this.binder = binder;
@@ -130,7 +123,10 @@
this.depInjector = depInjector;
}
- public ResourceBinder getBinder()
+ /**
+ * {@inheritDoc}
+ */
+ public ResourceBinder getResourceBinder()
{
return binder;
}
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RequestHandlerImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Deleted: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ResponseFilterComponentPlugin.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ResponseFilterComponentPlugin.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ResponseFilterComponentPlugin.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -1,85 +0,0 @@
-/*
- * 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
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.rest.impl;
-
-import org.exoplatform.container.component.BaseComponentPlugin;
-import org.exoplatform.container.xml.InitParams;
-import org.exoplatform.container.xml.ValueParam;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.exoplatform.services.rest.RequestHandler;
-import org.exoplatform.services.rest.ResponseFilter;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * For injection {@link ResponseFilter} in {@link RequestHandler} at startup.
- *
- * @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
- */
-public class ResponseFilterComponentPlugin extends BaseComponentPlugin
-{
-
- /**
- * Logger.
- */
- private static final Log LOG = ExoLogger.getLogger(RequestFilterComponentPlugin.class.getName());
-
- /**
- * See {@link ResponseFilter}.
- */
- private Set<Class<? extends ResponseFilter>> fs = new HashSet<Class<? extends ResponseFilter>>();
-
- /**
- * @param params initialize parameters from configurations
- * @see InitParams
- */
- @SuppressWarnings("unchecked")
- public ResponseFilterComponentPlugin(InitParams params)
- {
- if (params != null)
- {
- Iterator<ValueParam> i = params.getValueParamIterator();
- while (i.hasNext())
- {
- ValueParam v = i.next();
- try
- {
- fs.add((Class<? extends ResponseFilter>)Class.forName(v.getValue()));
- }
- catch (ClassNotFoundException e)
- {
- LOG.error("Failed load class " + v.getValue(), e);
- }
- }
- }
- }
-
- /**
- * @return Collection of classes ResponseFilter supplied in configuration.
- */
- public Set<Class<? extends ResponseFilter>> getFilters()
- {
- return fs;
- }
-
-}
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ResponseImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ResponseImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ResponseImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -38,7 +38,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class ResponseImpl extends Response
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ResponseImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RuntimeDelegateImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RuntimeDelegateImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RuntimeDelegateImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -52,7 +52,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class RuntimeDelegateImpl extends RuntimeDelegate
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/RuntimeDelegateImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/SimpleDependencyInjector.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/SimpleDependencyInjector.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/SimpleDependencyInjector.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
/**
* @author <a href="mailto:andrey.parfonov@exoplatform.com">Andrey Parfonov</a>
- * @version $Id: SimpleDependencyInjector.java 275 2009-10-13 16:17:02Z aparfonov $
+ * @version $Id$
*/
public class SimpleDependencyInjector extends HashMap<Class<?>, Object> implements DependencyInjector
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/SimpleDependencyInjector.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/UnhandledException.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/UnhandledException.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/UnhandledException.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
* container (e.g. Servlet Container)
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class UnhandledException extends RuntimeException
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/UnhandledException.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/VariantListBuilderImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/VariantListBuilderImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/VariantListBuilderImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -31,7 +31,7 @@
* See {@link VariantListBuilder}.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class VariantListBuilderImpl extends VariantListBuilder
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/VariantListBuilderImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/VariantsHandler.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/VariantsHandler.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/VariantsHandler.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -35,7 +35,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class VariantsHandler
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/VariantsHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptLanguage.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptLanguage.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptLanguage.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -27,7 +27,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class AcceptLanguage extends Language implements QualityValue
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptLanguage.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptLanguageHeaderDelegate.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptLanguageHeaderDelegate.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptLanguageHeaderDelegate.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -27,7 +27,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class AcceptLanguageHeaderDelegate extends AbstractHeaderDelegate<AcceptLanguage>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptLanguageHeaderDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptMediaType.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptMediaType.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptMediaType.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -28,7 +28,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class AcceptMediaType extends MediaType implements QualityValue
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptMediaType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptMediaTypeHeaderDelegate.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptMediaTypeHeaderDelegate.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptMediaTypeHeaderDelegate.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class AcceptMediaTypeHeaderDelegate extends AbstractHeaderDelegate<AcceptMediaType>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptMediaTypeHeaderDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptToken.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptToken.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptToken.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -22,7 +22,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class AcceptToken extends Token implements QualityValue
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/AcceptToken.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/CacheControlHeaderDelegate.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/CacheControlHeaderDelegate.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/CacheControlHeaderDelegate.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -27,7 +27,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class CacheControlHeaderDelegate extends AbstractHeaderDelegate<CacheControl>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/CacheControlHeaderDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/CookieHeaderDelegate.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/CookieHeaderDelegate.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/CookieHeaderDelegate.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -26,7 +26,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class CookieHeaderDelegate extends AbstractHeaderDelegate<Cookie>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/CookieHeaderDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/DateHeaderDelegate.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/DateHeaderDelegate.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/DateHeaderDelegate.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class DateHeaderDelegate extends AbstractHeaderDelegate<Date>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/DateHeaderDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/EntityTagHeaderDelegate.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/EntityTagHeaderDelegate.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/EntityTagHeaderDelegate.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class EntityTagHeaderDelegate extends AbstractHeaderDelegate<EntityTag>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/EntityTagHeaderDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/HeaderHelper.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/HeaderHelper.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/HeaderHelper.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -43,7 +43,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class HeaderHelper
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/HeaderHelper.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/HeaderParameterParser.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/HeaderParameterParser.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/HeaderParameterParser.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class HeaderParameterParser
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/HeaderParameterParser.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/Language.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/Language.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/Language.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -27,7 +27,7 @@
* Reflection for HTTP language tag.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class Language
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/Language.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/ListHeaderProducer.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/ListHeaderProducer.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/ListHeaderProducer.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -29,7 +29,7 @@
* parsing 'accept' and 'accept-language' headers.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
* @param <T> type that implements {@link QualityValue}
*/
public abstract class ListHeaderProducer<T extends QualityValue>
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/ListHeaderProducer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/LocaleHeaderDelegate.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/LocaleHeaderDelegate.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/LocaleHeaderDelegate.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class LocaleHeaderDelegate extends AbstractHeaderDelegate<Locale>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/LocaleHeaderDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/MediaTypeHeaderDelegate.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/MediaTypeHeaderDelegate.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/MediaTypeHeaderDelegate.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -28,7 +28,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class MediaTypeHeaderDelegate extends AbstractHeaderDelegate<MediaType>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/MediaTypeHeaderDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/MediaTypeHelper.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/MediaTypeHelper.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/MediaTypeHelper.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -32,7 +32,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class MediaTypeHelper
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/MediaTypeHelper.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/NewCookieHeaderDelegate.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/NewCookieHeaderDelegate.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/NewCookieHeaderDelegate.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class NewCookieHeaderDelegate extends AbstractHeaderDelegate<NewCookie>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/NewCookieHeaderDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/StringHeaderDelegate.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/StringHeaderDelegate.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/StringHeaderDelegate.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -22,7 +22,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class StringHeaderDelegate extends AbstractHeaderDelegate<String>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/StringHeaderDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/Token.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/Token.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/Token.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -23,7 +23,7 @@
* {@link HeaderHelper#isToken(String)} . Token is separated by ','
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class Token
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/Token.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/URIHeaderDelegate.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/URIHeaderDelegate.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/URIHeaderDelegate.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class URIHeaderDelegate extends AbstractHeaderDelegate<URI>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/header/URIHeaderDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/BaseCollectionProducer.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/BaseCollectionProducer.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/BaseCollectionProducer.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -32,7 +32,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public abstract class BaseCollectionProducer implements TypeProducer
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/BaseCollectionProducer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/BaseTypeProducer.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/BaseTypeProducer.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/BaseTypeProducer.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -26,7 +26,7 @@
* Abstraction for single (not for collections) types.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public abstract class BaseTypeProducer implements TypeProducer
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/BaseTypeProducer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CollectionStringConstructorProducer.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CollectionStringConstructorProducer.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CollectionStringConstructorProducer.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
* single String argument.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class CollectionStringConstructorProducer extends BaseCollectionProducer
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CollectionStringConstructorProducer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CollectionStringProducer.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CollectionStringProducer.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CollectionStringProducer.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -22,7 +22,7 @@
* Produce collections each element of it is String.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class CollectionStringProducer extends BaseCollectionProducer
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CollectionStringProducer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CollectionStringValueOfProducer.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CollectionStringValueOfProducer.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CollectionStringValueOfProducer.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
* <code>valueOf</code> with single String argument.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class CollectionStringValueOfProducer extends BaseCollectionProducer
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CollectionStringValueOfProducer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ContextParameterResolver.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ContextParameterResolver.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ContextParameterResolver.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -34,7 +34,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class ContextParameterResolver extends ParameterResolver<Context>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ContextParameterResolver.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CookieParameterResolver.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CookieParameterResolver.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CookieParameterResolver.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class CookieParameterResolver extends ParameterResolver<CookieParam>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/CookieParameterResolver.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/DefaultMethodInvoker.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/DefaultMethodInvoker.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/DefaultMethodInvoker.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -46,7 +46,7 @@
* Invoker for Resource Method, Sub-Resource Method and SubResource Locator.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class DefaultMethodInvoker implements MethodInvoker
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/DefaultMethodInvoker.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/FormParameterResolver.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/FormParameterResolver.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/FormParameterResolver.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -32,7 +32,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class FormParameterResolver extends ParameterResolver<FormParam>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/FormParameterResolver.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/HeaderParameterResolver.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/HeaderParameterResolver.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/HeaderParameterResolver.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class HeaderParameterResolver extends ParameterResolver<HeaderParam>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/HeaderParameterResolver.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/MatrixParameterResolver.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/MatrixParameterResolver.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/MatrixParameterResolver.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -28,7 +28,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class MatrixParameterResolver extends ParameterResolver<MatrixParam>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/MatrixParameterResolver.java
___________________________________________________________________
Name: svn:keywords
+ Id
Deleted: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/MethodInvokerFilterComponentPlugin.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/MethodInvokerFilterComponentPlugin.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/MethodInvokerFilterComponentPlugin.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -1,87 +0,0 @@
-/*
- * 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
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.rest.impl.method;
-
-import org.exoplatform.container.component.BaseComponentPlugin;
-import org.exoplatform.container.xml.InitParams;
-import org.exoplatform.container.xml.ValueParam;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.exoplatform.services.rest.RequestHandler;
-import org.exoplatform.services.rest.method.MethodInvokerFilter;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * For injection {@link MethodInvokerFilter} in {@link RequestHandler} at
- * startup.
- *
- * @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
- */
-public class MethodInvokerFilterComponentPlugin extends BaseComponentPlugin
-{
-
- /**
- * Logger.
- */
- private static final Log LOG = ExoLogger.getLogger(MethodInvokerFilterComponentPlugin.class.getName());
-
- /**
- * List of {@link MethodInvokerFilter}.
- */
- private Set<Class<? extends MethodInvokerFilter>> mifs = new HashSet<Class<? extends MethodInvokerFilter>>();
-
- /**
- * @param params initialize parameters from configuration
- * @see InitParams
- */
- @SuppressWarnings("unchecked")
- public MethodInvokerFilterComponentPlugin(InitParams params)
- {
- if (params != null)
- {
- Iterator<ValueParam> i = params.getValueParamIterator();
- while (i.hasNext())
- {
- ValueParam v = i.next();
- try
- {
- mifs.add((Class<? extends MethodInvokerFilter>)Class.forName(v.getValue()));
- }
- catch (ClassNotFoundException e)
- {
- LOG.error("Failed load class " + v.getValue(), e);
- }
- }
- }
- }
-
- /**
- * @return get collection of classes MethodInvokerFilter supplied from
- * configuration
- */
- public Set<Class<? extends MethodInvokerFilter>> getFilters()
- {
- return mifs;
- }
-
-}
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/MethodParameterImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/MethodParameterImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/MethodParameterImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
* Describes the method's parameter.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class MethodParameterImpl implements org.exoplatform.services.rest.method.MethodParameter
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/MethodParameterImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/OptionsRequestMethodInvoker.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/OptionsRequestMethodInvoker.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/OptionsRequestMethodInvoker.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -29,7 +29,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class OptionsRequestMethodInvoker implements MethodInvoker
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/OptionsRequestMethodInvoker.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterHelper.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterHelper.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterHelper.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -45,7 +45,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class ParameterHelper
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterHelper.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterResolver.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterResolver.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterResolver.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -22,7 +22,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
* @param <T> on of JAX-RS annotation that used for method parameters
*/
public abstract class ParameterResolver<T>
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterResolver.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterResolverFactory.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterResolverFactory.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterResolverFactory.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -33,7 +33,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class ParameterResolverFactory
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterResolverFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/PathParameterResolver.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/PathParameterResolver.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/PathParameterResolver.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class PathParameterResolver extends ParameterResolver<PathParam>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/PathParameterResolver.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/PrimitiveTypeProducer.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/PrimitiveTypeProducer.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/PrimitiveTypeProducer.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -29,7 +29,7 @@
* Construct a primitive type from string value.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class PrimitiveTypeProducer extends BaseTypeProducer
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/PrimitiveTypeProducer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/QueryParameterResolver.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/QueryParameterResolver.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/QueryParameterResolver.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class QueryParameterResolver extends ParameterResolver<QueryParam>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/QueryParameterResolver.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/StringConstructorProducer.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/StringConstructorProducer.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/StringConstructorProducer.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
* Create object which has constructor with single String parameter.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class StringConstructorProducer extends BaseTypeProducer
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/StringConstructorProducer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/StringProducer.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/StringProducer.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/StringProducer.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -20,7 +20,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class StringProducer extends BaseTypeProducer
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/StringProducer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/StringValueOfProducer.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/StringValueOfProducer.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/StringValueOfProducer.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -22,7 +22,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class StringValueOfProducer extends BaseTypeProducer
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/StringValueOfProducer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/ByteEntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/ByteEntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/ByteEntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -33,7 +33,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
public class ByteEntityProvider implements EntityProvider<byte[]>
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/ByteEntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/DOMSourceEntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/DOMSourceEntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/DOMSourceEntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -47,7 +47,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
@Consumes({MediaType.APPLICATION_XML, MediaType.TEXT_XML, MediaType.APPLICATION_XHTML_XML})
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/DOMSourceEntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/DataSourceEntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/DataSourceEntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/DataSourceEntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -41,7 +41,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
public class DataSourceEntityProvider implements EntityProvider<DataSource>
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/DataSourceEntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Deleted: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/EntityProviderComponentPlugin.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/EntityProviderComponentPlugin.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/EntityProviderComponentPlugin.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -1,82 +0,0 @@
-/*
- * 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
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.rest.impl.provider;
-
-import org.exoplatform.container.component.BaseComponentPlugin;
-import org.exoplatform.container.xml.InitParams;
-import org.exoplatform.container.xml.ValueParam;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.exoplatform.services.rest.provider.EntityProvider;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
- */
-@SuppressWarnings("unchecked")
-public class EntityProviderComponentPlugin extends BaseComponentPlugin
-{
-
- /**
- * Logger.
- */
- private static final Log LOG = ExoLogger.getLogger(EntityProviderComponentPlugin.class.getName());
-
- /**
- * See {@link EntityProvider}.
- */
- private Set<Class<? extends EntityProvider>> eps = new HashSet<Class<? extends EntityProvider>>();
-
- /**
- * @param params initialize parameters
- * @see InitParams
- */
- public EntityProviderComponentPlugin(InitParams params)
- {
- if (params != null)
- {
- Iterator<ValueParam> i = params.getValueParamIterator();
- while (i.hasNext())
- {
- ValueParam v = i.next();
- try
- {
- eps.add((Class<? extends EntityProvider>)Class.forName(v.getValue()));
- }
- catch (ClassNotFoundException e)
- {
- LOG.error("Failed load class " + v.getValue(), e);
- }
- }
- }
- }
-
- /**
- * @return the entityProviders supplied from configuration
- */
- public Set<Class<? extends EntityProvider>> getEntityProviders()
- {
- return eps;
- }
-
-}
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/FileEntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/FileEntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/FileEntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -35,7 +35,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
public class FileEntityProvider implements EntityProvider<File>
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/FileEntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/IOHelper.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/IOHelper.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/IOHelper.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -29,7 +29,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class IOHelper
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/IOHelper.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/InputStreamEntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/InputStreamEntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/InputStreamEntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -32,7 +32,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
public class InputStreamEntityProvider implements EntityProvider<InputStream>
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/InputStreamEntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Deleted: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBContextComponentPlugin.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBContextComponentPlugin.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBContextComponentPlugin.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -1,84 +0,0 @@
-/*
- * 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
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.rest.impl.provider;
-
-import org.exoplatform.container.component.BaseComponentPlugin;
-import org.exoplatform.container.xml.InitParams;
-import org.exoplatform.container.xml.ValueParam;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-/**
- * For injection JAXBContext from configuration at startup in
- * {@link JAXBContextResolver}.
- *
- * @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
- */
-public class JAXBContextComponentPlugin extends BaseComponentPlugin
-{
-
- /**
- * Logger.
- */
- private static final Log LOG = ExoLogger.getLogger(JAXBContextComponentPlugin.class.getName());
-
- /**
- * Set of classes that will be bounded.
- */
- private final Set<Class<?>> jcs = new HashSet<Class<?>>();
-
- /**
- * @param params initialize parameters
- * @see InitParams
- */
- @SuppressWarnings("unchecked")
- public JAXBContextComponentPlugin(InitParams params)
- {
- if (params != null)
- {
- Iterator<ValueParam> i = params.getValueParamIterator();
- while (i.hasNext())
- {
- ValueParam v = i.next();
- try
- {
- jcs.add(Class.forName(v.getValue()));
- }
- catch (ClassNotFoundException e)
- {
- LOG.warn("Failed load class " + v.getValue(), e);
- }
- }
- }
- }
-
- /**
- * @return collection of classes to be bound
- */
- public Set<Class<?>> getJAXBContexts()
- {
- return jcs;
- }
-
-}
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBContextResolver.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBContextResolver.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBContextResolver.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -18,12 +18,6 @@
*/
package org.exoplatform.services.rest.impl.provider;
-import org.exoplatform.container.component.ComponentPlugin;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.exoplatform.services.rest.impl.header.MediaTypeHelper;
-
-import java.util.Iterator;
import java.util.concurrent.ConcurrentHashMap;
import javax.ws.rs.Consumes;
@@ -34,11 +28,13 @@
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
+import org.exoplatform.services.rest.impl.header.MediaTypeHelper;
+
/**
* Provide cache for {@link JAXBContext}.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
@Consumes({MediaType.APPLICATION_XML, MediaType.TEXT_XML, MediaType.APPLICATION_XHTML_XML})
@@ -47,11 +43,6 @@
{
/**
- * Logger.
- */
- private static final Log LOG = ExoLogger.getLogger(JAXBContextResolver.class.getName());
-
- /**
* JAXBContext cache.
*/
@SuppressWarnings("unchecked")
@@ -111,26 +102,4 @@
jaxbContexts.put(clazz, jaxbctx);
}
- /**
- * @param plugin for injection prepared JAXBContext at startup
- */
- public void addPlugin(ComponentPlugin plugin)
- {
- if (plugin instanceof JAXBContextComponentPlugin)
- {
- for (Iterator<Class<?>> i = ((JAXBContextComponentPlugin)plugin).getJAXBContexts().iterator(); i.hasNext();)
- {
- Class<?> c = i.next();
- try
- {
- createJAXBContext(c);
- }
- catch (JAXBException e)
- {
- LOG.error("Failed add JAXBContext for class " + c.getName(), e);
- }
- }
- }
- }
-
}
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBContextResolver.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBElementEntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBElementEntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBElementEntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -46,7 +46,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
@Consumes({MediaType.APPLICATION_XML, MediaType.TEXT_XML, MediaType.APPLICATION_XHTML_XML})
@@ -151,7 +151,7 @@
providers.getContextResolver(JAXBContextResolver.class, mediaType);
if (resolver == null)
throw new RuntimeException("Not found any JAXBContextResolver for media type " + mediaType);
- JAXBContextResolver jaxbres = resolver.getContext(type);
+ JAXBContextResolver jaxbres = resolver.getContext(null);
return jaxbres.getJAXBContext(type);
}
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBElementEntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBObjectEntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBObjectEntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBObjectEntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -45,7 +45,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
@Consumes({MediaType.APPLICATION_XML, MediaType.TEXT_XML, MediaType.APPLICATION_XHTML_XML})
@@ -147,7 +147,7 @@
providers.getContextResolver(JAXBContextResolver.class, mediaType);
if (resolver == null)
throw new RuntimeException("Not found any JAXBContextResolver for media type " + mediaType);
- JAXBContextResolver jaxbres = resolver.getContext(type);
+ JAXBContextResolver jaxbres = resolver.getContext(null);
return jaxbres.getJAXBContext(type);
}
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JAXBObjectEntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JsonEntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JsonEntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JsonEntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -44,7 +44,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
@Consumes({MediaType.APPLICATION_JSON})
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/JsonEntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/MultipartFormDataEntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/MultipartFormDataEntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/MultipartFormDataEntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -47,7 +47,7 @@
* Processing multipart data based on apache fileupload.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
@Consumes({"multipart/*"})
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/MultipartFormDataEntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/MultivaluedMapEntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/MultivaluedMapEntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/MultivaluedMapEntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -43,7 +43,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
@Consumes({MediaType.APPLICATION_FORM_URLENCODED})
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/MultivaluedMapEntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/ProviderDescriptorImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/ProviderDescriptorImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/ProviderDescriptorImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -38,7 +38,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class ProviderDescriptorImpl implements ProviderDescriptor
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/ProviderDescriptorImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/ReaderEntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/ReaderEntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/ReaderEntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -37,7 +37,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
public class ReaderEntityProvider implements EntityProvider<Reader>
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/ReaderEntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/SAXSourceEntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/SAXSourceEntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/SAXSourceEntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -41,7 +41,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
@Consumes({MediaType.APPLICATION_XML, MediaType.TEXT_XML, MediaType.APPLICATION_XHTML_XML})
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/SAXSourceEntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/StreamOutputEntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/StreamOutputEntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/StreamOutputEntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -33,7 +33,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
public class StreamOutputEntityProvider implements EntityProvider<StreamingOutput>
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/StreamOutputEntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/StreamSourceEntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/StreamSourceEntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/StreamSourceEntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -40,7 +40,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
@Consumes({MediaType.APPLICATION_XML, MediaType.TEXT_XML, MediaType.APPLICATION_XHTML_XML})
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/StreamSourceEntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/StringEntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/StringEntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/StringEntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -32,7 +32,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
@Provider
public class StringEntityProvider implements EntityProvider<String>
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/provider/StringEntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/AbstractResourceDescriptorImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/AbstractResourceDescriptorImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/AbstractResourceDescriptorImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -69,7 +69,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class AbstractResourceDescriptorImpl implements AbstractResourceDescriptor
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/AbstractResourceDescriptorImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/OptionsRequestResourceMethodDescriptorImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/OptionsRequestResourceMethodDescriptorImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/OptionsRequestResourceMethodDescriptorImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -30,7 +30,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class OptionsRequestResourceMethodDescriptorImpl extends ResourceMethodDescriptorImpl
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/OptionsRequestResourceMethodDescriptorImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/PathValue.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/PathValue.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/PathValue.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -22,7 +22,7 @@
* Describe the Path annotation, see {@link javax.ws.rs.Path}.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class PathValue
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/PathValue.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/ResourceDescriptorValidator.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/ResourceDescriptorValidator.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/ResourceDescriptorValidator.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -67,7 +67,7 @@
* <p>
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class ResourceDescriptorValidator implements ResourceDescriptorVisitor
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/ResourceDescriptorValidator.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/ResourceMethodDescriptorImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/ResourceMethodDescriptorImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/ResourceMethodDescriptorImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -31,7 +31,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class ResourceMethodDescriptorImpl implements ResourceMethodDescriptor
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/ResourceMethodDescriptorImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/SubResourceLocatorDescriptorImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/SubResourceLocatorDescriptorImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/SubResourceLocatorDescriptorImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -30,7 +30,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class SubResourceLocatorDescriptorImpl implements SubResourceLocatorDescriptor
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/SubResourceLocatorDescriptorImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/SubResourceMethodDescriptorImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/SubResourceMethodDescriptorImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/SubResourceMethodDescriptorImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -32,7 +32,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class SubResourceMethodDescriptorImpl implements SubResourceMethodDescriptor
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/resource/SubResourceMethodDescriptorImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/uri/PathSegmentImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/uri/PathSegmentImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/uri/PathSegmentImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class PathSegmentImpl implements PathSegment
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/uri/PathSegmentImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/uri/UriBuilderImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/uri/UriBuilderImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/uri/UriBuilderImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -31,7 +31,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class UriBuilderImpl extends UriBuilder
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/uri/UriBuilderImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/uri/UriComponent.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/uri/UriComponent.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/uri/UriComponent.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -32,7 +32,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class UriComponent
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/uri/UriComponent.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/MethodInvoker.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/MethodInvoker.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/MethodInvoker.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -27,7 +27,7 @@
*
* @see GenericMethodResource
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface MethodInvoker
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/MethodInvoker.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/MethodInvokerFilter.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/MethodInvokerFilter.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/MethodInvokerFilter.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -26,7 +26,7 @@
* JSR-250.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface MethodInvokerFilter
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/MethodInvokerFilter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/MethodParameter.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/MethodParameter.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/MethodParameter.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -22,7 +22,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface MethodParameter extends Parameter
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/MethodParameter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/TypeProducer.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/TypeProducer.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/TypeProducer.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -25,7 +25,7 @@
* created new instance of TypeProducer.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface TypeProducer
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/method/TypeProducer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/provider/EntityProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/provider/EntityProvider.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/provider/EntityProvider.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
/**
* @param <T> entity type
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface EntityProvider<T> extends MessageBodyReader<T>, MessageBodyWriter<T>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/provider/EntityProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/provider/ProviderDescriptor.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/provider/ProviderDescriptor.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/provider/ProviderDescriptor.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -30,7 +30,7 @@
* implement interface defined by JAX-RS.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface ProviderDescriptor extends ResourceDescriptor, ObjectModel
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/provider/ProviderDescriptor.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/AbstractResourceDescriptor.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/AbstractResourceDescriptor.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/AbstractResourceDescriptor.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -27,7 +27,7 @@
* class that uses JAX-RS annotations to implement corresponding Web resource.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface AbstractResourceDescriptor extends ResourceDescriptor, ObjectModel
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/AbstractResourceDescriptor.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/GenericMethodResource.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/GenericMethodResource.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/GenericMethodResource.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -30,7 +30,7 @@
* {@link SubResourceLocatorDescriptor} .
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface GenericMethodResource
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/GenericMethodResource.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceContainer.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceContainer.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceContainer.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -22,7 +22,7 @@
* Abstraction of REST resource.
*
* @author Gennady Azarenkov
- * @version $Id: $
+ * @version $Id$
*/
public interface ResourceContainer
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceContainer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceDescriptor.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceDescriptor.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceDescriptor.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -22,7 +22,7 @@
* Common essence for all resource descriptors.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface ResourceDescriptor
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceDescriptor.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceDescriptorVisitor.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceDescriptorVisitor.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceDescriptorVisitor.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -31,7 +31,7 @@
* {@link ProviderDescriptor}, {@link FilterDescriptor}.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface ResourceDescriptorVisitor
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceDescriptorVisitor.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceMethodDescriptor.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceMethodDescriptor.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceMethodDescriptor.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -28,7 +28,7 @@
* and has not {@link javax.ws.rs.Path} annotation.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface ResourceMethodDescriptor extends ResourceDescriptor, GenericMethodResource
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceMethodDescriptor.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceMethodMap.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceMethodMap.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceMethodMap.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -32,7 +32,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class ResourceMethodMap<T extends ResourceMethodDescriptor> extends HashMap<String, List<T>> implements
ExtMultivaluedMap<String, T>
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/ResourceMethodMap.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceLocatorDescriptor.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceLocatorDescriptor.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceLocatorDescriptor.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -31,7 +31,7 @@
* request or maybe has other resource locators.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface SubResourceLocatorDescriptor extends GenericMethodResource, ResourceDescriptor
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceLocatorDescriptor.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceLocatorMap.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceLocatorMap.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceLocatorMap.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class SubResourceLocatorMap extends TreeMap<UriPattern, SubResourceLocatorDescriptor>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceLocatorMap.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceMethodDescriptor.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceMethodDescriptor.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceMethodDescriptor.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -30,7 +30,7 @@
* handle request directly.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface SubResourceMethodDescriptor extends ResourceMethodDescriptor
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceMethodDescriptor.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceMethodMap.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceMethodMap.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceMethodMap.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -24,7 +24,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class SubResourceMethodMap extends TreeMap<UriPattern, ResourceMethodMap<SubResourceMethodDescriptor>>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/resource/SubResourceMethodMap.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/RestEncodingFilter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/ServletContainerRequest.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/ServletContainerRequest.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/ServletContainerRequest.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -34,7 +34,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class ServletContainerRequest extends ContainerRequest
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/ServletContainerRequest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/tools/ByteArrayContainerResponseWriter.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/tools/ByteArrayContainerResponseWriter.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/tools/ByteArrayContainerResponseWriter.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -32,7 +32,7 @@
*
* @see ContainerResponseWriter
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class ByteArrayContainerResponseWriter implements ContainerResponseWriter
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/tools/ByteArrayContainerResponseWriter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/tools/DummyContainerResponseWriter.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/tools/DummyContainerResponseWriter.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/tools/DummyContainerResponseWriter.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -30,7 +30,7 @@
* entity at all.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class DummyContainerResponseWriter implements ContainerResponseWriter
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/tools/DummyContainerResponseWriter.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/uri/UriPattern.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/uri/UriPattern.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/uri/UriPattern.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -30,7 +30,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class UriPattern
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/uri/UriPattern.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/uri/UriTemplateParser.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/uri/UriTemplateParser.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/uri/UriTemplateParser.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -27,7 +27,7 @@
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class UriTemplateParser
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/uri/UriTemplateParser.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/util/MediaTypeMap.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/util/MediaTypeMap.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/util/MediaTypeMap.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -29,7 +29,7 @@
*
* @param <T> actual value type
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class MediaTypeMap<T> extends java.util.TreeMap<MediaType, T>
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/util/MediaTypeMap.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/util/MediaTypeMultivaluedMap.java
___________________________________________________________________
Name: svn:keywords
+ Id
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/util/UriPatternMap.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/wadl/BaseWadlGeneratorImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/wadl/BaseWadlGeneratorImpl.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/wadl/BaseWadlGeneratorImpl.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -44,7 +44,7 @@
* provide doc and grammar extension of WADL.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public class BaseWadlGeneratorImpl implements WadlGenerator
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/wadl/BaseWadlGeneratorImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/wadl/WadlGenerator.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/wadl/WadlGenerator.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/wadl/WadlGenerator.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -33,7 +33,7 @@
* representation.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public interface WadlGenerator
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/wadl/WadlGenerator.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/wadl/WadlProcessor.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/wadl/WadlProcessor.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/wadl/WadlProcessor.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -46,7 +46,7 @@
* {@link AbstractResourceDescriptor}.
*
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
+ * @version $Id$
*/
public final class WadlProcessor
{
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/wadl/WadlProcessor.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/BaseTest.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/BaseTest.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/BaseTest.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -20,7 +20,7 @@
import junit.framework.TestCase;
-import org.exoplatform.container.StandaloneContainer;
+//import org.exoplatform.container.StandaloneContainer;
import org.exoplatform.services.rest.impl.ApplicationContextImpl;
import org.exoplatform.services.rest.impl.BaseResourceBinder;
import org.exoplatform.services.rest.impl.ProviderBinder;
Modified: ws/branches/2.2.x/rest/ext/pom.xml
===================================================================
--- ws/branches/2.2.x/rest/ext/pom.xml 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/ext/pom.xml 2009-10-15 16:21:30 UTC (rev 285)
@@ -34,6 +34,10 @@
<dependencies>
<dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.exoplatform.ws</groupId>
<artifactId>exo.ws.commons</artifactId>
</dependency>
@@ -42,6 +46,15 @@
<artifactId>exo.ws.rest.core</artifactId>
</dependency>
<dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.core</groupId>
+ <artifactId>exo.core.component.xml-processing</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
</dependency>
Modified: ws/branches/2.2.x/rest/ext/src/main/java/conf/portal/configuration.xml
===================================================================
--- ws/branches/2.2.x/rest/ext/src/main/java/conf/portal/configuration.xml 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/ext/src/main/java/conf/portal/configuration.xml 2009-10-15 16:21:30 UTC (rev 285)
@@ -21,44 +21,43 @@
-->
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
- <external-component-plugins>
- <target-component>org.exoplatform.services.rest.impl.RequestHandlerImpl</target-component>
- <component-plugin>
- <name>ws.rs.method.filter</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.rest.impl.method.MethodInvokerFilterComponentPlugin</type>
- <!--init-params>
- <value-param>
- <name>method.access.filter</name>
- <value>org.exoplatform.services.rest.ext.method.filter.MethodAccessFilter</value>
- </value-param>
- </init-params-->
- </component-plugin>
- <component-plugin>
- <name>ws.rs.entity.provider</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.rest.impl.provider.EntityProviderComponentPlugin</type>
- <init-params>
- <value-param>
- <name>ws.rest.ext.HierarchicalPropertyEntityProvider</name>
- <value>org.exoplatform.services.rest.ext.provider.HierarchicalPropertyEntityProvider</value>
- </value-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>ws.rs.request.filter</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.rest.impl.RequestFilterComponentPlugin</type>
- <init-params>
- <!-- <value-param>-->
- <!-- <name>ws.rs.request.uri-normalization-filter</name>-->
- <!-- <value>org.exoplatform.services.rest.ext.filter.UriNormalizationFilter</value>-->
- <!-- </value-param>-->
- <value-param>
- <name>ws.rs.request.method-override-filter</name>
- <value>org.exoplatform.services.rest.ext.filter.MethodOverrideFilter</value>
- </value-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
+ <component>
+ <type>org.exoplatform.services.rest.impl.RestInitializer</type>
+ <init-params>
+ <values-param>
+ <name>ws.rs.entity.provider</name>
+ <value>org.exoplatform.services.rest.ext.provider.HierarchicalPropertyEntityProvider</value>
+<!-- Add own entity providers here -->
+ </values-param>
+ <values-param>
+ <name>ws.rs.request.filter</name>
+ <value>org.exoplatform.services.rest.ext.filter.MethodOverrideFilter</value>
+<!-- Add own request filters here -->
+ </values-param>
+ <values-param>
+ <name>ws.rs.response.filter</name>
+<!-- Add own response filters here -->
+ </values-param>
+ <values-param>
+ <name>ws.rs.method.filter</name>
+ <value>org.exoplatform.services.rest.impl.method.MethodInvokerFilterComponentPlugin</value>
+<!-- Add own method filters here -->
+ </values-param>
+ <values-param>
+ <name>ws.rs.jaxb.context</name>
+ <value>org.exoplatform.services.rest.wadl.research.Application</value>
+<!-- Add own jaxb context here -->
+ </values-param>
+ </init-params>
+ </component>
+ <component>
+ <type>org.exoplatform.services.rest.impl.RequestHandlerImpl</type>
+ </component>
+ <component>
+ <type>org.exoplatform.services.rest.impl.ExoContainerResourceBinder</type>
+ </component>
+ <component>
+ <type>org.exoplatform.services.rest.impl.ExoContainerDependencyInjector</type>
+ </component>
+
</configuration>
\ No newline at end of file
Copied: ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/ext/method/MethodInvokerFilterComponentPlugin.java (from rev 277, ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/MethodInvokerFilterComponentPlugin.java)
===================================================================
--- ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/ext/method/MethodInvokerFilterComponentPlugin.java (rev 0)
+++ ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/ext/method/MethodInvokerFilterComponentPlugin.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -0,0 +1,87 @@
+/*
+ * 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
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.rest.ext.method;
+
+import org.exoplatform.container.component.BaseComponentPlugin;
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.ValueParam;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.services.rest.RequestHandler;
+import org.exoplatform.services.rest.method.MethodInvokerFilter;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+/**
+ * For injection {@link MethodInvokerFilter} in {@link RequestHandler} at
+ * startup.
+ *
+ * @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
+ * @version $Id: $
+ */
+public class MethodInvokerFilterComponentPlugin extends BaseComponentPlugin
+{
+
+ /**
+ * Logger.
+ */
+ private static final Log LOG = ExoLogger.getLogger(MethodInvokerFilterComponentPlugin.class.getName());
+
+ /**
+ * List of {@link MethodInvokerFilter}.
+ */
+ private Set<Class<? extends MethodInvokerFilter>> mifs = new HashSet<Class<? extends MethodInvokerFilter>>();
+
+ /**
+ * @param params initialize parameters from configuration
+ * @see InitParams
+ */
+ @SuppressWarnings("unchecked")
+ public MethodInvokerFilterComponentPlugin(InitParams params)
+ {
+ if (params != null)
+ {
+ Iterator<ValueParam> i = params.getValueParamIterator();
+ while (i.hasNext())
+ {
+ ValueParam v = i.next();
+ try
+ {
+ mifs.add((Class<? extends MethodInvokerFilter>)Class.forName(v.getValue()));
+ }
+ catch (ClassNotFoundException e)
+ {
+ LOG.error("Failed load class " + v.getValue(), e);
+ }
+ }
+ }
+ }
+
+ /**
+ * @return get collection of classes MethodInvokerFilter supplied from
+ * configuration
+ */
+ public Set<Class<? extends MethodInvokerFilter>> getFilters()
+ {
+ return mifs;
+ }
+
+}
Added: ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/ExoContainerDependencyInjector.java
===================================================================
--- ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/ExoContainerDependencyInjector.java (rev 0)
+++ ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/ExoContainerDependencyInjector.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -0,0 +1,43 @@
+/*
+ * 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
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.rest.impl;
+
+import java.lang.reflect.Type;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.services.rest.DependencyInjector;
+
+/**
+ * @author <a href="mailto:andrey.parfonov@exoplatform.com">Andrey Parfonov</a>
+ * @version $Id$
+ */
+public class ExoContainerDependencyInjector implements DependencyInjector
+{
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object getInjectableParameter(Class<?> type, Type genericType)
+ {
+ ExoContainer container = ExoContainerContext.getCurrentContainer();
+ return container.getComponentInstanceOfType(type);
+ }
+
+}
Property changes on: ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/ExoContainerDependencyInjector.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Modified: ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/ExoContainerResourceBinder.java
===================================================================
--- ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/ExoContainerResourceBinder.java 2009-10-15 14:56:47 UTC (rev 284)
+++ ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/ExoContainerResourceBinder.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -27,9 +27,7 @@
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
-import org.exoplatform.services.rest.impl.resource.ResourceDescriptorValidator;
import org.exoplatform.services.rest.resource.ResourceContainer;
-import org.exoplatform.services.rest.resource.ResourceDescriptorVisitor;
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
@@ -44,39 +42,18 @@
private static final Log LOG = ExoLogger.getLogger(ExoContainerResourceBinder.class.getName());
/**
- * Validator.
- */
- private final ResourceDescriptorVisitor rdv = ResourceDescriptorValidator.getInstance();
-
- /**
- * @see RuntimeDelegate
- */
- private final RuntimeDelegate rd;
-
- public ExoContainerResourceBinder()
- {
- rd = new RuntimeDelegateImpl();
- RuntimeDelegate.setInstance(rd);
- }
-
- /**
* @param containerContext eXo container context
* @throws Exception if can't set instance of {@link RuntimeDelegate}
*/
@SuppressWarnings("unchecked")
public ExoContainerResourceBinder(ExoContainerContext containerContext) throws Exception
{
- // Initialize RuntimeDelegate instance
- // This is first component in life cycle what needs.
- // TODO better solution to initialize RuntimeDelegate
- rd = new RuntimeDelegateImpl();
- RuntimeDelegate.setInstance(rd);
-
+ super();
ExoContainer container = containerContext.getContainer();
// Lookup Applications
- List<Application> al = container.getComponentInstancesOfType(Application.class);
- for (Application a : al)
+ List<Application> applications = container.getComponentInstancesOfType(Application.class);
+ for (Application a : applications)
{
try
{
Added: ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/RestInitializer.java
===================================================================
--- ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/RestInitializer.java (rev 0)
+++ ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/RestInitializer.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -0,0 +1,138 @@
+/*
+ * 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
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.rest.impl;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.ext.ContextResolver;
+import javax.xml.bind.JAXBException;
+
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.services.rest.RequestFilter;
+import org.exoplatform.services.rest.RequestHandler;
+import org.exoplatform.services.rest.ResponseFilter;
+import org.exoplatform.services.rest.impl.provider.JAXBContextResolver;
+import org.exoplatform.services.rest.method.MethodInvokerFilter;
+import org.exoplatform.services.rest.provider.EntityProvider;
+import org.picocontainer.Startable;
+
+/**
+ * @author <a href="mailto:andrey.parfonov@exoplatform.com">Andrey Parfonov</a>
+ * @version $Id$
+ */
+public class RestInitializer implements Startable
+{
+
+ /**
+ * Logger.
+ */
+ private static final Log LOG = ExoLogger.getLogger(RestInitializer.class.getName());
+
+ @SuppressWarnings("unchecked")
+ public RestInitializer(RequestHandler requestHandler, InitParams initParams)
+ {
+
+ ProviderBinder providers = ProviderBinder.getInstance();
+
+ if (initParams != null)
+ {
+ for (Object cl : initParams.getValuesParam("ws.rs.request.filter").getValues())
+ {
+ try
+ {
+ providers.addRequestFilter((Class<? extends RequestFilter>)Class.forName((String)cl));
+ }
+ catch (ClassNotFoundException e)
+ {
+ LOG.error("Failed load class " + cl, e);
+ }
+ }
+ }
+ for (Object cl : initParams.getValuesParam("ws.rs.response.filter").getValues())
+ {
+ try
+ {
+ providers.addResponseFilter((Class<? extends ResponseFilter>)Class.forName((String)cl));
+ }
+ catch (ClassNotFoundException e)
+ {
+ LOG.error("Failed load class " + cl, e);
+ }
+ }
+ for (Object cl : initParams.getValuesParam("ws.rs.method.filter").getValues())
+ {
+ try
+ {
+ providers.addMethodInvokerFilter((Class<? extends MethodInvokerFilter>)Class.forName((String)cl));
+ }
+ catch (ClassNotFoundException e)
+ {
+ LOG.error("Failed load class " + cl, e);
+ }
+ }
+ for (Object cl : initParams.getValuesParam("ws.rs.entity.provider").getValues())
+ {
+ try
+ {
+ Class<? extends EntityProvider> prov = (Class<? extends EntityProvider>)Class.forName((String)cl);
+ providers.addMessageBodyReader(prov);
+ providers.addMessageBodyWriter(prov);
+ }
+ catch (ClassNotFoundException e)
+ {
+ LOG.error("Failed load class " + cl, e);
+ }
+ }
+ for (Object cl : initParams.getValuesParam("ws.rs.jaxb.context").getValues())
+ {
+ try
+ {
+ ContextResolver<JAXBContextResolver> resolver =
+ providers.getContextResolver(JAXBContextResolver.class, MediaType.WILDCARD_TYPE);
+ if (resolver == null)
+ {
+ LOG.error("Not found JAXBContextResolver.");
+ }
+ else
+ {
+ JAXBContextResolver contextResolver = resolver.getContext(null);
+ contextResolver.createJAXBContext((Class<?>)Class.forName((String)cl));
+ }
+ }
+ catch (ClassNotFoundException e)
+ {
+ LOG.error("Failed load class " + cl, e);
+ }
+ catch (JAXBException jaxbe)
+ {
+ LOG.error("Failed add JAXBContext for class " + cl, jaxbe);
+ }
+ }
+
+ }
+
+ public void start()
+ {
+ }
+
+ public void stop()
+ {
+ }
+}
Property changes on: ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/RestInitializer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: ws/branches/2.2.x/rest/ext/src/test/java/conf/standalone/test-configuration.xml
===================================================================
--- ws/branches/2.2.x/rest/ext/src/test/java/conf/standalone/test-configuration.xml (rev 0)
+++ ws/branches/2.2.x/rest/ext/src/test/java/conf/standalone/test-configuration.xml 2009-10-15 16:21:30 UTC (rev 285)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+ <!--
+
+ 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 02110-1301 USA, or see the FSF
+ site: http://www.fsf.org.
+ -->
+<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <type>org.exoplatform.services.rest.impl.RestInitializer</type>
+ <init-params>
+ <values-param>
+ <name>ws.rs.entity.provider</name>
+ <value>org.exoplatform.services.rest.ext.provider.HierarchicalPropertyEntityProvider</value>
+<!-- Add own entity providers here -->
+ </values-param>
+ <values-param>
+ <name>ws.rs.request.filter</name>
+ <value>org.exoplatform.services.rest.ext.filter.MethodOverrideFilter</value>
+<!-- Add own request filters here -->
+ </values-param>
+ <values-param>
+ <name>ws.rs.response.filter</name>
+<!-- Add own response filters here -->
+ </values-param>
+ <values-param>
+ <name>ws.rs.method.filter</name>
+ <value>org.exoplatform.services.rest.impl.method.MethodInvokerFilterComponentPlugin</value>
+<!-- Add own method filters here -->
+ </values-param>
+ <values-param>
+ <name>ws.rs.jaxb.context</name>
+ <value>org.exoplatform.services.rest.wadl.research.Application</value>
+<!-- Add own jaxb context here -->
+ </values-param>
+ </init-params>
+ </component>
+ <component>
+ <type>org.exoplatform.services.rest.impl.RequestHandlerImpl</type>
+ </component>
+ <component>
+ <type>org.exoplatform.services.rest.impl.ExoContainerResourceBinder</type>
+ </component>
+ <component>
+ <type>org.exoplatform.services.rest.impl.ExoContainerDependencyInjector</type>
+ </component>
+
+</configuration>
\ No newline at end of file
Property changes on: ws/branches/2.2.x/rest/ext/src/test/java/conf/standalone/test-configuration.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: ws/branches/2.2.x/rest/ext/src/test/java/org/exoplatform/services/rest/BaseTest.java
===================================================================
--- ws/branches/2.2.x/rest/ext/src/test/java/org/exoplatform/services/rest/BaseTest.java (rev 0)
+++ ws/branches/2.2.x/rest/ext/src/test/java/org/exoplatform/services/rest/BaseTest.java 2009-10-15 16:21:30 UTC (rev 285)
@@ -0,0 +1,40 @@
+/*
+ * 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
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.rest;
+
+import org.exoplatform.container.StandaloneContainer;
+
+import junit.framework.TestCase;
+
+/**
+ * @author <a href="mailto:andrey.parfonov@exoplatform.com">Andrey Parfonov</a>
+ * @version $Id$
+ */
+public abstract class BaseTest extends TestCase
+{
+
+ protected StandaloneContainer container;
+
+ public void setUp() throws Exception
+ {
+ StandaloneContainer.setConfigurationPath("src/test/java/conf/standalone/test-configuration.xml");
+ container = StandaloneContainer.getInstance();
+ }
+
+}
Property changes on: ws/branches/2.2.x/rest/ext/src/test/java/org/exoplatform/services/rest/BaseTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
14 years, 8 months
exo-jcr SVN: r284 - in jcr/trunk/component/core/src: test/java/org/exoplatform/services/jcr/api/importing and 1 other directory.
by do-not-reply@jboss.org
Author: skabashnyuk
Date: 2009-10-15 10:56:47 -0400 (Thu, 15 Oct 2009)
New Revision: 284
Modified:
jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/util/VersionHistoryImporter.java
jcr/trunk/component/core/src/test/java/org/exoplatform/services/jcr/api/importing/TestImport.java
Log:
EXOJCR-189 : Versioning is not working well with nt:file. Test and fix
Modified: jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/util/VersionHistoryImporter.java
===================================================================
--- jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/util/VersionHistoryImporter.java 2009-10-15 14:31:25 UTC (rev 283)
+++ jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/util/VersionHistoryImporter.java 2009-10-15 14:56:47 UTC (rev 284)
@@ -173,7 +173,7 @@
// remove version history
dataKeeper.save(changesLog);
// import new version history
- userSession.importXML(path, versionHistoryStream, 0);
+ userSession.getWorkspace().importXML(path, versionHistoryStream, 0);
userSession.save();
}
Modified: jcr/trunk/component/core/src/test/java/org/exoplatform/services/jcr/api/importing/TestImport.java
===================================================================
--- jcr/trunk/component/core/src/test/java/org/exoplatform/services/jcr/api/importing/TestImport.java 2009-10-15 14:31:25 UTC (rev 283)
+++ jcr/trunk/component/core/src/test/java/org/exoplatform/services/jcr/api/importing/TestImport.java 2009-10-15 14:56:47 UTC (rev 284)
@@ -511,6 +511,69 @@
}
/**
+ * Test for http://jira.exoplatform.org/browse/JCR-1247
+ *
+ * @throws Exception
+ */
+ public void testJCR1247() throws Exception
+ {
+
+ Node testRoot = root.addNode("testRoot");
+ Node fileNode = testRoot.addNode("TestJCR1247", "nt:file");
+ Node contentNode = fileNode.addNode("jcr:content", "nt:resource");
+ contentNode.setProperty("jcr:data", new ByteArrayInputStream("".getBytes()));
+ contentNode.setProperty("jcr:mimeType", "image/jpg");
+ contentNode.setProperty("jcr:lastModified", Calendar.getInstance());
+ session.save();
+ Node contentNodeBeforeAddVersion = fileNode.getNode("jcr:content");
+ assertNotNull(contentNodeBeforeAddVersion.getProperty("jcr:lastModified"));
+ if (fileNode.canAddMixin("mix:versionable"))
+ {
+ fileNode.addMixin("mix:versionable");
+ }
+ fileNode.save();
+ fileNode.checkin();
+ fileNode.checkout();
+ session.save();
+
+ String nodeDump = dumpVersionable(fileNode);
+ // Export VersionHistory
+
+ assertTrue(fileNode.isNodeType("mix:versionable"));
+
+ VersionableNodeInfo nodeInfo = new VersionableNodeInfo(fileNode);
+
+ // node content
+ byte[] versionableNode = serialize(fileNode, false, true);
+ // version history
+ byte[] versionHistory = serialize(fileNode.getVersionHistory(), false, true);
+ System.out.println(new String(versionHistory));
+ fileNode.remove();
+ session.save();
+ assertFalse(testRoot.hasNode("TestJCR1247"));
+
+ // restore node content
+ deserialize(testRoot, XmlSaveType.SESSION, true, ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW,
+ new ByteArrayInputStream(versionableNode));
+ session.save();
+
+ assertTrue(testRoot.hasNode("TestJCR1247"));
+
+ Node fileImport = testRoot.getNode("TestJCR1247");
+ assertTrue(fileImport.isNodeType("mix:versionable"));
+
+ VersionHistoryImporter versionHistoryImporter =
+ new VersionHistoryImporter((NodeImpl)fileImport, new ByteArrayInputStream(versionHistory), nodeInfo
+ .getBaseVersion(), nodeInfo.getPredecessorsHistory(), nodeInfo.getVersionHistory());
+ versionHistoryImporter.doImport();
+ fileImport.checkin();
+ fileImport.checkout();
+ session.save();
+ // assertEquals(nodeDump, dumpVersionable(fileImport));
+
+ }
+
+ /**
* Test for http://jira.exoplatform.org/browse/JCR-1047
*
* @throws Exception
14 years, 8 months
exo-jcr SVN: r283 - jcr/trunk/component/core/src/test/java/org/exoplatform/services/jcr/impl/value.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2009-10-15 10:31:25 -0400 (Thu, 15 Oct 2009)
New Revision: 283
Modified:
jcr/trunk/component/core/src/test/java/org/exoplatform/services/jcr/impl/value/TestTransientValueDataSpooling.java
Log:
JCR-1227 : has been fixed test TestTransientValueDataSpooling.
Modified: jcr/trunk/component/core/src/test/java/org/exoplatform/services/jcr/impl/value/TestTransientValueDataSpooling.java
===================================================================
--- jcr/trunk/component/core/src/test/java/org/exoplatform/services/jcr/impl/value/TestTransientValueDataSpooling.java 2009-10-15 13:45:07 UTC (rev 282)
+++ jcr/trunk/component/core/src/test/java/org/exoplatform/services/jcr/impl/value/TestTransientValueDataSpooling.java 2009-10-15 14:31:25 UTC (rev 283)
@@ -18,6 +18,16 @@
*/
package org.exoplatform.services.jcr.impl.value;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.FilenameFilter;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import javax.jcr.Node;
+
import org.exoplatform.services.jcr.BaseStandaloneTest;
import org.exoplatform.services.jcr.config.WorkspaceEntry;
import org.exoplatform.services.jcr.core.WorkspaceContainerFacade;
@@ -30,13 +40,6 @@
import org.exoplatform.services.jcr.impl.dataflow.serialization.ObjectWriterImpl;
import org.exoplatform.services.jcr.impl.dataflow.serialization.TransactionChangesLogWriter;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-
-import javax.jcr.Node;
-
/**
* Created by The eXo Platform SAS.
*
@@ -94,27 +97,27 @@
{
File tmpFile = createBLOBTempFile(250);
- int countBefore = tmpdir.list(new FilenameFilter()
+ String[] countBefore = tmpdir.list(new FilenameFilter()
{
public boolean accept(File dir, String name)
{
return name.startsWith("jcrvd");
}
- }).length;
+ });
NodeImpl node = (NodeImpl)root.addNode("testNode");
node.setProperty("testProp", new FileInputStream(tmpFile));
root.save();
- int countAfter = tmpdir.list(new FilenameFilter()
+ String[] countAfter = tmpdir.list(new FilenameFilter()
{
public boolean accept(File dir, String name)
{
return name.startsWith("jcrvd");
}
- }).length;
+ });
- assertEquals(countBefore + (haveValueStorage ? 0 : 1), countAfter);
+ assertFalse(isSpooling(countBefore, countAfter));
}
/**
@@ -127,28 +130,28 @@
{
File tmpFile = createBLOBTempFile(250);
- int countBefore = tmpdir.list(new FilenameFilter()
+ String[] countBefore = tmpdir.list(new FilenameFilter()
{
public boolean accept(File dir, String name)
{
return name.startsWith("jcrvd");
}
- }).length;
+ });
Node node = root.addNode("testNode");
node.setProperty("testProp", new FileInputStream(tmpFile));
node.getProperty("testProp").getStream().close();
root.save();
- int countAfter = tmpdir.list(new FilenameFilter()
+ String[] countAfter = tmpdir.list(new FilenameFilter()
{
public boolean accept(File dir, String name)
{
return name.startsWith("jcrvd");
}
- }).length;
+ });
- assertEquals(countBefore + (haveValueStorage ? 0 : 1), countAfter);
+ assertFalse(isSpooling(countBefore, countAfter));
}
public void _testSerialization() throws Exception
@@ -180,4 +183,24 @@
{
cLog = (TransactionChangesLog)itemStates;
}
+
+ private boolean isSpooling(String[] before, String[] after) {
+ int newFilecount = 0;
+
+ List<String> lBefore = new ArrayList<String>();
+ for (String sBefore : before)
+ lBefore.add(sBefore);
+
+ for (String sAfter : after) {
+ if (!lBefore.contains(sAfter)) {
+ if (haveValueStorage && newFilecount == 0 || newFilecount == 0)
+ newFilecount++;
+ else
+ return true;
+ }
+
+ }
+
+ return false;
+ }
}
14 years, 8 months
exo-jcr SVN: r282 - jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/impl/core.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2009-10-15 09:45:07 -0400 (Thu, 15 Oct 2009)
New Revision: 282
Modified:
jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java
Log:
EXOJCR-188: default xml prefix fixed
Modified: jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java
===================================================================
--- jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java 2009-10-15 13:14:17 UTC (rev 281)
+++ jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/NamespaceRegistryImpl.java 2009-10-15 13:45:07 UTC (rev 282)
@@ -32,7 +32,6 @@
import java.util.Set;
import javax.jcr.NamespaceException;
-import javax.jcr.PathNotFoundException;
import javax.jcr.RepositoryException;
/**
@@ -73,7 +72,7 @@
DEF_PREFIXES.put("http://www.jcp.org/jcr/1.0", "jcr");
DEF_PREFIXES.put("http://www.jcp.org/jcr/nt/1.0", "nt");
DEF_PREFIXES.put("http://www.jcp.org/jcr/mix/1.0", "mix");
- DEF_PREFIXES.put("http://www.w3.org/XML/1998/namespace", "mix");
+ DEF_PREFIXES.put("http://www.w3.org/XML/1998/namespace", "xml");
DEF_PREFIXES.put("http://www.jcp.org/jcr/sv/1.0", "sv");
DEF_PREFIXES.put("http://www.exoplatform.com/jcr/exo/1.0", "exo");
DEF_PREFIXES.put("http://www.w3.org/2001/XMLSchema", "xs");
14 years, 8 months
exo-jcr SVN: r281 - in jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr: impl/core/query and 1 other directory.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2009-10-15 09:14:17 -0400 (Thu, 15 Oct 2009)
New Revision: 281
Modified:
jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/config/QueryHandlerParams.java
jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java
Log:
EXOJCR-187: "analyzer" parameter added
Modified: jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/config/QueryHandlerParams.java
===================================================================
--- jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/config/QueryHandlerParams.java 2009-10-15 11:53:16 UTC (rev 280)
+++ jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/config/QueryHandlerParams.java 2009-10-15 13:14:17 UTC (rev 281)
@@ -97,4 +97,6 @@
public static final String PARAM_UPGRADE_INDEX = "upgrade-index";
+ public static final String PARAM_ANALYZER_CLASS = "analyzer";
+
}
Modified: jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java
===================================================================
--- jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java 2009-10-15 11:53:16 UTC (rev 280)
+++ jcr/trunk/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java 2009-10-15 13:14:17 UTC (rev 281)
@@ -32,105 +32,109 @@
* @version $Id: exo-jboss-codetemplates.xml 34360 2009-07-22 23:58:59Z ksm $
*
*/
-public class SearchIndexConfigurationHelper {
+public class SearchIndexConfigurationHelper
+{
- private final SearchIndex searchIndex;
+ private final SearchIndex searchIndex;
- /**
- * @param searchIndex
- */
- public SearchIndexConfigurationHelper(SearchIndex searchIndex) {
- super();
- this.searchIndex = searchIndex;
- }
+ /**
+ * @param searchIndex
+ */
+ public SearchIndexConfigurationHelper(SearchIndex searchIndex)
+ {
+ super();
+ this.searchIndex = searchIndex;
+ }
- /**
- * Initialize parameters
- *
- * @param queryHandlerEntry
- * @throws IOException
- * @throws RepositoryConfigurationException
- */
- public void init(QueryHandlerEntry queryHandlerEntry) throws IOException,
- RepositoryConfigurationException {
- // Path will be set using queryHandelContext
+ /**
+ * Initialize parameters
+ *
+ * @param queryHandlerEntry
+ * @throws IOException
+ * @throws RepositoryConfigurationException
+ */
+ public void init(QueryHandlerEntry queryHandlerEntry) throws IOException, RepositoryConfigurationException
+ {
+ // Path will be set using queryHandelContext
- for (SimpleParameterEntry parameter : queryHandlerEntry.getParameters()) {
- setParam(parameter.getName(), parameter.getValue());
- }
+ for (SimpleParameterEntry parameter : queryHandlerEntry.getParameters())
+ {
+ setParam(parameter.getName(), parameter.getValue());
+ }
- }
+ }
- /**
- * @param name
- * @param value
- */
- private void setParam(String name, String value) {
+ /**
+ * @param name
+ * @param value
+ */
+ private void setParam(String name, String value)
+ {
- if (QueryHandlerParams.PARAM_AUTO_REPAIR.equals(name))
- searchIndex.setAutoRepair(Boolean.parseBoolean(value));
- else if (QueryHandlerParams.PARAM_BUFFER_SIZE.equals(name))
- searchIndex.setBufferSize(Integer.parseInt(value));
- else if (QueryHandlerParams.PARAM_CACHE_SIZE.equals(name))
- searchIndex.setCacheSize(Integer.parseInt(value));
- else if (QueryHandlerParams.PARAM_CONSISTENCY_CHECK_ENABLED
- .equals(name))
- searchIndex.setEnableConsistencyCheck(Boolean.parseBoolean(value));
- else if (QueryHandlerParams.PARAM_DOCUMENT_ORDER.equals(name))
- searchIndex.setRespectDocumentOrder(Boolean.parseBoolean(value));
- else if (QueryHandlerParams.PARAM_EXCERPTPROVIDER_CLASS.equals(name))
- searchIndex.setExcerptProviderClass(value);
- // else if
- // (QueryHandlerParams.PARAM_EXCLUDED_NODE_IDENTIFERS.equals(name))
- // searchIndex.setE
- else if (QueryHandlerParams.PARAM_EXTRACTOR_BACKLOG.equals(name))
- searchIndex.setExtractorBackLogSize(Integer.parseInt(value));
- else if (QueryHandlerParams.PARAM_EXTRACTOR_POOLSIZE.equals(name))
- searchIndex.setExtractorPoolSize(Integer.parseInt(value));
- else if (QueryHandlerParams.PARAM_EXTRACTOR_TIMEOUT.equals(name))
- searchIndex.setExtractorTimeout(Long.parseLong(value));
- else if (QueryHandlerParams.PARAM_FORCE_CONSISTENCYCHECK.equals(name))
- searchIndex.setForceConsistencyCheck(Boolean.parseBoolean(value));
- else if (QueryHandlerParams.PARAM_ERRORLOG_SIZE.equals(name))
- searchIndex.setErrorLogfileSize(Integer.parseInt(value));
- // else if (QueryHandlerParams.PARAM_INDEX_DIR.equals(name))
- // searchIndex.setBufferSize(0);
- // else if (OLD_PARAM_INDEX_DIR
- else if (QueryHandlerParams.PARAM_INDEXING_CONFIGURATION_PATH
- .equals(name))
- searchIndex.setIndexingConfiguration(value);
- else if (QueryHandlerParams.PARAM_INDEXING_CONFIGURATION_CLASS
- .equals(name))
- searchIndex.setIndexingConfigurationClass(value);
- else if (QueryHandlerParams.PARAM_MAX_FIELD_LENGTH.equals(name))
- searchIndex.setMaxFieldLength(Integer.parseInt(value));
- else if (QueryHandlerParams.PARAM_MAX_MERGE_DOCS.equals(name))
- searchIndex.setMaxMergeDocs(Integer.parseInt(value));
- else if (QueryHandlerParams.PARAM_MERGE_FACTOR.equals(name))
- searchIndex.setMergeFactor(Integer.parseInt(value));
- else if (QueryHandlerParams.PARAM_MIN_MERGE_DOCS.equals(name))
- searchIndex.setMinMergeDocs(Integer.parseInt(value));
- else if (QueryHandlerParams.PARAM_QUERY_CLASS.equals(name))
- searchIndex.setQueryClass(value);
- else if (QueryHandlerParams.PARAM_RESULT_FETCH_SIZE.equals(name))
- searchIndex.setResultFetchSize(Integer.parseInt(value));
- // else if (QueryHandlerParams.PARAM_ROOT_NODE_ID.equals(name))
- // searchIndex.setBufferSize(0);
- else if (QueryHandlerParams.PARAM_SPELLCHECKER_CLASS.equals(name))
- searchIndex.setSpellCheckerClass(value);
- else if (QueryHandlerParams.PARAM_SUPPORT_HIGHLIGHTING.equals(name))
- searchIndex.setSupportHighlighting(Boolean.parseBoolean(value));
- else if (QueryHandlerParams.PARAM_SYNONYMPROVIDER_CLASS.equals(name))
- searchIndex.setSynonymProviderClass(value);
- else if (QueryHandlerParams.PARAM_SYNONYMPROVIDER_CONFIG_PATH
- .equals(name))
- searchIndex.setSynonymProviderConfigPath(value);
- else if (QueryHandlerParams.PARAM_USE_COMPOUNDFILE.equals(name))
- searchIndex.setUseCompoundFile(Boolean.parseBoolean(value));
- else if (QueryHandlerParams.PARAM_VOLATILE_IDLE_TIME.equals(name))
- searchIndex.setVolatileIdleTime(Integer.parseInt(value));
- // else if (QueryHandlerParams.PARAM_UPGRADE_INDEX.equals(name))
- // searchIndex.i
+ if (QueryHandlerParams.PARAM_AUTO_REPAIR.equals(name))
+ searchIndex.setAutoRepair(Boolean.parseBoolean(value));
+ else if (QueryHandlerParams.PARAM_BUFFER_SIZE.equals(name))
+ searchIndex.setBufferSize(Integer.parseInt(value));
+ else if (QueryHandlerParams.PARAM_CACHE_SIZE.equals(name))
+ searchIndex.setCacheSize(Integer.parseInt(value));
+ else if (QueryHandlerParams.PARAM_CONSISTENCY_CHECK_ENABLED.equals(name))
+ searchIndex.setEnableConsistencyCheck(Boolean.parseBoolean(value));
+ else if (QueryHandlerParams.PARAM_DOCUMENT_ORDER.equals(name))
+ searchIndex.setRespectDocumentOrder(Boolean.parseBoolean(value));
+ else if (QueryHandlerParams.PARAM_EXCERPTPROVIDER_CLASS.equals(name))
+ searchIndex.setExcerptProviderClass(value);
+ // else if
+ // (QueryHandlerParams.PARAM_EXCLUDED_NODE_IDENTIFERS.equals(name))
+ // searchIndex.setE
+ else if (QueryHandlerParams.PARAM_EXTRACTOR_BACKLOG.equals(name))
+ searchIndex.setExtractorBackLogSize(Integer.parseInt(value));
+ else if (QueryHandlerParams.PARAM_EXTRACTOR_POOLSIZE.equals(name))
+ searchIndex.setExtractorPoolSize(Integer.parseInt(value));
+ else if (QueryHandlerParams.PARAM_EXTRACTOR_TIMEOUT.equals(name))
+ searchIndex.setExtractorTimeout(Long.parseLong(value));
+ else if (QueryHandlerParams.PARAM_FORCE_CONSISTENCYCHECK.equals(name))
+ searchIndex.setForceConsistencyCheck(Boolean.parseBoolean(value));
+ else if (QueryHandlerParams.PARAM_ERRORLOG_SIZE.equals(name))
+ searchIndex.setErrorLogfileSize(Integer.parseInt(value));
+ // else if (QueryHandlerParams.PARAM_INDEX_DIR.equals(name))
+ // searchIndex.setBufferSize(0);
+ // else if (OLD_PARAM_INDEX_DIR
+ else if (QueryHandlerParams.PARAM_INDEXING_CONFIGURATION_PATH.equals(name))
+ searchIndex.setIndexingConfiguration(value);
+ else if (QueryHandlerParams.PARAM_INDEXING_CONFIGURATION_CLASS.equals(name))
+ searchIndex.setIndexingConfigurationClass(value);
+ else if (QueryHandlerParams.PARAM_MAX_FIELD_LENGTH.equals(name))
+ searchIndex.setMaxFieldLength(Integer.parseInt(value));
+ else if (QueryHandlerParams.PARAM_MAX_MERGE_DOCS.equals(name))
+ searchIndex.setMaxMergeDocs(Integer.parseInt(value));
+ else if (QueryHandlerParams.PARAM_MERGE_FACTOR.equals(name))
+ searchIndex.setMergeFactor(Integer.parseInt(value));
+ else if (QueryHandlerParams.PARAM_MIN_MERGE_DOCS.equals(name))
+ searchIndex.setMinMergeDocs(Integer.parseInt(value));
+ else if (QueryHandlerParams.PARAM_QUERY_CLASS.equals(name))
+ searchIndex.setQueryClass(value);
+ else if (QueryHandlerParams.PARAM_RESULT_FETCH_SIZE.equals(name))
+ searchIndex.setResultFetchSize(Integer.parseInt(value));
+ // else if (QueryHandlerParams.PARAM_ROOT_NODE_ID.equals(name))
+ // searchIndex.setBufferSize(0);
+ else if (QueryHandlerParams.PARAM_SPELLCHECKER_CLASS.equals(name))
+ searchIndex.setSpellCheckerClass(value);
+ else if (QueryHandlerParams.PARAM_SUPPORT_HIGHLIGHTING.equals(name))
+ searchIndex.setSupportHighlighting(Boolean.parseBoolean(value));
+ else if (QueryHandlerParams.PARAM_SYNONYMPROVIDER_CLASS.equals(name))
+ searchIndex.setSynonymProviderClass(value);
+ else if (QueryHandlerParams.PARAM_SYNONYMPROVIDER_CONFIG_PATH.equals(name))
+ searchIndex.setSynonymProviderConfigPath(value);
+ else if (QueryHandlerParams.PARAM_USE_COMPOUNDFILE.equals(name))
+ searchIndex.setUseCompoundFile(Boolean.parseBoolean(value));
+ else if (QueryHandlerParams.PARAM_VOLATILE_IDLE_TIME.equals(name))
+ searchIndex.setVolatileIdleTime(Integer.parseInt(value));
+ else if (QueryHandlerParams.PARAM_ANALYZER_CLASS.equals(name))
+ {
+ searchIndex.setAnalyzer(value);
+ }
+ // else if (QueryHandlerParams.PARAM_UPGRADE_INDEX.equals(name))
+ // searchIndex.i
- }
+ }
}
14 years, 8 months
exo-jcr SVN: r280 - in jcr/trunk/applications: java/standalone/backupconsole/bin and 1 other directory.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2009-10-15 07:53:16 -0400 (Thu, 15 Oct 2009)
New Revision: 280
Modified:
jcr/trunk/applications/java/standalone/backupconsole/bin/jcrbackup.cmd
jcr/trunk/applications/java/standalone/backupconsole/bin/jcrbackup.sh
jcr/trunk/applications/product-exo-jcr-as-jboss-ear.xml
jcr/trunk/applications/product-exo-jcr-as-jonas-ear.xml
jcr/trunk/applications/product-exo-jcr-as-tomcat6.xml
Log:
EXOJCR-170 assemblies and scripts updated
Modified: jcr/trunk/applications/java/standalone/backupconsole/bin/jcrbackup.cmd
===================================================================
--- jcr/trunk/applications/java/standalone/backupconsole/bin/jcrbackup.cmd 2009-10-14 15:58:06 UTC (rev 279)
+++ jcr/trunk/applications/java/standalone/backupconsole/bin/jcrbackup.cmd 2009-10-15 11:53:16 UTC (rev 280)
@@ -1 +1 @@
-java -jar exo.jcr.applications.backupconsole-1.12-SNAPSHOT.jar %*
+java -jar exo.jcr.applications.backupconsole-1.12.0-Beta03-SNAPSHOT.jar %*
Modified: jcr/trunk/applications/java/standalone/backupconsole/bin/jcrbackup.sh
===================================================================
--- jcr/trunk/applications/java/standalone/backupconsole/bin/jcrbackup.sh 2009-10-14 15:58:06 UTC (rev 279)
+++ jcr/trunk/applications/java/standalone/backupconsole/bin/jcrbackup.sh 2009-10-15 11:53:16 UTC (rev 280)
@@ -1,3 +1,3 @@
#!/bin/sh
-java -jar exo.jcr.applications.backupconsole-1.12-SNAPSHOT.jar $*
+java -jar exo.jcr.applications.backupconsole-1.12.0-Beta03-SNAPSHOT.jar $*
Modified: jcr/trunk/applications/product-exo-jcr-as-jboss-ear.xml
===================================================================
--- jcr/trunk/applications/product-exo-jcr-as-jboss-ear.xml 2009-10-14 15:58:06 UTC (rev 279)
+++ jcr/trunk/applications/product-exo-jcr-as-jboss-ear.xml 2009-10-15 11:53:16 UTC (rev 280)
@@ -22,7 +22,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.applications.config</artifactId>
- <version>1.12.0-SNAPSHOT</version>
+ <version>1.12.0-Beta03-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -36,7 +36,7 @@
<dependency>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.ear</artifactId>
- <version>1.12-SNAPSHOT</version>
+ <version>1.12.0-Beta03-SNAPSHOT</version>
<type>ear</type>
<scope>runtime</scope>
</dependency>
Modified: jcr/trunk/applications/product-exo-jcr-as-jonas-ear.xml
===================================================================
--- jcr/trunk/applications/product-exo-jcr-as-jonas-ear.xml 2009-10-14 15:58:06 UTC (rev 279)
+++ jcr/trunk/applications/product-exo-jcr-as-jonas-ear.xml 2009-10-15 11:53:16 UTC (rev 280)
@@ -22,7 +22,7 @@
<parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.applications.config</artifactId>
- <version>1.12.0-SNAPSHOT</version>
+ <version>1.12.0-Beta03-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -36,7 +36,7 @@
<dependency>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>exo.jcr.ear</artifactId>
- <version>1.12-SNAPSHOT</version>
+ <version>1.12.0-Beta03-SNAPSHOT</version>
<type>ear</type>
<scope>runtime</scope>
</dependency>
Modified: jcr/trunk/applications/product-exo-jcr-as-tomcat6.xml
===================================================================
--- jcr/trunk/applications/product-exo-jcr-as-tomcat6.xml 2009-10-14 15:58:06 UTC (rev 279)
+++ jcr/trunk/applications/product-exo-jcr-as-tomcat6.xml 2009-10-15 11:53:16 UTC (rev 280)
@@ -21,8 +21,8 @@
<project>
<parent>
<groupId>org.exoplatform.jcr</groupId>
- <artifactId>exo.jcr.applications.config</artifactId>
- <version>1.12.0-SNAPSHOT</version>
+ <artifactId>exo.jcr.applications.config</artifactId>
+ <version>1.12.0-Beta03-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -57,7 +57,7 @@
<descriptor>product-exo-jcr-as-descriptor.xml</descriptor>
</descriptors>
<finalName>lib</finalName>
- <ignoreDirFormatExtensions>false</ignoreDirFormatExtensions>
+ <ignoreDirFormatExtensions>false</ignoreDirFormatExtensions>
</configuration>
</plugin>
<plugin>
14 years, 8 months
exo-jcr SVN: r279 - in ws/branches/2.2.x/rest: core/src/main/java/org/exoplatform/services/rest and 8 other directories.
by do-not-reply@jboss.org
Author: aparfonov
Date: 2009-10-14 11:58:06 -0400 (Wed, 14 Oct 2009)
New Revision: 279
Added:
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ComponentLifecycleScope.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Inject.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/InjectableProvider.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/ServletContainerResponseWriter.java
ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/ContainerObjectFactory.java
ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/
ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/ExoContainerResourceBinder.java
ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/servlet/
ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/servlet/RestServlet.java
Removed:
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ComponentLifecycleScope.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ContainerObjectFactory.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/RestServlet.java
Modified:
ws/branches/2.2.x/rest/core/pom.xml
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ApplicationContextImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/BaseResourceBinder.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ConstructorDescriptorImpl.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterHelper.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterResolverFactory.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/PropertyResolver.java
ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/BaseRestServlet.java
ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/BaseTest.java
ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/RequestDispatcherTest.java
ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/provider/JAXBEntityProviderTest.java
Log:
EXOJCR-185 :
Modified: ws/branches/2.2.x/rest/core/pom.xml
===================================================================
--- ws/branches/2.2.x/rest/core/pom.xml 2009-10-14 15:18:48 UTC (rev 278)
+++ ws/branches/2.2.x/rest/core/pom.xml 2009-10-14 15:58:06 UTC (rev 279)
@@ -33,10 +33,10 @@
<name>eXo WS :: REST :: Core</name>
<dependencies>
- <dependency>
+ <!--dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.component.common</artifactId>
- </dependency>
+ </dependency-->
<dependency>
<groupId>org.exoplatform.core</groupId>
<artifactId>exo.core.component.xml-processing</artifactId>
Deleted: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ComponentLifecycleScope.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ComponentLifecycleScope.java 2009-10-14 15:18:48 UTC (rev 278)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ComponentLifecycleScope.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -1,38 +0,0 @@
-/*
- * 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
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.rest;
-
-/**
- * Object scope identifier.
- */
-@Deprecated
-public enum ComponentLifecycleScope {
- /**
- * New instance of object created foe each request.
- */
- PER_REQUEST,
- /**
- * Singleton lifecycle.
- */
- SINGLETON,
- /**
- * Inversion-of-control framework controls component's lifecycle.
- */
- CONTAINER
-}
Added: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ComponentLifecycleScope.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ComponentLifecycleScope.java (rev 0)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ComponentLifecycleScope.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -0,0 +1,37 @@
+/*
+ * 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
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.rest;
+
+/**
+ * Object scope identifier.
+ */
+public enum ComponentLifecycleScope {
+ /**
+ * New instance of object created foe each request.
+ */
+ PER_REQUEST,
+ /**
+ * Singleton lifecycle.
+ */
+ SINGLETON,
+ /**
+ * Inversion-of-control framework controls component's lifecycle.
+ */
+ IOC
+}
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ComponentLifecycleScope.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Deleted: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ContainerObjectFactory.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ContainerObjectFactory.java 2009-10-14 15:18:48 UTC (rev 278)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ContainerObjectFactory.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -1,66 +0,0 @@
-/*
- * 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
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.rest;
-
-import org.exoplatform.container.ExoContainerContext;
-
-/**
- * Factory provides object that is created and is manageable by
- * inversion-of-control container, PicoContainer.
- *
- * @param <T> any extension of {@link ObjectModel}
- * @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
- */
-@Deprecated
-public class ContainerObjectFactory<T extends ObjectModel> implements ObjectFactory<T>
-{
-
- /**
- * Object model.
- */
- protected final T model;
-
- /**
- * @param model object model
- * @see ObjectModel
- */
- public ContainerObjectFactory(T model)
- {
- this.model = model;
- }
-
- /**
- * {@inheritDoc}
- */
- public Object getInstance(ApplicationContext context)
- {
- Class<?> clazz = model.getObjectClass();
- return ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(clazz);
- }
-
- /**
- * {@inheritDoc}
- */
- public T getObjectModel()
- {
- return model;
- }
-
-}
Added: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Inject.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Inject.java (rev 0)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Inject.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -0,0 +1,38 @@
+/*
+ * 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
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.rest;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Used to annotate fields that should be injected with instances
+ * provided by {@link DependencyInjector}. If DependencyInjector
+ * is not available than field will be not initialized
+
+ * @author <a href="mailto:andrey.parfonov@exoplatform.com">Andrey Parfonov</a>
+ * @version $Id$
+ */
+(a)Target(ElementType.FIELD)
+(a)Retention(RetentionPolicy.RUNTIME)
+public @interface Inject {
+
+}
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/Inject.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ApplicationContextImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ApplicationContextImpl.java 2009-10-14 15:18:48 UTC (rev 278)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ApplicationContextImpl.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -159,6 +159,8 @@
*/
private MultivaluedMap<String, String> queryParameters;
+ private DependencyInjector depInjector;
+
/**
* Constructs new instance of ApplicationContext.
*
@@ -250,10 +252,12 @@
return response;
}
+ /**
+ * {@inheritDoc}
+ */
public DependencyInjector getDependencyInjector()
{
- // TODO Auto-generated method stub
- return null;
+ return depInjector;
}
/**
@@ -477,10 +481,12 @@
return this;
}
+ /**
+ * {@inheritDoc}
+ */
public void setDependencyInjector(DependencyInjector depInjector)
{
- // TODO Auto-generated method stub
-
+ this.depInjector = depInjector;
}
/**
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/BaseResourceBinder.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/BaseResourceBinder.java 2009-10-14 15:18:48 UTC (rev 278)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/BaseResourceBinder.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -59,7 +59,7 @@
/**
* Logger.
*/
- private static final Log LOG = ExoLogger.getLogger("ws.rest.core.ResourceBinder");
+ private static final Log LOG = ExoLogger.getLogger(BaseResourceBinder.class.getName());
private static final Comparator<ObjectFactory<AbstractResourceDescriptor>> RESOURCE_COMPARATOR =
new ResourceComparator();
@@ -112,46 +112,6 @@
}
/**
- * @param containerContext eXo container context
- * @throws Exception if can't set instance of {@link RuntimeDelegate}
- */
- /*
- @SuppressWarnings("unchecked")
- public ResourceBinder(ExoContainerContext containerContext) throws Exception
- {
- // Initialize RuntimeDelegate instance
- // This is first component in life cycle what needs.
- // TODO better solution to initialize RuntimeDelegate
- rd = new RuntimeDelegateImpl();
- RuntimeDelegate.setInstance(rd);
-
- ExoContainer container = containerContext.getContainer();
-
- // Lookup Applications
- List<Application> al = container.getComponentInstancesOfType(Application.class);
- for (Application a : al)
- {
- try
- {
- addApplication(a);
- }
- catch (Exception e)
- {
- LOG.error("Failed add JAX-RS application " + a.getClass().getName(), e);
- }
- }
-
- // Lookup all object which implements ResourceContainer interface and
- // process them to be add as root resources.
- for (Object resource : container.getComponentInstancesOfType(ResourceContainer.class))
- {
- bind(resource);
- }
-
- }
- */
-
- /**
* @param application Application
* @see Application
*/
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ConstructorDescriptorImpl.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ConstructorDescriptorImpl.java 2009-10-14 15:18:48 UTC (rev 278)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/ConstructorDescriptorImpl.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -239,6 +239,8 @@
}
else
{
+ // XXX need to use @Inject annotation here ???
+
// If parameter not has not annotation then get constructor parameter
// from DependencyInjector, this is out of scope JAX-RS specification.
Added: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/InjectableProvider.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/InjectableProvider.java (rev 0)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/InjectableProvider.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -0,0 +1,48 @@
+/*
+ * 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
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.rest.impl.method;
+
+import org.exoplatform.services.rest.ApplicationContext;
+import org.exoplatform.services.rest.Inject;
+import org.exoplatform.services.rest.Parameter;
+
+/**
+ * @author <a href="mailto:andrey.parfonov@exoplatform.com">Andrey Parfonov</a>
+ * @version $Id$
+ */
+public class InjectableProvider extends ParameterResolver<Inject>
+{
+
+ InjectableProvider(Inject inject)
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Object resolve(Parameter parameter, ApplicationContext context) throws Exception
+ {
+ if (context.getDependencyInjector() != null)
+ return context.getDependencyInjector().getInjectableParameter(parameter.getParameterClass(), null);
+
+ return null;
+ }
+
+}
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/InjectableProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterHelper.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterHelper.java 2009-10-14 15:18:48 UTC (rev 278)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterHelper.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.rest.impl.method;
+import org.exoplatform.services.rest.Inject;
import org.exoplatform.services.rest.Property;
import org.exoplatform.services.rest.method.TypeProducer;
@@ -88,11 +89,12 @@
static
{
PROVIDER_FIELDS_ANNOTATIONS =
- Collections.unmodifiableList(Arrays.asList(Context.class.getName(), Property.class.getName()));
-
+ Collections.unmodifiableList(Arrays.asList(Context.class.getName(), Property.class.getName(), Inject.class
+ .getName()));
+
PROVIDER_CONSTRUCTOR_PARAMETER_ANNOTATIONS =
Collections.unmodifiableList(Arrays.asList(Context.class.getName(), Property.class.getName()));
-
+
List<String> tmp1 = new ArrayList<String>(7);
tmp1.add(CookieParam.class.getName());
tmp1.add(Context.class.getName());
@@ -101,6 +103,7 @@
tmp1.add(PathParam.class.getName());
tmp1.add(QueryParam.class.getName());
tmp1.add(Property.class.getName());
+ tmp1.add(Inject.class.getName());
RESOURCE_FIELDS_ANNOTATIONS = Collections.unmodifiableList(tmp1);
RESOURCE_CONSTRUCTOR_PARAMETER_ANNOTATIONS = Collections.unmodifiableList(tmp1);
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterResolverFactory.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterResolverFactory.java 2009-10-14 15:18:48 UTC (rev 278)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/ParameterResolverFactory.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -28,6 +28,7 @@
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
+import org.exoplatform.services.rest.Inject;
import org.exoplatform.services.rest.Property;
/**
@@ -70,6 +71,8 @@
return new QueryParameterResolver((QueryParam)annotation);
if (clazz == Property.class)
return new PropertyResolver((Property)annotation);
+ if (clazz == Inject.class)
+ return new InjectableProvider((Inject)annotation);
return null;
}
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/PropertyResolver.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/PropertyResolver.java 2009-10-14 15:18:48 UTC (rev 278)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/impl/method/PropertyResolver.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -19,13 +19,15 @@
package org.exoplatform.services.rest.impl.method;
import org.exoplatform.services.rest.ApplicationContext;
+import org.exoplatform.services.rest.InitialProperties;
import org.exoplatform.services.rest.Property;
-import org.exoplatform.services.rest.impl.ApplicationContextImpl;
/**
+ * Obtain value of property (see {@link InitialProperties}) with name
+ * supplied in {@link Property#value()} .
+ *
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
* @version $Id$
- *
*/
public class PropertyResolver extends ParameterResolver<Property>
{
@@ -44,9 +46,8 @@
}
/**
- * @see org.exoplatform.services.rest.impl.method.ParameterResolver#resolve(org.exoplatform.services.rest.Parameter, org.exoplatform.services.rest.ApplicationContext)
+ * {@inheritDoc}
*/
- @Override
public Object resolve(org.exoplatform.services.rest.Parameter parameter, ApplicationContext context)
throws Exception
{
Modified: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/BaseRestServlet.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/BaseRestServlet.java 2009-10-14 15:18:48 UTC (rev 278)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/BaseRestServlet.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -20,16 +20,10 @@
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
-import org.exoplatform.services.rest.ContainerResponseWriter;
-import org.exoplatform.services.rest.GenericContainerResponse;
import org.exoplatform.services.rest.RequestHandler;
import org.exoplatform.services.rest.impl.ContainerResponse;
import org.exoplatform.services.rest.impl.EnvironmentContext;
-import org.exoplatform.services.rest.impl.header.HeaderHelper;
import java.io.IOException;
-import java.io.OutputStream;
-import java.util.List;
-import java.util.Map;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
@@ -37,7 +31,6 @@
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.ws.rs.ext.MessageBodyWriter;
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
@@ -48,70 +41,8 @@
private static final long serialVersionUID = -8234561611241680339L;
- /**
- * See {@link ContainerResponseWriter}.
- */
- class ServletContainerResponseWriter implements ContainerResponseWriter
- {
+ private static final Log LOG = ExoLogger.getLogger(BaseRestServlet.class.getName());
- /**
- * See {@link HttpServletResponse}.
- */
- private HttpServletResponse servletResponse;
-
- /**
- * @param response HttpServletResponse
- */
- ServletContainerResponseWriter(HttpServletResponse response)
- {
- this.servletResponse = response;
- }
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("unchecked")
- public void writeBody(GenericContainerResponse response, MessageBodyWriter entityWriter) throws IOException
- {
- Object entity = response.getEntity();
- if (entity != null)
- {
- OutputStream out = servletResponse.getOutputStream();
- entityWriter.writeTo(entity, entity.getClass(), response.getEntityType(), null, response.getContentType(),
- response.getHttpHeaders(), out);
- out.flush();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void writeHeaders(GenericContainerResponse response) throws IOException
- {
- if (servletResponse.isCommitted())
- return;
-
- servletResponse.setStatus(response.getStatus());
-
- if (response.getHttpHeaders() != null)
- {
- // content-type and content-length should be preset in headers
- for (Map.Entry<String, List<Object>> e : response.getHttpHeaders().entrySet())
- {
- String name = e.getKey();
- for (Object o : e.getValue())
- {
- String value = null;
- if (o != null && (value = HeaderHelper.getHeaderAsString(o)) != null)
- servletResponse.addHeader(name, value);
- }
- }
- }
- }
- }
-
- private static final Log LOG = ExoLogger.getLogger(RestServlet.class.getName());
-
private RequestHandler requestHandler;
private ServletConfig servletConfig;
Deleted: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/RestServlet.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/RestServlet.java 2009-10-14 15:18:48 UTC (rev 278)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/RestServlet.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -1,156 +0,0 @@
-/*
- * 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
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.services.rest.servlet;
-
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.container.web.AbstractHttpServlet;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.exoplatform.services.rest.Connector;
-import org.exoplatform.services.rest.ContainerResponseWriter;
-import org.exoplatform.services.rest.GenericContainerResponse;
-import org.exoplatform.services.rest.RequestHandler;
-import org.exoplatform.services.rest.impl.ContainerResponse;
-import org.exoplatform.services.rest.impl.EnvironmentContext;
-import org.exoplatform.services.rest.impl.header.HeaderHelper;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.ws.rs.ext.MessageBodyWriter;
-
-/**
- * This servlet is front-end for the REST engine.
- *
- * @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
- * @version $Id: $
- */
-public class RestServlet extends AbstractHttpServlet implements Connector
-{
-
- private static final Log LOG = ExoLogger.getLogger(RestServlet.class.getName());
-
- /**
- * Generated by Eclipse.
- */
- private static final long serialVersionUID = 2152962763071591181L;
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected void onService(ExoContainer container, HttpServletRequest httpRequest, HttpServletResponse httpResponse)
- throws IOException, ServletException
- {
-
- RequestHandler requestHandler = (RequestHandler)container.getComponentInstanceOfType(RequestHandler.class);
-
- EnvironmentContext env = new EnvironmentContext();
- env.put(HttpServletRequest.class, httpRequest);
- env.put(HttpServletResponse.class, httpResponse);
- env.put(ServletConfig.class, config);
- env.put(ServletContext.class, getServletContext());
-
- try
- {
- EnvironmentContext.setCurrent(env);
- ServletContainerRequest request = new ServletContainerRequest(httpRequest);
- ContainerResponse response = new ContainerResponse(new ServletContainerResponseWriter(httpResponse));
- requestHandler.handleRequest(request, response);
- }
- catch (Exception e)
- {
- LOG.error(e);
- throw new ServletException(e);
- }
- finally
- {
- EnvironmentContext.setCurrent(null);
- }
- }
-
- /**
- * See {@link ContainerResponseWriter}.
- */
- class ServletContainerResponseWriter implements ContainerResponseWriter
- {
-
- /**
- * See {@link HttpServletResponse}.
- */
- private HttpServletResponse servletResponse;
-
- /**
- * @param response HttpServletResponse
- */
- ServletContainerResponseWriter(HttpServletResponse response)
- {
- this.servletResponse = response;
- }
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("unchecked")
- public void writeBody(GenericContainerResponse response, MessageBodyWriter entityWriter) throws IOException
- {
- Object entity = response.getEntity();
- if (entity != null)
- {
- OutputStream out = servletResponse.getOutputStream();
- entityWriter.writeTo(entity, entity.getClass(), response.getEntityType(), null, response.getContentType(),
- response.getHttpHeaders(), out);
- out.flush();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void writeHeaders(GenericContainerResponse response) throws IOException
- {
- if (servletResponse.isCommitted())
- return;
-
- servletResponse.setStatus(response.getStatus());
-
- if (response.getHttpHeaders() != null)
- {
- // content-type and content-length should be preset in headers
- for (Map.Entry<String, List<Object>> e : response.getHttpHeaders().entrySet())
- {
- String name = e.getKey();
- for (Object o : e.getValue())
- {
- String value = null;
- if (o != null && (value = HeaderHelper.getHeaderAsString(o)) != null)
- servletResponse.addHeader(name, value);
- }
- }
- }
- }
- }
-}
Added: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/ServletContainerResponseWriter.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/ServletContainerResponseWriter.java (rev 0)
+++ ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/ServletContainerResponseWriter.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -0,0 +1,96 @@
+/*
+ * 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
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.rest.servlet;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.ext.MessageBodyWriter;
+
+import org.exoplatform.services.rest.ContainerResponseWriter;
+import org.exoplatform.services.rest.GenericContainerResponse;
+import org.exoplatform.services.rest.impl.header.HeaderHelper;
+
+/**
+ * See {@link ContainerResponseWriter}.
+ *
+ * @author <a href="mailto:andrey.parfonov@exoplatform.com">Andrey Parfonov</a>
+ * @version $Id$
+ */
+public class ServletContainerResponseWriter implements ContainerResponseWriter
+{
+
+ /**
+ * See {@link HttpServletResponse}.
+ */
+ private HttpServletResponse servletResponse;
+
+ /**
+ * @param response HttpServletResponse
+ */
+ ServletContainerResponseWriter(HttpServletResponse response)
+ {
+ this.servletResponse = response;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @SuppressWarnings("unchecked")
+ public void writeBody(GenericContainerResponse response, MessageBodyWriter entityWriter) throws IOException
+ {
+ Object entity = response.getEntity();
+ if (entity != null)
+ {
+ OutputStream out = servletResponse.getOutputStream();
+ entityWriter.writeTo(entity, entity.getClass(), response.getEntityType(), null, response.getContentType(),
+ response.getHttpHeaders(), out);
+ out.flush();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void writeHeaders(GenericContainerResponse response) throws IOException
+ {
+ if (servletResponse.isCommitted())
+ return;
+
+ servletResponse.setStatus(response.getStatus());
+
+ if (response.getHttpHeaders() != null)
+ {
+ // content-type and content-length should be preset in headers
+ for (Map.Entry<String, List<Object>> e : response.getHttpHeaders().entrySet())
+ {
+ String name = e.getKey();
+ for (Object o : e.getValue())
+ {
+ String value = null;
+ if (o != null && (value = HeaderHelper.getHeaderAsString(o)) != null)
+ servletResponse.addHeader(name, value);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/ServletContainerResponseWriter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Modified: ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/BaseTest.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/BaseTest.java 2009-10-14 15:18:48 UTC (rev 278)
+++ ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/BaseTest.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -46,7 +46,7 @@
// StandaloneContainer.setConfigurationPath("src/test/java/conf/standalone/test-configuration.xml");
// container = StandaloneContainer.getInstance();
binder = new BaseResourceBinder();
- requestHandler = new RequestHandlerImpl(binder, null/*new SimpleDependencyInjector()*/);
+ requestHandler = new RequestHandlerImpl(binder, new SimpleDependencyInjector());
requestHandler.init();
// reset providers to be sure it is clean
@@ -55,9 +55,14 @@
// Set-up context for tests that are not used full request cycle.
// Usually context is set-up in RequestHandler
+// ApplicationContextImpl.setCurrent(new ApplicationContextImpl(null, null, providers));
+ }
+
+ protected void setContext()
+ {
ApplicationContextImpl.setCurrent(new ApplicationContextImpl(null, null, providers));
}
-
+
public void tearDown() throws Exception
{
}
Modified: ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/RequestDispatcherTest.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/RequestDispatcherTest.java 2009-10-14 15:18:48 UTC (rev 278)
+++ ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/RequestDispatcherTest.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -18,9 +18,6 @@
*/
package org.exoplatform.services.rest.impl;
-import org.exoplatform.services.rest.GenericContainerResponse;
-import org.exoplatform.services.rest.Property;
-
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Encoded;
import javax.ws.rs.GET;
@@ -34,6 +31,10 @@
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.core.UriInfo;
+import org.exoplatform.services.rest.GenericContainerResponse;
+import org.exoplatform.services.rest.Inject;
+import org.exoplatform.services.rest.Property;
+
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
* @version $Id: $
@@ -41,6 +42,21 @@
public class RequestDispatcherTest extends AbstractResourceTest
{
+ public void setUp() throws Exception
+ {
+ binder = new BaseResourceBinder();
+ SimpleDependencyInjector depInjector = new SimpleDependencyInjector();
+ depInjector.put(InjectableComponent1.class, new InjectableComponent1());
+ depInjector.put(InjectableComponent2.class, new InjectableComponent2());
+
+ requestHandler = new RequestHandlerImpl(binder, depInjector);
+ requestHandler.init();
+
+ // reset providers to be sure it is clean
+ ProviderBinder.setInstance(new ProviderBinder());
+ providers = ProviderBinder.getInstance();
+ }
+
@Path("/a")
public static class Resource1
{
@@ -102,7 +118,7 @@
}
}
- public void testResource1() throws Exception
+ public void testSingletonResource() throws Exception
{
Resource1 r1 = new Resource1();
registry(r1);
@@ -148,7 +164,7 @@
}
- public void testResource2() throws Exception
+ public void testSingletonResourceEncodedPath() throws Exception
{
Resource2 r2 = new Resource2();
registry(r2);
@@ -214,10 +230,14 @@
}
//--------------------------------------
- public static class TestContainerComponent
+ public static class InjectableComponent1
{
}
+ public static class InjectableComponent2
+ {
+ }
+
@Path("{a}")
public static class Resource4
{
@@ -228,7 +248,10 @@
@Context
private HttpServletRequest request;
- private TestContainerComponent tc;
+ private InjectableComponent1 ic1;
+
+ @Inject
+ private InjectableComponent2 ic2;
public Resource4(@PathParam("a") String test)
{
@@ -237,34 +260,34 @@
fail("Must not be used.");
}
- public Resource4(TestContainerComponent tc, @PathParam("a") String test)
+ public Resource4(InjectableComponent1 ic, @PathParam("a") String test)
{
- this.tc = tc;
+ this.ic1 = ic;
}
@GET
@Path("{b}")
public void m0()
{
- assertNotNull(tc);
+ assertNotNull(ic1);
+ assertNotNull(ic2);
assertNotNull(uriInfo);
assertNotNull(request);
}
}
- public void testResourceConstructorsContainer() throws Exception
+ public void testResourceConstructorsDependencyInjection() throws Exception
{
-// container.registerComponentInstance(TestContainerComponent.class.getName(), new TestContainerComponent());
registry(Resource4.class);
- service("GET", "/aaa/bbb", "", null, null);
+ assertEquals(204, service("GET", "/aaa/bbb", "", null, null).getStatus());
unregistry(Resource4.class);
}
// --------------------------------------
public static class Failure
{
- // not member of exo-container
+ // may not be provided by DependencyInjector
}
@Path("/_a/b/{c}/{d}")
@@ -283,7 +306,7 @@
}
}
- public void testResourceConstructorFail() throws Exception
+ public void testResourceConstructorDependencyInjectionFail() throws Exception
{
registry(ResourceFail.class);
GenericContainerResponse resp = service("GET", "/_a/b/c/d/m0", "", null, null);
@@ -292,6 +315,7 @@
assertEquals(javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), resp.getStatus());
unregistry(ResourceFail.class);
}
+
//--------------------------------------
@Path("a/{b}/{c}")
@@ -324,7 +348,7 @@
}
- public void testResource5() throws Exception
+ public void testQuery() throws Exception
{
registry(Resource5.class);
service("GET", "/a/b/c/d?q1=q1&q2=q2", "", null, null);
@@ -332,7 +356,7 @@
}
//--------------------------------------
-
+
public void testFieldSuperClass() throws Exception
{
registry(EndResource.class);
@@ -347,7 +371,7 @@
@Context
public Request request;
-
+
@Context
protected UriInfo something;
}
@@ -364,7 +388,7 @@
{
@Context
private HttpHeaders header;
-
+
@Context
private SecurityContext something;
@@ -381,9 +405,9 @@
assertNotNull(header);
}
}
-
+
// -----------------------------------------------
-
+
public void testPropertyInjection() throws Exception
{
registry(Resource6.class);
@@ -391,30 +415,30 @@
RequestHandlerImpl.setProperty("prop2", "test");
service("GET", "/a", "", null, null);
unregistry(Resource6.class);
-
+
}
@Path("a")
public static class Resource6
{
-
+
@Property("prop1")
private String prop1;
-
+
private final String prop2;
-
+
public Resource6(@Property("prop2") String cProp)
{
this.prop2 = cProp;
}
-
+
@GET
public void m1()
{
assertEquals("hello", prop1);
assertEquals("test", prop2);
}
-
+
}
-
+
}
Modified: ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/provider/JAXBEntityProviderTest.java
===================================================================
--- ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/provider/JAXBEntityProviderTest.java 2009-10-14 15:18:48 UTC (rev 278)
+++ ws/branches/2.2.x/rest/core/src/test/java/org/exoplatform/services/rest/impl/provider/JAXBEntityProviderTest.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -18,12 +18,6 @@
*/
package org.exoplatform.services.rest.impl.provider;
-import org.exoplatform.services.rest.generated.Book;
-import org.exoplatform.services.rest.generated.MemberPrice;
-import org.exoplatform.services.rest.generated.Price;
-import org.exoplatform.services.rest.impl.BaseTest;
-import org.exoplatform.services.rest.impl.MultivaluedMapImpl;
-
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
@@ -42,6 +36,12 @@
import javax.xml.transform.Source;
import javax.xml.transform.stream.StreamSource;
+import org.exoplatform.services.rest.generated.Book;
+import org.exoplatform.services.rest.generated.MemberPrice;
+import org.exoplatform.services.rest.generated.Price;
+import org.exoplatform.services.rest.impl.BaseTest;
+import org.exoplatform.services.rest.impl.MultivaluedMapImpl;
+
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
* @version $Id: $
@@ -57,6 +57,7 @@
public void setUp() throws Exception
{
super.setUp();
+ setContext();
mediaType = new MediaType("application", "xml");
data =
("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<book send-by-post=\"true\">"
Copied: ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/ContainerObjectFactory.java (from rev 277, ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/ContainerObjectFactory.java)
===================================================================
--- ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/ContainerObjectFactory.java (rev 0)
+++ ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/ContainerObjectFactory.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -0,0 +1,65 @@
+/*
+ * 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
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.rest;
+
+import org.exoplatform.container.ExoContainerContext;
+
+/**
+ * Factory provides object that is created and is manageable by
+ * inversion-of-control container.
+ *
+ * @param <T> any extension of {@link ObjectModel}
+ * @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
+ * @version $Id$
+ */
+public class ContainerObjectFactory<T extends ObjectModel> implements ObjectFactory<T>
+{
+
+ /**
+ * Object model.
+ */
+ protected final T model;
+
+ /**
+ * @param model object model
+ * @see ObjectModel
+ */
+ public ContainerObjectFactory(T model)
+ {
+ this.model = model;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object getInstance(ApplicationContext context)
+ {
+ Class<?> clazz = model.getObjectClass();
+ return ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(clazz);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public T getObjectModel()
+ {
+ return model;
+ }
+
+}
Property changes on: ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/ContainerObjectFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/ExoContainerResourceBinder.java
===================================================================
--- ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/ExoContainerResourceBinder.java (rev 0)
+++ ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/ExoContainerResourceBinder.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -0,0 +1,100 @@
+/*
+ * 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
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.rest.impl;
+
+import java.util.List;
+
+import javax.ws.rs.core.Application;
+import javax.ws.rs.ext.RuntimeDelegate;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.services.rest.impl.resource.ResourceDescriptorValidator;
+import org.exoplatform.services.rest.resource.ResourceContainer;
+import org.exoplatform.services.rest.resource.ResourceDescriptorVisitor;
+
+/**
+ * @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
+ * @version $Id$
+ */
+public class ExoContainerResourceBinder extends BaseResourceBinder
+{
+
+ /**
+ * Logger.
+ */
+ private static final Log LOG = ExoLogger.getLogger(ExoContainerResourceBinder.class.getName());
+
+ /**
+ * Validator.
+ */
+ private final ResourceDescriptorVisitor rdv = ResourceDescriptorValidator.getInstance();
+
+ /**
+ * @see RuntimeDelegate
+ */
+ private final RuntimeDelegate rd;
+
+ public ExoContainerResourceBinder()
+ {
+ rd = new RuntimeDelegateImpl();
+ RuntimeDelegate.setInstance(rd);
+ }
+
+ /**
+ * @param containerContext eXo container context
+ * @throws Exception if can't set instance of {@link RuntimeDelegate}
+ */
+ @SuppressWarnings("unchecked")
+ public ExoContainerResourceBinder(ExoContainerContext containerContext) throws Exception
+ {
+ // Initialize RuntimeDelegate instance
+ // This is first component in life cycle what needs.
+ // TODO better solution to initialize RuntimeDelegate
+ rd = new RuntimeDelegateImpl();
+ RuntimeDelegate.setInstance(rd);
+
+ ExoContainer container = containerContext.getContainer();
+
+ // Lookup Applications
+ List<Application> al = container.getComponentInstancesOfType(Application.class);
+ for (Application a : al)
+ {
+ try
+ {
+ addApplication(a);
+ }
+ catch (Exception e)
+ {
+ LOG.error("Failed add JAX-RS application " + a.getClass().getName(), e);
+ }
+ }
+
+ // Lookup all object which implements ResourceContainer interface and
+ // process them to be add as root resources.
+ for (Object resource : container.getComponentInstancesOfType(ResourceContainer.class))
+ {
+ bind(resource);
+ }
+
+ }
+
+}
Property changes on: ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/impl/ExoContainerResourceBinder.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Copied: ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/servlet/RestServlet.java (from rev 277, ws/branches/2.2.x/rest/core/src/main/java/org/exoplatform/services/rest/servlet/RestServlet.java)
===================================================================
--- ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/servlet/RestServlet.java (rev 0)
+++ ws/branches/2.2.x/rest/ext/src/main/java/org/exoplatform/services/rest/servlet/RestServlet.java 2009-10-14 15:58:06 UTC (rev 279)
@@ -0,0 +1,87 @@
+/*
+ * 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
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.rest.servlet;
+
+import java.io.IOException;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.web.AbstractHttpServlet;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.services.rest.Connector;
+import org.exoplatform.services.rest.RequestHandler;
+import org.exoplatform.services.rest.impl.ContainerResponse;
+import org.exoplatform.services.rest.impl.EnvironmentContext;
+
+/**
+ * This servlet is front-end for the REST engine.
+ *
+ * @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
+ * @version $Id: $
+ */
+public class RestServlet extends AbstractHttpServlet implements Connector
+{
+
+ private static final Log LOG = ExoLogger.getLogger(RestServlet.class.getName());
+
+ /**
+ * Generated by Eclipse.
+ */
+ private static final long serialVersionUID = 2152962763071591181L;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void onService(ExoContainer container, HttpServletRequest httpRequest, HttpServletResponse httpResponse)
+ throws IOException, ServletException
+ {
+
+ RequestHandler requestHandler = (RequestHandler)container.getComponentInstanceOfType(RequestHandler.class);
+
+ EnvironmentContext env = new EnvironmentContext();
+ env.put(HttpServletRequest.class, httpRequest);
+ env.put(HttpServletResponse.class, httpResponse);
+ env.put(ServletConfig.class, config);
+ env.put(ServletContext.class, getServletContext());
+
+ try
+ {
+ EnvironmentContext.setCurrent(env);
+ ServletContainerRequest request = new ServletContainerRequest(httpRequest);
+ ContainerResponse response = new ContainerResponse(new ServletContainerResponseWriter(httpResponse));
+ requestHandler.handleRequest(request, response);
+ }
+ catch (Exception e)
+ {
+ LOG.error(e);
+ throw new ServletException(e);
+ }
+ finally
+ {
+ EnvironmentContext.setCurrent(null);
+ }
+ }
+}
14 years, 8 months
exo-jcr SVN: r278 - core/trunk/component/security/core/src/main/java/org/exoplatform/services/security/jaas.
by do-not-reply@jboss.org
Author: nfilotto
Date: 2009-10-14 11:18:48 -0400 (Wed, 14 Oct 2009)
New Revision: 278
Modified:
core/trunk/component/security/core/src/main/java/org/exoplatform/services/security/jaas/AbstractLoginModule.java
Log:
EXOJCR-166: Support separated ear delivery
afterInitialize was never called thus it was not possible for sub-classes to initialize
Modified: core/trunk/component/security/core/src/main/java/org/exoplatform/services/security/jaas/AbstractLoginModule.java
===================================================================
--- core/trunk/component/security/core/src/main/java/org/exoplatform/services/security/jaas/AbstractLoginModule.java 2009-10-14 03:44:20 UTC (rev 277)
+++ core/trunk/component/security/core/src/main/java/org/exoplatform/services/security/jaas/AbstractLoginModule.java 2009-10-14 15:18:48 UTC (rev 278)
@@ -93,6 +93,7 @@
this.options = options;
this.portalContainerName = getPortalContainerName(options);
this.realmName = getRealmName(options);
+ afterInitialize();
}
/**
14 years, 8 months