[kune-commits] r1294 - in trunk: . src/main/java/cc/kune/core src/main/java/cc/kune/core/server src/main/java/cc/kune/core/server/access src/main/java/cc/kune/core/server/auth src/main/java/cc/kune/core/server/content src/main/java/cc/kune/core/server/i18n src/main/java/cc/kune/core/server/init src/main/java/cc/kune/core/server/manager src/main/java/cc/kune/core/server/manager/file src/main/java/cc/kune/core/server/manager/impl src/main/java/cc/kune/core/server/mapper src/main/java/cc/kune/core/server/properties src/main/java/cc/kune/core/server/rack src/main/java/cc/kune/core/server/rack/dock src/main/java/cc/kune/core/server/rack/filters src/main/java/cc/kune/core/server/rack/filters/gwts src/main/java/cc/kune/core/server/rack/filters/rest src/main/java/cc/kune/core/server/rack/filters/servlet src/main/java/cc/kune/core/server/rest src/main/java/cc/kune/core/server/rpc src/main/java/cc/kune/core/server/state src/main/java/cc/kune/core/server/tool src/main/java/cc/kune/core/server/users src/main/java/cc/kune/core/server/utils src/main/java/cc/kune/core/server/xmpp src/main/java/cc/kune/core/shared src/main/java/cc/kune/pspace/client src/main/java/cc/kune/wave/server src/main/java/org/ourproject/kune/app src/main/java/org/ourproject/kune/app/public src/main/java/org/ourproject/kune/blogs/server src/main/java/org/ourproject/kune/chat/server src/main/java/org/ourproject/kune/chat/server/managers src/main/java/org/ourproject/kune/docs/server src/main/java/org/ourproject/kune/gallery/server src/main/java/org/ourproject/kune/platf/client/services src/main/java/org/ourproject/kune/platf/server src/main/java/org/ourproject/kune/platf/server/manager src/main/java/org/ourproject/kune/rack src/main/java/org/ourproject/kune/rack/filters src/main/java/org/ourproject/kune/wiki/server src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalimg src/main/java/org/ourproject/kune/workspace/client/editor/insertlocallink src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalmedia src/main/java/org/ourproject/kune/workspace/client/i18n src/main/java/org/ourproject/kune/workspace/client/search src/main/resources src/main/webapp/WEB-INF src/test/java/cc/kune/core src/test/java/cc/kune/core/server src/test/java/cc/kune/core/server/access src/test/java/cc/kune/core/server/auth src/test/java/cc/kune/core/server/domain src/test/java/cc/kune/core/server/finders src/test/java/cc/kune/core/server/manager src/test/java/cc/kune/core/server/manager/file src/test/java/cc/kune/core/server/manager/impl src/test/java/cc/kune/core/server/mapper src/test/java/cc/kune/core/server/properties src/test/java/cc/kune/domain/finders src/test/java/org/ourproject/kune/chat/server/managers src/test/java/org/ourproject/kune/platf/integration src/test/java/org/ourproject/kune/platf/integration/content src/test/java/org/ourproject/kune/platf/integration/kuneservice src/test/java/org/ourproject/kune/platf/integration/site src/test/java/org/ourproject/kune/platf/integration/socialnet src/test/java/org/ourproject/kune/platf/server src/test/java/org/ourproject/kune/platf/server/manager src/test/java/org/ourproject/kune/rack/filters/rest src/test/java/testsuites

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Fri Mar 25 21:21:32 CET 2011


Author: vjrj_
Date: 2011-03-25 21:21:30 +0100 (Fri, 25 Mar 2011)
New Revision: 1294

Added:
   trunk/src/main/java/cc/kune/core/server/
   trunk/src/main/java/cc/kune/core/server/AbstractExtendedModule.java
   trunk/src/main/java/cc/kune/core/server/InitData.java
   trunk/src/main/java/cc/kune/core/server/KuneApplicationListener.java
   trunk/src/main/java/cc/kune/core/server/KuneContainerListener.java
   trunk/src/main/java/cc/kune/core/server/KunePersistenceService.java
   trunk/src/main/java/cc/kune/core/server/KuneRackModule.java
   trunk/src/main/java/cc/kune/core/server/LoggerMethodInterceptor.java
   trunk/src/main/java/cc/kune/core/server/NotInObject.java
   trunk/src/main/java/cc/kune/core/server/OutermostCallInterceptor.java
   trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java
   trunk/src/main/java/cc/kune/core/server/ServerException.java
   trunk/src/main/java/cc/kune/core/server/UserSession.java
   trunk/src/main/java/cc/kune/core/server/access/
   trunk/src/main/java/cc/kune/core/server/auth/
   trunk/src/main/java/cc/kune/core/server/content/
   trunk/src/main/java/cc/kune/core/server/i18n/
   trunk/src/main/java/cc/kune/core/server/init/
   trunk/src/main/java/cc/kune/core/server/manager/
   trunk/src/main/java/cc/kune/core/server/manager/ExtMediaDescripManager.java
   trunk/src/main/java/cc/kune/core/server/manager/FileManager.java
   trunk/src/main/java/cc/kune/core/server/manager/GroupManager.java
   trunk/src/main/java/cc/kune/core/server/manager/I18nCountryManager.java
   trunk/src/main/java/cc/kune/core/server/manager/I18nLanguageManager.java
   trunk/src/main/java/cc/kune/core/server/manager/I18nTranslationManager.java
   trunk/src/main/java/cc/kune/core/server/manager/LicenseManager.java
   trunk/src/main/java/cc/kune/core/server/manager/Manager.java
   trunk/src/main/java/cc/kune/core/server/manager/RateManager.java
   trunk/src/main/java/cc/kune/core/server/manager/SocialNetworkManager.java
   trunk/src/main/java/cc/kune/core/server/manager/TagManager.java
   trunk/src/main/java/cc/kune/core/server/manager/TagUserContentManager.java
   trunk/src/main/java/cc/kune/core/server/manager/TagUserContentManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/manager/ToolConfigurationManager.java
   trunk/src/main/java/cc/kune/core/server/manager/UserManager.java
   trunk/src/main/java/cc/kune/core/server/manager/file/
   trunk/src/main/java/cc/kune/core/server/manager/impl/
   trunk/src/main/java/cc/kune/core/server/mapper/
   trunk/src/main/java/cc/kune/core/server/properties/
   trunk/src/main/java/cc/kune/core/server/rack/
   trunk/src/main/java/cc/kune/core/server/rack/ContainerListener.java
   trunk/src/main/java/cc/kune/core/server/rack/Rack.java
   trunk/src/main/java/cc/kune/core/server/rack/RackBuilder.java
   trunk/src/main/java/cc/kune/core/server/rack/RackHelper.java
   trunk/src/main/java/cc/kune/core/server/rack/RackModule.java
   trunk/src/main/java/cc/kune/core/server/rack/RackServletFilter.java
   trunk/src/main/java/cc/kune/core/server/rack/dock/
   trunk/src/main/java/cc/kune/core/server/rack/filters/
   trunk/src/main/java/cc/kune/core/server/rack/filters/AbstractInjectedFilter.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/ApplicationListener.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/ForwardFilter.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/ListenerFilter.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/LogFilter.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/RedirectFilter.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/gwts/
   trunk/src/main/java/cc/kune/core/server/rack/filters/rest/
   trunk/src/main/java/cc/kune/core/server/rack/filters/servlet/
   trunk/src/main/java/cc/kune/core/server/rest/
   trunk/src/main/java/cc/kune/core/server/rpc/
   trunk/src/main/java/cc/kune/core/server/state/
   trunk/src/main/java/cc/kune/core/server/tool/
   trunk/src/main/java/cc/kune/core/server/users/
   trunk/src/main/java/cc/kune/core/server/utils/
   trunk/src/main/java/cc/kune/core/server/xmpp/
   trunk/src/main/java/cc/kune/core/server/xmpp/ChatConnection.java
   trunk/src/main/java/cc/kune/core/server/xmpp/ChatException.java
   trunk/src/main/java/cc/kune/core/server/xmpp/Room.java
   trunk/src/main/java/cc/kune/core/server/xmpp/RoomConfigurationDumper.java
   trunk/src/main/java/cc/kune/core/server/xmpp/RoomListener.java
   trunk/src/main/java/cc/kune/core/server/xmpp/XmppConnection.java
   trunk/src/main/java/cc/kune/core/server/xmpp/XmppManager.java
   trunk/src/main/java/cc/kune/core/server/xmpp/XmppManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/xmpp/XmppRoom.java
   trunk/src/main/java/cc/kune/core/shared/SearcherConstants.java
   trunk/src/test/java/cc/kune/core/server/
   trunk/src/test/java/cc/kune/core/server/PersistencePreLoadedDataTest.java
   trunk/src/test/java/cc/kune/core/server/PersistenceTest.java
   trunk/src/test/java/cc/kune/core/server/TestConstants.java
   trunk/src/test/java/cc/kune/core/server/TestDomainHelper.java
   trunk/src/test/java/cc/kune/core/server/TestHelper.java
   trunk/src/test/java/cc/kune/core/server/access/
   trunk/src/test/java/cc/kune/core/server/auth/
   trunk/src/test/java/cc/kune/core/server/domain/
   trunk/src/test/java/cc/kune/core/server/finders/
   trunk/src/test/java/cc/kune/core/server/manager/
   trunk/src/test/java/cc/kune/core/server/manager/ContentManagerTest.java
   trunk/src/test/java/cc/kune/core/server/manager/FileManagerDefaultTest.java
   trunk/src/test/java/cc/kune/core/server/manager/GroupManagerTest.java
   trunk/src/test/java/cc/kune/core/server/manager/I18nManagerTest.java
   trunk/src/test/java/cc/kune/core/server/manager/LicenseManagerTest.java
   trunk/src/test/java/cc/kune/core/server/manager/TagManagerTest.java
   trunk/src/test/java/cc/kune/core/server/manager/TagUserContentTest.java
   trunk/src/test/java/cc/kune/core/server/manager/UserManagerTest.java
   trunk/src/test/java/cc/kune/core/server/manager/file/
   trunk/src/test/java/cc/kune/core/server/manager/impl/
   trunk/src/test/java/cc/kune/core/server/mapper/
   trunk/src/test/java/cc/kune/core/server/properties/
Removed:
   trunk/src/main/java/cc/kune/wave/server/CustomServerRpcProvider.java.txt
   trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml
   trunk/src/main/java/org/ourproject/kune/app/client/
   trunk/src/main/java/org/ourproject/kune/app/public/js/
   trunk/src/main/java/org/ourproject/kune/app/server/
   trunk/src/main/java/org/ourproject/kune/chat/server/managers/ChatConnection.java
   trunk/src/main/java/org/ourproject/kune/chat/server/managers/ChatException.java
   trunk/src/main/java/org/ourproject/kune/chat/server/managers/Room.java
   trunk/src/main/java/org/ourproject/kune/chat/server/managers/RoomConfigurationDumper.java
   trunk/src/main/java/org/ourproject/kune/chat/server/managers/RoomListener.java
   trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppConnection.java
   trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppManager.java
   trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppManagerDefault.java
   trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppRoom.java
   trunk/src/main/java/org/ourproject/kune/platf/client/services/SearcherConstants.java
   trunk/src/main/java/org/ourproject/kune/platf/server/InitData.java
   trunk/src/main/java/org/ourproject/kune/platf/server/KunePersistenceService.java
   trunk/src/main/java/org/ourproject/kune/platf/server/LoggerMethodInterceptor.java
   trunk/src/main/java/org/ourproject/kune/platf/server/OutermostCallInterceptor.java
   trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java
   trunk/src/main/java/org/ourproject/kune/platf/server/ServerException.java
   trunk/src/main/java/org/ourproject/kune/platf/server/UserSession.java
   trunk/src/main/java/org/ourproject/kune/platf/server/access/
   trunk/src/main/java/org/ourproject/kune/platf/server/auth/
   trunk/src/main/java/org/ourproject/kune/platf/server/content/
   trunk/src/main/java/org/ourproject/kune/platf/server/i18n/
   trunk/src/main/java/org/ourproject/kune/platf/server/init/
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/ExtMediaDescripManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/FileManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/GroupManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/I18nCountryManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/I18nLanguageManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/I18nTranslationManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/LicenseManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/Manager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/RateManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/SocialNetworkManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/ToolConfigurationManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/UserManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/
   trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/
   trunk/src/main/java/org/ourproject/kune/platf/server/mapper/
   trunk/src/main/java/org/ourproject/kune/platf/server/properties/
   trunk/src/main/java/org/ourproject/kune/platf/server/rest/
   trunk/src/main/java/org/ourproject/kune/platf/server/rpc/
   trunk/src/main/java/org/ourproject/kune/platf/server/state/
   trunk/src/main/java/org/ourproject/kune/platf/server/tool/
   trunk/src/main/java/org/ourproject/kune/platf/server/users/
   trunk/src/main/java/org/ourproject/kune/platf/server/utils/
   trunk/src/main/java/org/ourproject/kune/rack/ContainerListener.java
   trunk/src/main/java/org/ourproject/kune/rack/Rack.java
   trunk/src/main/java/org/ourproject/kune/rack/RackBuilder.java
   trunk/src/main/java/org/ourproject/kune/rack/RackHelper.java
   trunk/src/main/java/org/ourproject/kune/rack/RackModule.java
   trunk/src/main/java/org/ourproject/kune/rack/RackServletFilter.java
   trunk/src/main/java/org/ourproject/kune/rack/dock/
   trunk/src/main/java/org/ourproject/kune/rack/filters/AbstractInjectedFilter.java
   trunk/src/main/java/org/ourproject/kune/rack/filters/ApplicationListener.java
   trunk/src/main/java/org/ourproject/kune/rack/filters/ForwardFilter.java
   trunk/src/main/java/org/ourproject/kune/rack/filters/ListenerFilter.java
   trunk/src/main/java/org/ourproject/kune/rack/filters/LogFilter.java
   trunk/src/main/java/org/ourproject/kune/rack/filters/RedirectFilter.java
   trunk/src/main/java/org/ourproject/kune/rack/filters/gwts/
   trunk/src/main/java/org/ourproject/kune/rack/filters/rest/
   trunk/src/main/java/org/ourproject/kune/rack/filters/servlet/
   trunk/src/test/java/org/ourproject/kune/platf/server/PersistencePreLoadedDataTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/PersistenceTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/TestConstants.java
   trunk/src/test/java/org/ourproject/kune/platf/server/TestDomainHelper.java
   trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java
   trunk/src/test/java/org/ourproject/kune/platf/server/access/
   trunk/src/test/java/org/ourproject/kune/platf/server/auth/
   trunk/src/test/java/org/ourproject/kune/platf/server/domain/
   trunk/src/test/java/org/ourproject/kune/platf/server/finders/
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/ContentManagerTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/FileManagerDefaultTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/GroupManagerTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/I18nManagerTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/LicenseManagerTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagManagerTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagUserContentTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/UserManagerTest.java
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/
   trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/
   trunk/src/test/java/org/ourproject/kune/platf/server/mapper/
   trunk/src/test/java/org/ourproject/kune/platf/server/properties/
Modified:
   trunk/.classpath
   trunk/TODO
   trunk/TROUBLESHOOT
   trunk/src/main/java/cc/kune/core/server/access/AccessRightsService.java
   trunk/src/main/java/cc/kune/core/server/access/AccessRightsServiceDefault.java
   trunk/src/main/java/cc/kune/core/server/access/AccessService.java
   trunk/src/main/java/cc/kune/core/server/access/AccessServiceDefault.java
   trunk/src/main/java/cc/kune/core/server/access/FinderService.java
   trunk/src/main/java/cc/kune/core/server/access/FinderServiceDefault.java
   trunk/src/main/java/cc/kune/core/server/auth/ActionLevel.java
   trunk/src/main/java/cc/kune/core/server/auth/Authenticated.java
   trunk/src/main/java/cc/kune/core/server/auth/AuthenticatedMethodInterceptor.java
   trunk/src/main/java/cc/kune/core/server/auth/Authorizated.java
   trunk/src/main/java/cc/kune/core/server/auth/AuthorizatedMethodInterceptor.java
   trunk/src/main/java/cc/kune/core/server/auth/SessionService.java
   trunk/src/main/java/cc/kune/core/server/auth/SessionServiceDefault.java
   trunk/src/main/java/cc/kune/core/server/content/CommentManager.java
   trunk/src/main/java/cc/kune/core/server/content/CommentManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/content/ContainerManager.java
   trunk/src/main/java/cc/kune/core/server/content/ContainerManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/content/ContentManager.java
   trunk/src/main/java/cc/kune/core/server/content/ContentManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/content/ContentUtils.java
   trunk/src/main/java/cc/kune/core/server/content/CreationService.java
   trunk/src/main/java/cc/kune/core/server/content/CreationServiceDefault.java
   trunk/src/main/java/cc/kune/core/server/i18n/I18nTranslationServiceDefault.java
   trunk/src/main/java/cc/kune/core/server/init/DatabaseInitializer.java
   trunk/src/main/java/cc/kune/core/server/init/FinderRegistry.java
   trunk/src/main/java/cc/kune/core/server/manager/file/EntityLogoDownloadManager.java
   trunk/src/main/java/cc/kune/core/server/manager/file/EntityLogoUploadManager.java
   trunk/src/main/java/cc/kune/core/server/manager/file/FileDownloadManager.java
   trunk/src/main/java/cc/kune/core/server/manager/file/FileDownloadManagerUtils.java
   trunk/src/main/java/cc/kune/core/server/manager/file/FileJsonUploadManagerAbstract.java
   trunk/src/main/java/cc/kune/core/server/manager/file/FileManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/manager/file/FileUploadManager.java
   trunk/src/main/java/cc/kune/core/server/manager/file/FileUploadManagerAbstract.java
   trunk/src/main/java/cc/kune/core/server/manager/file/FileUtils.java
   trunk/src/main/java/cc/kune/core/server/manager/file/ImageUtilsDefault.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/DefaultManager.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/ExtMediaDescripManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/GroupManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/I18nCountryManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/I18nLanguageManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/I18nTranslationManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/LicenseManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/RateManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/SearchResult.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/ServerManagerException.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/SocialNetworkManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/TagManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/ToolConfigurationManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/UserManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/mapper/DozerMapper.java
   trunk/src/main/java/cc/kune/core/server/mapper/GroupListModeConverter.java
   trunk/src/main/java/cc/kune/core/server/mapper/Mapper.java
   trunk/src/main/java/cc/kune/core/server/properties/ChatProperties.java
   trunk/src/main/java/cc/kune/core/server/properties/DatabaseProperties.java
   trunk/src/main/java/cc/kune/core/server/properties/KuneProperties.java
   trunk/src/main/java/cc/kune/core/server/properties/KunePropertiesDefault.java
   trunk/src/main/java/cc/kune/core/server/properties/PropertiesFileName.java
   trunk/src/main/java/cc/kune/core/server/rack/dock/AbstractDock.java
   trunk/src/main/java/cc/kune/core/server/rack/dock/Dock.java
   trunk/src/main/java/cc/kune/core/server/rack/dock/RegexDock.java
   trunk/src/main/java/cc/kune/core/server/rack/dock/RegexMatcher.java
   trunk/src/main/java/cc/kune/core/server/rack/dock/RequestMatcher.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/gwts/DelegatedRemoteServlet.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/gwts/GWTServiceFilter.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/rest/DefaultRESTMethodFinder.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/rest/JSONLibRESTSerializer.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/rest/Parameters.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/rest/ParametersAdapter.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/rest/REST.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTMethod.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTMethodFinder.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTSerializer.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTServiceDefinition.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTServiceFilter.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTServicesModule.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/rest/TransactionalServiceExecutor.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/rest/XStreamRESTSerializer.java
   trunk/src/main/java/cc/kune/core/server/rack/filters/servlet/ServletServiceFilter.java
   trunk/src/main/java/cc/kune/core/server/rest/ContentJSONService.java
   trunk/src/main/java/cc/kune/core/server/rest/GroupJSONService.java
   trunk/src/main/java/cc/kune/core/server/rest/I18nTranslationJSONService.java
   trunk/src/main/java/cc/kune/core/server/rest/TestJSONService.java
   trunk/src/main/java/cc/kune/core/server/rest/UserJSONService.java
   trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java
   trunk/src/main/java/cc/kune/core/server/rpc/GroupRPC.java
   trunk/src/main/java/cc/kune/core/server/rpc/I18nRPC.java
   trunk/src/main/java/cc/kune/core/server/rpc/RPC.java
   trunk/src/main/java/cc/kune/core/server/rpc/SiteRPC.java
   trunk/src/main/java/cc/kune/core/server/rpc/SocialNetworkRPC.java
   trunk/src/main/java/cc/kune/core/server/rpc/UserRPC.java
   trunk/src/main/java/cc/kune/core/server/state/StateAbstract.java
   trunk/src/main/java/cc/kune/core/server/state/StateContainer.java
   trunk/src/main/java/cc/kune/core/server/state/StateContent.java
   trunk/src/main/java/cc/kune/core/server/state/StateNoContent.java
   trunk/src/main/java/cc/kune/core/server/state/StateService.java
   trunk/src/main/java/cc/kune/core/server/state/StateServiceDefault.java
   trunk/src/main/java/cc/kune/core/server/tool/ServerTool.java
   trunk/src/main/java/cc/kune/core/server/tool/ServerToolRegistry.java
   trunk/src/main/java/cc/kune/core/server/tool/ServerToolTarget.java
   trunk/src/main/java/cc/kune/core/server/tool/ToolSimple.java
   trunk/src/main/java/cc/kune/core/server/users/Link.java
   trunk/src/main/java/cc/kune/core/server/users/UserInfo.java
   trunk/src/main/java/cc/kune/core/server/users/UserInfoService.java
   trunk/src/main/java/cc/kune/core/server/users/UserInfoServiceDefault.java
   trunk/src/main/java/cc/kune/core/server/utils/FilenameUtils.java
   trunk/src/main/java/cc/kune/core/server/utils/StringW.java
   trunk/src/main/java/cc/kune/core/server/utils/XmlW.java
   trunk/src/main/java/cc/kune/pspace/client/PSpaceGinModule.java
   trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java
   trunk/src/main/java/org/ourproject/kune/blogs/server/BlogServerTool.java
   trunk/src/main/java/org/ourproject/kune/chat/server/ChatServerTool.java
   trunk/src/main/java/org/ourproject/kune/docs/server/DocumentServerTool.java
   trunk/src/main/java/org/ourproject/kune/gallery/server/GalleryServerTool.java
   trunk/src/main/java/org/ourproject/kune/wiki/server/WikiServerTool.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalimg/InsertImageLocalPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocallink/InsertLinkLocalPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalmedia/InsertMediaLocalPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/search/AbstractLiveSearcherField.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPanel.java
   trunk/src/main/resources/dozerBeanMapping.xml
   trunk/src/main/resources/log4j.dev.properties
   trunk/src/main/resources/log4j.properties
   trunk/src/main/webapp/WEB-INF/web.xml
   trunk/src/test/java/cc/kune/core/server/access/AccessRightsServiceTest.java
   trunk/src/test/java/cc/kune/core/server/access/FinderTest.java
   trunk/src/test/java/cc/kune/core/server/auth/AuthenticatedMethodInterceptorTest.java
   trunk/src/test/java/cc/kune/core/server/auth/AuthorizatedMethodInterceptorTest.java
   trunk/src/test/java/cc/kune/core/server/domain/GroupListTest.java
   trunk/src/test/java/cc/kune/core/server/finders/GroupFinderTest.java
   trunk/src/test/java/cc/kune/core/server/finders/LicenseFinderTest.java
   trunk/src/test/java/cc/kune/core/server/finders/RateFinderTest.java
   trunk/src/test/java/cc/kune/core/server/finders/UserFinderTest.java
   trunk/src/test/java/cc/kune/core/server/manager/file/EntityLogoUploadManagerTest.java
   trunk/src/test/java/cc/kune/core/server/manager/file/FileDownloadManagerTest.java
   trunk/src/test/java/cc/kune/core/server/manager/file/FileManagerTest.java
   trunk/src/test/java/cc/kune/core/server/manager/file/FileUploadManagerTest.java
   trunk/src/test/java/cc/kune/core/server/manager/file/FileUtilsTest.java
   trunk/src/test/java/cc/kune/core/server/manager/file/ImageUtilsDefaultTest.java
   trunk/src/test/java/cc/kune/core/server/manager/impl/AbstractSocialNetworkManagerTest.java
   trunk/src/test/java/cc/kune/core/server/manager/impl/SocialNetworkManagerMoreTest.java
   trunk/src/test/java/cc/kune/core/server/manager/impl/SocialNetworkManagerTest.java
   trunk/src/test/java/cc/kune/core/server/mapper/MapperTest.java
   trunk/src/test/java/cc/kune/core/server/properties/KunePropertiesTest.java
   trunk/src/test/java/cc/kune/domain/finders/TagUserContentFinderTest.java
   trunk/src/test/java/org/ourproject/kune/chat/server/managers/XmppManagerTest.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/DatabaseInitializationTest.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTest.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/content/ContentServiceSaveTest.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/kuneservice/GroupServiceTest.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/site/SiteServiceTest.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/site/UserServiceTest.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/socialnet/SocialNetworkMembersTest.java
   trunk/src/test/java/org/ourproject/kune/platf/integration/socialnet/SocialNetworkServiceTest.java
   trunk/src/test/java/org/ourproject/kune/rack/filters/rest/TestRESTMethodFinder.java
   trunk/src/test/java/org/ourproject/kune/rack/filters/rest/TestRESTServiceDefinition.java
   trunk/src/test/java/testsuites/ServerManagerTestSuite.java
   trunk/src/test/java/testsuites/ServerOtherTestSuite.java
   trunk/src/test/java/testsuites/ServerTestSuite.java
Log:
server refactorization

Modified: trunk/.classpath
===================================================================
--- trunk/.classpath	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/.classpath	2011-03-25 20:21:30 UTC (rev 1294)
@@ -107,7 +107,6 @@
 	<classpathentry kind="var" path="M2_REPO/com/thoughtworks/xstream/xstream/1.2.2/xstream-1.2.2.jar" sourcepath="M2_REPO/com/thoughtworks/xstream/xstream/1.2.2/xstream-1.2.2-sources.jar"/>
 	<classpathentry kind="var" path="M2_REPO/org/xwiki/platform/xwiki-web-gwt-dom/2.3-rc-1/xwiki-web-gwt-dom-2.3-rc-1.jar" sourcepath="M2_REPO/org/xwiki/platform/xwiki-web-gwt-dom/2.3-rc-1/xwiki-web-gwt-dom-2.3-rc-1-sources.jar"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry including="**/*.java" kind="src" path="target/generated-sources/apt"/>
 	<classpathentry kind="lib" path="/home/vjrj/bin/eclipse64-hel-new/plugins/com.google.gwt.eclipse.sdkbundle.2.1.1_2.1.1.v201012170127/gwt-2.1.1/gwt-user.jar">
 		<attributes>
 			<attribute name="javadoc_location" value="file:/home/vjrj/bin/eclipse64-hel-new/plugins/com.google.gwt.eclipse.sdkbundle.2.1.1_2.1.1.v201012170127/gwt-2.1.1/doc/javadoc/"/>

Modified: trunk/TODO
===================================================================
--- trunk/TODO	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/TODO	2011-03-25 20:21:30 UTC (rev 1294)
@@ -48,7 +48,7 @@
 ** TODO >> kune.properties from cmd line
 ** TODO HelloWord with samples of extensions: sitebar, sitebar options menu, siteuseroptions, sn, ...
 ** TODO Register of "reserved words" not permitted for groups/users names (in server and in client)
-** TODO WIAB under proxies
+** WIAB under proxies
 https://groups.google.com/group/wave-protocol/browse_thread/thread/202dee4bfdbdeee6
 ** TODO StateManager #signin while already signed in NPE
 ** TODO Testing Presenters via juckito:

Modified: trunk/TROUBLESHOOT
===================================================================
--- trunk/TROUBLESHOOT	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/TROUBLESHOOT	2011-03-25 20:21:30 UTC (rev 1294)
@@ -13,6 +13,8 @@
 
 Also for different logging levels you can play with -Dorg.eclipse.jetty.util.log.DEBUG=true (or similars)
 
+See also log4j.properties in src/main/resources/
+
 == Client debug ==
 
 You can debug the client with the eclipse launch configuration 'script/kune client -no-server.launch'.

Copied: trunk/src/main/java/cc/kune/core/server/AbstractExtendedModule.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/app/server/AbstractExtendedModule.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/AbstractExtendedModule.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/AbstractExtendedModule.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,112 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server;
+
+import static com.google.inject.name.Names.named;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.aopalliance.intercept.MethodInterceptor;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.matcher.Matcher;
+
+/**
+ * An extension of AbstractModule that provides support for member injection of
+ * instances constructed at bind-time; in particular, itself and
+ * MethodInterceptors.
+ */
+
+/*
+ * See:
+ * http://tembrel.blogspot.com/2007/09/injecting-method-interceptors-in-guice
+ * .html
+ */
+
+public abstract class AbstractExtendedModule extends AbstractModule {
+
+    /**
+     * Hack to ensure unique Keys for binding different instances of
+     * ExtendedModule. The prefix is chosen to reduce the chances of a conflict
+     * with some other use of
+     * 
+     * @Named. A better solution would be to invent an Annotation for just this
+     *         purpose.
+     */
+    private static Annotation getUniqueAnnotation() {
+        return named("ExtendedModule-" + COUNT.incrementAndGet());
+    }
+
+    private final Set<Object> toBeInjected = new HashSet<Object>();
+
+    private boolean selfInjected = false;
+
+    private static final AtomicInteger COUNT = new AtomicInteger();
+
+    /**
+     * Overridden version of bindInterceptor that, in addition to the standard
+     * behavior, arranges for field and method injection of each
+     * MethodInterceptor in {@code interceptors}.
+     */
+    @Override
+    public void bindInterceptor(final Matcher<? super Class<?>> classMatcher,
+            final Matcher<? super Method> methodMatcher, final MethodInterceptor... interceptors) {
+        registerForInjection(interceptors);
+        super.bindInterceptor(classMatcher, methodMatcher, interceptors);
+    }
+
+    /**
+     * Arranges for this module and each of the given objects (if any) to be
+     * field and method injected when the Injector is created. It is safe to
+     * call this method more than once, and it is safe to call it more than once
+     * on the same object(s).
+     */
+    protected <T> void registerForInjection(final T... objects) {
+        ensureSelfInjection();
+        if (objects != null) {
+            for (T object : objects) {
+                if (object != null) {
+                    toBeInjected.add(object);
+                }
+            }
+        }
+    }
+
+    private void ensureSelfInjection() {
+        if (!selfInjected) {
+            bind(AbstractExtendedModule.class).annotatedWith(getUniqueAnnotation()).toInstance(this);
+            selfInjected = true;
+        }
+    }
+
+    @SuppressWarnings("unused")
+    @Inject
+    private void injectRegisteredObjects(final Injector injector) {
+        for (Object injectee : toBeInjected) {
+            injector.injectMembers(injectee);
+        }
+    }
+}

Copied: trunk/src/main/java/cc/kune/core/server/InitData.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/InitData.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/InitData.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/InitData.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,294 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+import cc.kune.core.server.tool.ToolSimple;
+import cc.kune.core.server.users.UserInfo;
+import cc.kune.domain.ExtMediaDescrip;
+import cc.kune.domain.I18nCountry;
+import cc.kune.domain.I18nLanguage;
+import cc.kune.domain.License;
+
+public class InitData {
+
+    private String siteUrl;
+    private List<License> licenses;
+    private List<I18nLanguage> languages;
+    private List<I18nCountry> countries;
+    private String[] timezones;
+    private UserInfo userInfo;
+    private String chatHttpBase;
+    private String siteDomain;
+    private String chatDomain;
+    private String chatRoomHost;
+    private License defaultLicense;
+    private String currentCCversion;
+    private String defaultWsTheme;
+    private String[] wsThemes;
+    private String siteLogoUrl;
+    private String galleryPermittedExtensions;
+    private String maxFileSizeInMb;
+    private int imgResizewidth;
+    private int imgThumbsize;
+    private int imgCropsize;
+    private int imgIconsize;
+    private ArrayList<ToolSimple> userTools;
+    private ArrayList<ToolSimple> groupTools;
+    private List<ExtMediaDescrip> extMediaDescrips;
+
+    private String flvEmbedObject;
+
+    private String oggEmbedObject;
+
+    private String mp3EmbedObject;
+
+    private String aviEmbedObject;
+
+    public String getAviEmbedObject() {
+        return aviEmbedObject;
+    }
+
+    public String getChatDomain() {
+        return chatDomain;
+    }
+
+    public String getChatHttpBase() {
+        return chatHttpBase;
+    }
+
+    public String getChatRoomHost() {
+        return chatRoomHost;
+    }
+
+    public List<I18nCountry> getCountries() {
+        return countries;
+    }
+
+    public String getCurrentCCversion() {
+        return currentCCversion;
+    }
+
+    public License getDefaultLicense() {
+        return defaultLicense;
+    }
+
+    public String getDefaultWsTheme() {
+        return defaultWsTheme;
+    }
+
+    public List<ExtMediaDescrip> getExtMediaDescrips() {
+        return extMediaDescrips;
+    }
+
+    public String getFlvEmbedObject() {
+        return flvEmbedObject;
+    }
+
+    public String getGalleryPermittedExtensions() {
+        return galleryPermittedExtensions;
+    }
+
+    public ArrayList<ToolSimple> getGroupTools() {
+        return groupTools;
+    }
+
+    public int getImgCropsize() {
+        return imgCropsize;
+    }
+
+    public int getImgIconsize() {
+        return imgIconsize;
+    }
+
+    public int getImgResizewidth() {
+        return imgResizewidth;
+    }
+
+    public int getImgThumbsize() {
+        return imgThumbsize;
+    }
+
+    public List<I18nLanguage> getLanguages() {
+        return languages;
+    }
+
+    public List<License> getLicenses() {
+        return licenses;
+    }
+
+    public String getMaxFileSizeInMb() {
+        return maxFileSizeInMb;
+    }
+
+    public String getMp3EmbedObject() {
+        return mp3EmbedObject;
+    }
+
+    public String getOggEmbedObject() {
+        return oggEmbedObject;
+    }
+
+    @Deprecated
+    public String getSiteDomain() {
+        return siteDomain;
+    }
+
+    public String getSiteLogoUrl() {
+        return siteLogoUrl;
+    }
+
+    public String getSiteUrl() {
+        return siteUrl;
+    }
+
+    public String[] getTimezones() {
+        return timezones;
+    }
+
+    public UserInfo getUserInfo() {
+        return userInfo;
+    }
+
+    public ArrayList<ToolSimple> getUserTools() {
+        return userTools;
+    }
+
+    public String[] getWsThemes() {
+        return wsThemes;
+    }
+
+    public void setAviEmbedObject(final String aviEmbedObject) {
+        this.aviEmbedObject = aviEmbedObject;
+    }
+
+    public void setChatDomain(final String chatDomain) {
+        this.chatDomain = chatDomain;
+    }
+
+    public void setChatHttpBase(final String chatHttpBase) {
+        this.chatHttpBase = chatHttpBase;
+    }
+
+    public void setChatRoomHost(final String chatRoomHost) {
+        this.chatRoomHost = chatRoomHost;
+    }
+
+    public void setCountries(final List<I18nCountry> countries) {
+        this.countries = countries;
+    }
+
+    public void setCurrentCCversion(final String currentCCversion) {
+        this.currentCCversion = currentCCversion;
+    }
+
+    public void setDefaultLicense(final License defaultLicense) {
+        this.defaultLicense = defaultLicense;
+    }
+
+    public void setDefaultWsTheme(final String defaultWsTheme) {
+        this.defaultWsTheme = defaultWsTheme;
+    }
+
+    public void setExtMediaDescrips(final List<ExtMediaDescrip> extMediaDescrips) {
+        this.extMediaDescrips = extMediaDescrips;
+    }
+
+    public void setFlvEmbedObject(final String flvEmbedObject) {
+        this.flvEmbedObject = flvEmbedObject;
+    }
+
+    public void setGalleryPermittedExtensions(final String galleryPermittedExtensions) {
+        this.galleryPermittedExtensions = galleryPermittedExtensions;
+    }
+
+    public void setGroupTools(final ArrayList<ToolSimple> groupTools) {
+        this.groupTools = groupTools;
+    }
+
+    public void setImgCropsize(final int imgCropsize) {
+        this.imgCropsize = imgCropsize;
+    }
+
+    public void setImgIconsize(final int imgIconsize) {
+        this.imgIconsize = imgIconsize;
+    }
+
+    public void setImgResizewidth(final int imgResizewidth) {
+        this.imgResizewidth = imgResizewidth;
+    }
+
+    public void setImgThumbsize(final int imgThumbsize) {
+        this.imgThumbsize = imgThumbsize;
+    }
+
+    public void setLanguages(final List<I18nLanguage> languages) {
+        this.languages = languages;
+    }
+
+    public void setLicenses(final List<License> licenses) {
+        this.licenses = licenses;
+    }
+
+    public void setMaxFileSizeInMb(final String maxFileSizeInMb) {
+        this.maxFileSizeInMb = maxFileSizeInMb;
+    }
+
+    public void setMp3EmbedObject(final String mp3EmbedObject) {
+        this.mp3EmbedObject = mp3EmbedObject;
+    }
+
+    public void setOggEmbedObject(final String oggEmbedObject) {
+        this.oggEmbedObject = oggEmbedObject;
+    }
+
+    @Deprecated
+    public void setSiteDomain(final String siteDomain) {
+        this.siteDomain = siteDomain;
+    }
+
+    public void setSiteLogoUrl(final String siteLogoUrl) {
+        this.siteLogoUrl = siteLogoUrl;
+    }
+
+    public void setSiteUrl(final String siteUrl) {
+        this.siteUrl = siteUrl;
+    }
+
+    public void setTimezones(final String[] timezones) {
+        this.timezones = timezones;
+    }
+
+    public void setUserInfo(final UserInfo currentUserInfo) {
+        this.userInfo = currentUserInfo;
+    }
+
+    public void setUserTools(final ArrayList<ToolSimple> userTools) {
+        this.userTools = userTools;
+    }
+
+    public void setWsThemes(final String[] wsThemes) {
+        this.wsThemes = wsThemes;
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/KuneApplicationListener.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/app/server/KuneApplicationListener.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/KuneApplicationListener.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/KuneApplicationListener.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,44 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+import cc.kune.core.server.rack.filters.ApplicationListener;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+class KuneApplicationListener implements ApplicationListener {
+    final Provider<UserSession> userSessionProvider;
+
+    @Inject
+    public KuneApplicationListener(final Provider<UserSession> userSessionProvider) {
+        this.userSessionProvider = userSessionProvider;
+    }
+
+    public void doAfter(final HttpServletRequest request, final HttpServletResponse httpServletResponse) {
+    }
+
+    public void doBefore(final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse) {
+    }
+}
\ No newline at end of file

Copied: trunk/src/main/java/cc/kune/core/server/KuneContainerListener.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/app/server/KuneContainerListener.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/KuneContainerListener.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/KuneContainerListener.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,77 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/**
+ *
+ \*/
+package cc.kune.core.server;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.log4j.PropertyConfigurator;
+
+import cc.kune.core.server.rack.ContainerListener;
+
+import com.google.inject.Inject;
+
+public class KuneContainerListener implements ContainerListener {
+    private final Logger logger; // NOPMD by vjrj on 16/07/09 22:38
+    private final KunePersistenceService persistenceService;
+
+    @Inject
+    public KuneContainerListener(final KunePersistenceService persistenceService, final Logger logger) {
+        this.persistenceService = persistenceService;
+        this.logger = logger;
+    }
+
+    private void configureLog4j() {
+        try {
+            final Properties properties = new Properties();
+            final InputStream input = Thread.currentThread().getContextClassLoader().getResourceAsStream(
+                    "log4j.dev.properties");
+            properties.load(input);
+            PropertyConfigurator.configure(properties);
+        } catch (final IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public Logger getLogger() {
+        return logger;
+    }
+
+    @Override
+    public void start() {
+        configureLog4j();
+        logger.log(Level.INFO, "Starting Kune...");
+        persistenceService.start();
+        logger.log(Level.INFO, "Kune server started");
+    }
+
+    @Override
+    public void stop() {
+        logger.log(Level.INFO, "Stopping Kune...");
+        logger.log(Level.INFO, "Kune server stopped");
+    }
+}
\ No newline at end of file

Copied: trunk/src/main/java/cc/kune/core/server/KunePersistenceService.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/KunePersistenceService.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/KunePersistenceService.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/KunePersistenceService.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,45 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server;
+
+
+import cc.kune.core.server.init.DatabaseInitializer;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import com.google.inject.persist.PersistService;
+
+ at Singleton
+public class KunePersistenceService {
+    @Inject
+    DatabaseInitializer databaseInitializer;
+    @Inject
+    PersistService persistenceService;
+
+    public void start() {
+        try {
+            persistenceService.start();
+            databaseInitializer.initConditional();
+        } catch (final Exception e) {
+            throw new ServerException("Error starting persistence service", e);
+        }
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/KuneRackModule.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/KuneRackModule.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/KuneRackModule.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,154 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.ourproject.kune.blogs.server.BlogServerModule;
+import org.ourproject.kune.chat.server.ChatServerModule;
+import org.ourproject.kune.docs.server.DocumentServerModule;
+import org.ourproject.kune.gallery.server.GalleryServerModule;
+import org.ourproject.kune.wiki.server.WikiServerModule;
+
+import cc.kune.core.client.rpcservices.ContentService;
+import cc.kune.core.client.rpcservices.GroupService;
+import cc.kune.core.client.rpcservices.I18nService;
+import cc.kune.core.client.rpcservices.SiteService;
+import cc.kune.core.client.rpcservices.SocialNetworkService;
+import cc.kune.core.client.rpcservices.UserService;
+import cc.kune.core.server.init.FinderRegistry;
+import cc.kune.core.server.manager.file.EntityLogoDownloadManager;
+import cc.kune.core.server.manager.file.EntityLogoUploadManager;
+import cc.kune.core.server.manager.file.FileDownloadManager;
+import cc.kune.core.server.manager.file.FileUploadManager;
+import cc.kune.core.server.properties.PropertiesFileName;
+import cc.kune.core.server.rack.RackBuilder;
+import cc.kune.core.server.rack.RackModule;
+import cc.kune.core.server.rack.filters.ForwardFilter;
+import cc.kune.core.server.rack.filters.ListenerFilter;
+import cc.kune.core.server.rack.filters.LogFilter;
+import cc.kune.core.server.rack.filters.RedirectFilter;
+import cc.kune.core.server.rack.filters.rest.RESTServicesModule;
+import cc.kune.core.server.rest.ContentJSONService;
+import cc.kune.core.server.rest.GroupJSONService;
+import cc.kune.core.server.rest.I18nTranslationJSONService;
+import cc.kune.core.server.rest.TestJSONService;
+import cc.kune.core.server.rest.UserJSONService;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Module;
+import com.google.inject.Scope;
+import com.google.inject.matcher.Matchers;
+import com.google.inject.persist.jpa.JpaPersistModule;
+import com.google.inject.servlet.GuiceFilter;
+import com.google.inject.servlet.ServletModule;
+import com.google.inject.servlet.SessionScoped;
+
+public class KuneRackModule implements RackModule {
+    public static final Log LOG = LogFactory.getLog(KuneRackModule.class);
+    private final Module configModule;
+
+    public KuneRackModule() {
+        this("development", "kune.properties", null);
+    }
+
+    public KuneRackModule(final String jpaUnit, final String propertiesFileName, final Scope sessionScope) {
+
+        configModule = new AbstractModule() {
+            @Override
+            public void configure() {
+                install(FinderRegistry.init(new JpaPersistModule(jpaUnit)));
+                bindInterceptor(Matchers.any(), new NotInObject(), new LoggerMethodInterceptor());
+                bindConstant().annotatedWith(PropertiesFileName.class).to(propertiesFileName);
+                if (sessionScope != null) {
+                    bindScope(SessionScoped.class, sessionScope);
+                }
+            }
+        };
+    }
+
+    @Override
+    @SuppressWarnings("unchecked")
+    public void configure(final RackBuilder builder) {
+        installGuiceModules(builder);
+
+        builder.add(KuneContainerListener.class);
+
+        builder.exclude("/http-bind.*");
+        builder.exclude("/public/.*");
+        builder.exclude("/images/.*");
+        builder.exclude("/stylesheets/.*");
+        builder.exclude("/javascripts/.*");
+        builder.exclude("/templates/.*");
+
+        /* Wave with context '/' */
+        builder.exclude("/");
+        builder.exclude("/attachment/.*");
+        builder.exclude("/auth/signin");
+        builder.exclude("/auth/signout");
+        builder.exclude("/auth/register");
+        builder.exclude("/fetch/.*");
+        builder.exclude("/robot/dataapi");
+        builder.exclude("/robot/dataapi/oauth/.*");
+        builder.exclude("/robot/dataapi/rpc");
+        builder.exclude("/robot/register/.*");
+        builder.exclude("/robot/rpc");
+        builder.exclude("/gadgets");
+        builder.exclude("/gadgets/.*");
+        builder.exclude("/socket.io/*");
+        builder.exclude("/socket.io/.*]");
+        builder.exclude("/socket");
+        builder.exclude("/static/.*");
+        builder.exclude("/webclient/.*");
+
+        builder.at(".*").install(new LogFilter());
+        builder.at(".*").install(new GuiceFilter());
+
+        // NOTE: Commented this while testing Wave
+        // builder.at("^/$").install(new RedirectFilter("/ws/"));
+        builder.at("^/ws").install(new RedirectFilter("/ws/"));
+
+        builder.at("^/ws/$").install(new ListenerFilter(KuneApplicationListener.class),
+                new ForwardFilter("/ws/ws.html"));
+
+        builder.installGWTServices("^/ws/", SiteService.class, GroupService.class, ContentService.class,
+                UserService.class, SocialNetworkService.class, I18nService.class);
+        builder.installRESTServices("^/ws/json/", TestJSONService.class, GroupJSONService.class, UserJSONService.class,
+                I18nTranslationJSONService.class, ContentJSONService.class);
+        builder.installServlet("^/ws/servlets/", FileUploadManager.class, FileDownloadManager.class,
+                EntityLogoUploadManager.class, EntityLogoDownloadManager.class);
+
+        builder.at("^/ws/(.*)$").install(new ForwardFilter("^/ws/(.*)$", "/ws/{0}"));
+    }
+
+    private void installGuiceModules(final RackBuilder builder) {
+        // https://code.google.com/p/google-guice/wiki/ServletModule
+        builder.use(new ServletModule());
+        builder.use(new PlatformServerModule());
+        builder.use(new DocumentServerModule());
+        builder.use(new BlogServerModule());
+        builder.use(new WikiServerModule());
+        builder.use(new ChatServerModule());
+        builder.use(new GalleryServerModule());
+        builder.use(new RESTServicesModule());
+        builder.use(configModule);
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/LoggerMethodInterceptor.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/LoggerMethodInterceptor.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/LoggerMethodInterceptor.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/LoggerMethodInterceptor.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,124 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server;
+
+import org.aopalliance.intercept.MethodInterceptor;
+import org.aopalliance.intercept.MethodInvocation;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class LoggerMethodInterceptor implements MethodInterceptor {
+
+    private static final Log LOG = LogFactory.getLog(LoggerMethodInterceptor.class);
+    private final boolean simplifyNames;
+
+    public LoggerMethodInterceptor() {
+        this(true);
+    }
+
+    public LoggerMethodInterceptor(final boolean simplifyNames) {
+        this.simplifyNames = simplifyNames;
+    }
+
+    private void addMethodName(final MethodInvocation invocation, final StringBuffer buffer) {
+        buffer.append(".");
+        buffer.append(invocation.getMethod().getName());
+    }
+
+    private void addMethodParameters(final MethodInvocation invocation, final StringBuffer buffer) {
+        buffer.append("(");
+        final Object[] arguments = invocation.getArguments();
+        for (final Object arg : arguments) {
+            buffer.append(getValue(arg)).append(", ");
+        }
+        buffer.append(")");
+    }
+
+    private void addTargetClassName(final MethodInvocation invocation, final StringBuffer buffer) {
+        buffer.append(getSimpleName(invocation.getThis().getClass()));
+    }
+
+    private StringBuffer createBuffer(final MethodInvocation invocation) {
+        final StringBuffer buffer = new StringBuffer();
+        addTargetClassName(invocation, buffer);
+        return buffer;
+    }
+
+    private String getSimpleName(final Class<? extends Object> type) {
+        String simpleName = type.getSimpleName();
+        if (simplifyNames == true) {
+            final int index = simpleName.indexOf('$');
+            if (index > 0) {
+                simpleName = simpleName.substring(0, index);
+            }
+        }
+        return simpleName;
+    }
+
+    private String getValue(final Object result) {
+        if (result == null) {
+            return "null";
+        } else {
+            return result.toString();
+        }
+    }
+
+    @Override
+    public Object invoke(final MethodInvocation invocation) throws Throwable {
+        logInvocation(invocation);
+        try {
+            final Object result = invocation.proceed();
+            logResult(invocation, result);
+            return result;
+        } catch (final Exception e) {
+            logException(invocation, e);
+            throw e;
+        }
+    }
+
+    protected void log(final String output) {
+        LOG.debug(output);
+    }
+
+    protected void logException(final MethodInvocation invocation, final Throwable e) {
+        final StringBuffer buffer = createBuffer(invocation);
+        addMethodName(invocation, buffer);
+        buffer.append(" EXCEPTION => ").append(e.getClass()).append(": ").append(
+                e.getCause() != null ? e.getCause() : "").append(e.getMessage() != null ? e.getMessage() : "");
+        log(buffer.toString());
+    }
+
+    protected void logInvocation(final MethodInvocation invocation) {
+        final StringBuffer buffer = createBuffer(invocation);
+        addMethodName(invocation, buffer);
+        addMethodParameters(invocation, buffer);
+        log(buffer.toString());
+    }
+
+    protected void logResult(final MethodInvocation invocation, final Object result) {
+        final StringBuffer buffer = createBuffer(invocation);
+        addMethodName(invocation, buffer);
+        if (invocation.getMethod().getReturnType() != null) {
+            buffer.append(" => ");
+            buffer.append(getValue(result));
+        }
+        log(buffer.toString());
+    }
+}

Copied: trunk/src/main/java/cc/kune/core/server/NotInObject.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/app/server/NotInObject.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/NotInObject.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/NotInObject.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,46 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server;
+
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.List;
+
+import com.google.inject.matcher.AbstractMatcher;
+
+public class NotInObject extends AbstractMatcher<Method> {
+
+    private final List<String> excluded;
+
+    public NotInObject() {
+        super();
+        // FIXME exclude password
+        excluded = Arrays.asList(new String[] { "finalize", "toString", "hashCode", "getClass", "wait", "equals" });
+    }
+
+    public boolean matches(final Method method) {
+        final String name = method.getName();
+
+        final boolean isGetter = name.startsWith("set");
+        final boolean isExcluded = excluded.contains(name);
+        return !isGetter || !isExcluded;
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/OutermostCallInterceptor.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/OutermostCallInterceptor.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/OutermostCallInterceptor.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/OutermostCallInterceptor.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,78 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server;
+
+import org.aopalliance.intercept.MethodInterceptor;
+import org.aopalliance.intercept.MethodInvocation;
+
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+
+/*
+ * See:
+ * http://tembrel.blogspot.com/2007/09/matcher-and-methodinterceptor-for-dwr.html
+ *
+ */
+
+public final class OutermostCallInterceptor implements MethodInterceptor {
+    /**
+     * Decorates a MethodInterceptor so that only the outermost invocation using
+     * that interceptor will be intercepted and nested invocations willbe
+     * ignored.
+     */
+    public static MethodInterceptor outermostCall(final MethodInterceptor interceptor) {
+        return new OutermostCallInterceptor(interceptor);
+    }
+
+    private final MethodInterceptor interceptor;
+
+    @SuppressWarnings("rawtypes")
+    private final ThreadLocal count = new ThreadLocal() {
+        @Override
+        protected Integer initialValue() {
+            return 0;
+        }
+    };
+
+    private OutermostCallInterceptor(final MethodInterceptor interceptor) {
+        this.interceptor = interceptor;
+    }
+
+    @SuppressWarnings("unchecked")
+    public Object invoke(final MethodInvocation invocation) throws Throwable {
+        final int savedCount = (Integer) count.get();
+        count.set(savedCount + 1);
+        try {
+            if ((Integer) count.get() > 1) {
+                return invocation.proceed();
+            } else {
+                return interceptor.invoke(invocation);
+            }
+        } finally {
+            count.set(savedCount);
+        }
+    }
+
+    /** Ensure underlying interceptor is injected. */
+    @Inject
+    void injectInterceptor(final Injector injector) {
+        injector.injectMembers(interceptor);
+    }
+}

Copied: trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,180 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server;
+
+import static cc.kune.core.server.OutermostCallInterceptor.outermostCall;
+
+
+import cc.kune.core.client.rpcservices.ContentService;
+import cc.kune.core.client.rpcservices.GroupService;
+import cc.kune.core.client.rpcservices.I18nService;
+import cc.kune.core.client.rpcservices.SiteService;
+import cc.kune.core.client.rpcservices.SocialNetworkService;
+import cc.kune.core.client.rpcservices.UserService;
+import cc.kune.core.server.access.AccessRightsService;
+import cc.kune.core.server.access.AccessRightsServiceDefault;
+import cc.kune.core.server.access.AccessService;
+import cc.kune.core.server.access.AccessServiceDefault;
+import cc.kune.core.server.access.FinderService;
+import cc.kune.core.server.access.FinderServiceDefault;
+import cc.kune.core.server.auth.Authenticated;
+import cc.kune.core.server.auth.AuthenticatedMethodInterceptor;
+import cc.kune.core.server.auth.Authorizated;
+import cc.kune.core.server.auth.AuthorizatedMethodInterceptor;
+import cc.kune.core.server.auth.SessionService;
+import cc.kune.core.server.auth.SessionServiceDefault;
+import cc.kune.core.server.content.CommentManager;
+import cc.kune.core.server.content.CommentManagerDefault;
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContainerManagerDefault;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.content.ContentManagerDefault;
+import cc.kune.core.server.content.CreationService;
+import cc.kune.core.server.content.CreationServiceDefault;
+import cc.kune.core.server.i18n.I18nTranslationServiceDefault;
+import cc.kune.core.server.manager.ExtMediaDescripManager;
+import cc.kune.core.server.manager.FileManager;
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.manager.I18nCountryManager;
+import cc.kune.core.server.manager.I18nLanguageManager;
+import cc.kune.core.server.manager.I18nTranslationManager;
+import cc.kune.core.server.manager.LicenseManager;
+import cc.kune.core.server.manager.RateManager;
+import cc.kune.core.server.manager.SocialNetworkManager;
+import cc.kune.core.server.manager.TagManager;
+import cc.kune.core.server.manager.TagUserContentManager;
+import cc.kune.core.server.manager.TagUserContentManagerDefault;
+import cc.kune.core.server.manager.ToolConfigurationManager;
+import cc.kune.core.server.manager.UserManager;
+import cc.kune.core.server.manager.file.EntityLogoDownloadManager;
+import cc.kune.core.server.manager.file.EntityLogoUploadManager;
+import cc.kune.core.server.manager.file.FileDownloadManager;
+import cc.kune.core.server.manager.file.FileManagerDefault;
+import cc.kune.core.server.manager.file.FileUploadManager;
+import cc.kune.core.server.manager.impl.ExtMediaDescripManagerDefault;
+import cc.kune.core.server.manager.impl.GroupManagerDefault;
+import cc.kune.core.server.manager.impl.I18nCountryManagerDefault;
+import cc.kune.core.server.manager.impl.I18nLanguageManagerDefault;
+import cc.kune.core.server.manager.impl.I18nTranslationManagerDefault;
+import cc.kune.core.server.manager.impl.LicenseManagerDefault;
+import cc.kune.core.server.manager.impl.RateManagerDefault;
+import cc.kune.core.server.manager.impl.SocialNetworkManagerDefault;
+import cc.kune.core.server.manager.impl.TagManagerDefault;
+import cc.kune.core.server.manager.impl.ToolConfigurationManagerDefault;
+import cc.kune.core.server.manager.impl.UserManagerDefault;
+import cc.kune.core.server.mapper.DozerMapper;
+import cc.kune.core.server.mapper.Mapper;
+import cc.kune.core.server.properties.KuneProperties;
+import cc.kune.core.server.properties.KunePropertiesDefault;
+import cc.kune.core.server.rpc.ContentRPC;
+import cc.kune.core.server.rpc.GroupRPC;
+import cc.kune.core.server.rpc.I18nRPC;
+import cc.kune.core.server.rpc.SiteRPC;
+import cc.kune.core.server.rpc.SocialNetworkRPC;
+import cc.kune.core.server.rpc.UserRPC;
+import cc.kune.core.server.state.StateService;
+import cc.kune.core.server.state.StateServiceDefault;
+import cc.kune.core.server.tool.ServerToolRegistry;
+import cc.kune.core.server.users.UserInfoService;
+import cc.kune.core.server.users.UserInfoServiceDefault;
+import cc.kune.core.server.xmpp.XmppManager;
+import cc.kune.core.server.xmpp.XmppManagerDefault;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.domain.Comment;
+import cc.kune.domain.SocialNetwork;
+
+import com.google.inject.matcher.Matchers;
+
+public class PlatformServerModule extends AbstractExtendedModule {
+    private void bindFinders() {
+        // http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/Injector.html
+        // (...) Just-in-time bindings created for child injectors will be
+        // created in an ancestor injector whenever possible (...)
+        // (This fails with finders, then we make explicit bindings)
+
+        bind(SocialNetwork.class);
+        bind(Comment.class);
+    }
+
+    private void bindManagers() {
+        bind(UserManager.class).to(UserManagerDefault.class);
+        bind(GroupManager.class).to(GroupManagerDefault.class);
+        bind(ContentManager.class).to(ContentManagerDefault.class);
+        bind(ToolConfigurationManager.class).to(ToolConfigurationManagerDefault.class);
+        bind(ContainerManager.class).to(ContainerManagerDefault.class);
+        bind(LicenseManager.class).to(LicenseManagerDefault.class);
+        bind(SocialNetworkManager.class).to(SocialNetworkManagerDefault.class);
+        bind(XmppManager.class).to(XmppManagerDefault.class);
+        bind(RateManager.class).to(RateManagerDefault.class);
+        bind(I18nCountryManager.class).to(I18nCountryManagerDefault.class);
+        bind(I18nLanguageManager.class).to(I18nLanguageManagerDefault.class);
+        bind(I18nTranslationManager.class).to(I18nTranslationManagerDefault.class);
+        bind(TagManager.class).to(TagManagerDefault.class);
+        bind(TagUserContentManager.class).to(TagUserContentManagerDefault.class);
+        bind(CommentManager.class).to(CommentManagerDefault.class);
+        bind(FileManager.class).to(FileManagerDefault.class);
+        bind(ExtMediaDescripManager.class).to(ExtMediaDescripManagerDefault.class);
+    }
+
+    private void bindRPC() {
+        bind(SiteService.class).to(SiteRPC.class);
+        bind(GroupService.class).to(GroupRPC.class);
+        bind(ContentService.class).to(ContentRPC.class);
+        bind(UserService.class).to(UserRPC.class);
+        bind(SocialNetworkService.class).to(SocialNetworkRPC.class);
+        bind(I18nService.class).to(I18nRPC.class);
+    }
+
+    private void bindServices() {
+        bind(UserInfoService.class).to(UserInfoServiceDefault.class);
+        bind(CreationService.class).to(CreationServiceDefault.class);
+        bind(AccessRightsService.class).to(AccessRightsServiceDefault.class);
+        bind(AccessService.class).to(AccessServiceDefault.class);
+        bind(FinderService.class).to(FinderServiceDefault.class);
+        bind(StateService.class).to(StateServiceDefault.class);
+        bind(I18nTranslationService.class).to(I18nTranslationServiceDefault.class);
+        bind(SessionService.class).to(SessionServiceDefault.class);
+    }
+
+    @Override
+    protected void configure() {
+        // install(PersistService.usingJpa().across(UnitOfWork.TRANSACTION).buildModule());
+        bind(KunePersistenceService.class);
+
+        bindFinders();
+        bindManagers();
+        bindRPC();
+        bindServices();
+        bind(KuneProperties.class).to(KunePropertiesDefault.class);
+        bind(Mapper.class).to(DozerMapper.class);
+        bind(ServerToolRegistry.class);
+        // bind(FileUploadManager.class).in(ServletScopes.REQUEST);
+        bind(FileUploadManager.class);
+        bind(FileDownloadManager.class);
+        bind(EntityLogoUploadManager.class);
+        bind(EntityLogoDownloadManager.class);
+
+        bindInterceptor(Matchers.any(), Matchers.annotatedWith(Authenticated.class),
+                outermostCall(new AuthenticatedMethodInterceptor()));
+        bindInterceptor(Matchers.any(), Matchers.annotatedWith(Authorizated.class),
+                outermostCall(new AuthorizatedMethodInterceptor()));
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/ServerException.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/ServerException.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/ServerException.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/ServerException.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,50 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class ServerException extends RuntimeException {
+
+    private static final long serialVersionUID = 2028618233098694418L;
+
+    private static final Log LOG = LogFactory.getLog(ServerException.class);
+
+    public ServerException() {
+        super();
+    }
+
+    public ServerException(final String text) {
+        super(text);
+        LOG.error(text);
+    }
+
+    public ServerException(final String text, final Throwable cause) {
+        super(text, cause);
+        LOG.error(text, cause);
+    }
+
+    public ServerException(final Throwable cause) {
+        super(cause);
+        LOG.error("ServerManagerException", cause);
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/UserSession.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/UserSession.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/UserSession.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/UserSession.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,74 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server;
+
+
+import cc.kune.core.server.manager.UserManager;
+import cc.kune.domain.User;
+
+import com.google.inject.Inject;
+import com.google.inject.servlet.SessionScoped;
+
+ at SessionScoped
+public class UserSession {
+    private String userHash;
+    private Long userId;
+    private final UserManager manager;
+
+    @Inject
+    public UserSession(final UserManager manager) {
+        this.manager = manager;
+    }
+
+    public String getHash() {
+        return userHash;
+    }
+
+    public User getUser() {
+        return manager.find(userId);
+    }
+
+    public boolean isUserLoggedIn() {
+        return userId != null;
+    }
+
+    public boolean isUserNotLoggedIn() {
+        return !isUserLoggedIn();
+    }
+
+    public void login(final User user, final String newUserHash) {
+        setUser(user);
+        setHash(newUserHash);
+    }
+
+    public void logout() {
+        userId = null;
+        userHash = null;
+    }
+
+    private void setHash(final String hash) {
+        this.userHash = hash;
+    }
+
+    private void setUser(final User user) {
+        userId = user.getId();
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/access (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/access)

Modified: trunk/src/main/java/cc/kune/core/server/access/AccessRightsService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/access/AccessRightsService.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/access/AccessRightsService.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.access;
+package cc.kune.core.server.access;
 
 import cc.kune.core.shared.domain.utils.AccessRights;
 import cc.kune.domain.AccessLists;

Modified: trunk/src/main/java/cc/kune/core/server/access/AccessRightsServiceDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/access/AccessRightsServiceDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/access/AccessRightsServiceDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.access;
+package cc.kune.core.server.access;
 
 import java.util.ArrayList;
 import java.util.HashSet;

Modified: trunk/src/main/java/cc/kune/core/server/access/AccessService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/access/AccessService.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/access/AccessService.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.access;
+package cc.kune.core.server.access;
 
 
 import cc.kune.core.client.errors.DefaultException;

Modified: trunk/src/main/java/cc/kune/core/server/access/AccessServiceDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/access/AccessServiceDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/access/AccessServiceDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.access;
+package cc.kune.core.server.access;
 
 
 import cc.kune.core.client.errors.AccessViolationException;

Modified: trunk/src/main/java/cc/kune/core/server/access/FinderService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/access/FinderService.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/access/FinderService.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.access;
+package cc.kune.core.server.access;
 
 
 import cc.kune.core.client.errors.DefaultException;

Modified: trunk/src/main/java/cc/kune/core/server/access/FinderServiceDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/access/FinderServiceDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/access/FinderServiceDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,22 +17,22 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.access;
+package cc.kune.core.server.access;
 
 import javax.persistence.NoResultException;
 import javax.persistence.PersistenceException;
 
-import org.ourproject.kune.platf.server.content.CommentManager;
-import org.ourproject.kune.platf.server.content.ContainerManager;
-import org.ourproject.kune.platf.server.content.ContentManager;
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.manager.RateManager;
 
 import cc.kune.core.client.errors.ContentNotFoundException;
 import cc.kune.core.client.errors.DefaultException;
 import cc.kune.core.client.errors.GroupNotFoundException;
 import cc.kune.core.client.errors.NoDefaultContentException;
 import cc.kune.core.client.errors.ToolNotFoundException;
+import cc.kune.core.server.content.CommentManager;
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.manager.RateManager;
 import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.domain.Comment;
 import cc.kune.domain.Container;

Copied: trunk/src/main/java/cc/kune/core/server/auth (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/auth)

Modified: trunk/src/main/java/cc/kune/core/server/auth/ActionLevel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/auth/ActionLevel.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/auth/ActionLevel.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.auth;
+package cc.kune.core.server.auth;
 
 public enum ActionLevel {
     group, tool, container, content

Modified: trunk/src/main/java/cc/kune/core/server/auth/Authenticated.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/auth/Authenticated.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/auth/Authenticated.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.auth;
+package cc.kune.core.server.auth;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;

Modified: trunk/src/main/java/cc/kune/core/server/auth/AuthenticatedMethodInterceptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/auth/AuthenticatedMethodInterceptor.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/auth/AuthenticatedMethodInterceptor.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.auth;
+package cc.kune.core.server.auth;
 
 import javax.servlet.http.HttpServletRequest;
 
@@ -25,10 +25,10 @@
 import org.aopalliance.intercept.MethodInvocation;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.ourproject.kune.platf.server.UserSession;
 
 import cc.kune.core.client.errors.SessionExpiredException;
 import cc.kune.core.client.errors.UserMustBeLoggedException;
+import cc.kune.core.server.UserSession;
 
 import com.google.inject.Inject;
 import com.google.inject.Provider;

Modified: trunk/src/main/java/cc/kune/core/server/auth/Authorizated.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/auth/Authorizated.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/auth/Authorizated.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.auth;
+package cc.kune.core.server.auth;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;

Modified: trunk/src/main/java/cc/kune/core/server/auth/AuthorizatedMethodInterceptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/auth/AuthorizatedMethodInterceptor.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/auth/AuthorizatedMethodInterceptor.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,19 +17,19 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.auth;
+package cc.kune.core.server.auth;
 
 import javax.persistence.NoResultException;
 
 import org.aopalliance.intercept.MethodInterceptor;
 import org.aopalliance.intercept.MethodInvocation;
-import org.ourproject.kune.platf.server.UserSession;
-import org.ourproject.kune.platf.server.access.AccessRightsService;
-import org.ourproject.kune.platf.server.access.AccessService;
-import org.ourproject.kune.platf.server.content.ContentUtils;
-import org.ourproject.kune.platf.server.manager.GroupManager;
 
 import cc.kune.core.client.errors.AccessViolationException;
+import cc.kune.core.server.UserSession;
+import cc.kune.core.server.access.AccessRightsService;
+import cc.kune.core.server.access.AccessService;
+import cc.kune.core.server.content.ContentUtils;
+import cc.kune.core.server.manager.GroupManager;
 import cc.kune.core.shared.domain.AccessRol;
 import cc.kune.core.shared.domain.utils.AccessRights;
 import cc.kune.core.shared.domain.utils.StateToken;

Modified: trunk/src/main/java/cc/kune/core/server/auth/SessionService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/auth/SessionService.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/auth/SessionService.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.auth;
+package cc.kune.core.server.auth;
 
 public interface SessionService {
 

Modified: trunk/src/main/java/cc/kune/core/server/auth/SessionServiceDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/auth/SessionServiceDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/auth/SessionServiceDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.auth;
+package cc.kune.core.server.auth;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;

Copied: trunk/src/main/java/cc/kune/core/server/content (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/content)

Modified: trunk/src/main/java/cc/kune/core/server/content/CommentManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/content/CommentManager.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/content/CommentManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,11 +17,11 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.content;
+package cc.kune.core.server.content;
 
-import org.ourproject.kune.platf.server.manager.Manager;
 
 import cc.kune.core.client.errors.DefaultException;
+import cc.kune.core.server.manager.Manager;
 import cc.kune.domain.Comment;
 import cc.kune.domain.User;
 

Modified: trunk/src/main/java/cc/kune/core/server/content/CommentManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/content/CommentManagerDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/content/CommentManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,15 +17,15 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.content;
+package cc.kune.core.server.content;
 
 import javax.persistence.EntityManager;
 
-import org.ourproject.kune.platf.server.access.FinderService;
-import org.ourproject.kune.platf.server.manager.impl.DefaultManager;
 
 import cc.kune.core.client.errors.ContentNotFoundException;
 import cc.kune.core.client.errors.DefaultException;
+import cc.kune.core.server.access.FinderService;
+import cc.kune.core.server.manager.impl.DefaultManager;
 import cc.kune.domain.Comment;
 import cc.kune.domain.Content;
 import cc.kune.domain.User;

Modified: trunk/src/main/java/cc/kune/core/server/content/ContainerManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/content/ContainerManager.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/content/ContainerManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,12 +17,12 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.content;
+package cc.kune.core.server.content;
 
-import org.ourproject.kune.platf.server.manager.Manager;
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
 
 import cc.kune.core.client.errors.DefaultException;
+import cc.kune.core.server.manager.Manager;
+import cc.kune.core.server.manager.impl.SearchResult;
 import cc.kune.domain.AccessLists;
 import cc.kune.domain.Container;
 import cc.kune.domain.Group;

Modified: trunk/src/main/java/cc/kune/core/server/content/ContainerManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/content/ContainerManagerDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/content/ContainerManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.content;
+package cc.kune.core.server.content;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -28,14 +28,14 @@
 import org.apache.lucene.queryParser.MultiFieldQueryParser;
 import org.apache.lucene.queryParser.ParseException;
 import org.apache.lucene.search.Query;
-import org.ourproject.kune.platf.server.manager.file.FileUtils;
-import org.ourproject.kune.platf.server.manager.impl.DefaultManager;
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
-import org.ourproject.kune.platf.server.manager.impl.ServerManagerException;
-import org.ourproject.kune.platf.server.utils.FilenameUtils;
 
 import cc.kune.core.client.errors.DefaultException;
 import cc.kune.core.client.errors.NameInUseException;
+import cc.kune.core.server.manager.file.FileUtils;
+import cc.kune.core.server.manager.impl.DefaultManager;
+import cc.kune.core.server.manager.impl.SearchResult;
+import cc.kune.core.server.manager.impl.ServerManagerException;
+import cc.kune.core.server.utils.FilenameUtils;
 import cc.kune.domain.AccessLists;
 import cc.kune.domain.Container;
 import cc.kune.domain.Group;

Modified: trunk/src/main/java/cc/kune/core/server/content/ContentManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManager.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/content/ContentManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,14 +17,14 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.content;
+package cc.kune.core.server.content;
 
 import java.util.Date;
 
-import org.ourproject.kune.platf.server.manager.Manager;
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
 
 import cc.kune.core.client.errors.DefaultException;
+import cc.kune.core.server.manager.Manager;
+import cc.kune.core.server.manager.impl.SearchResult;
 import cc.kune.core.shared.domain.ContentStatus;
 import cc.kune.core.shared.domain.RateResult;
 import cc.kune.domain.Container;

Modified: trunk/src/main/java/cc/kune/core/server/content/ContentManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManagerDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/content/ContentManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.content;
+package cc.kune.core.server.content;
 
 import java.util.Date;
 import java.util.List;
@@ -28,18 +28,18 @@
 import org.apache.lucene.queryParser.MultiFieldQueryParser;
 import org.apache.lucene.queryParser.ParseException;
 import org.apache.lucene.search.Query;
-import org.ourproject.kune.platf.server.access.FinderService;
-import org.ourproject.kune.platf.server.manager.TagUserContentManager;
-import org.ourproject.kune.platf.server.manager.file.FileUtils;
-import org.ourproject.kune.platf.server.manager.impl.DefaultManager;
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
-import org.ourproject.kune.platf.server.manager.impl.ServerManagerException;
-import org.ourproject.kune.platf.server.utils.FilenameUtils;
 
 import cc.kune.core.client.errors.DefaultException;
 import cc.kune.core.client.errors.I18nNotFoundException;
 import cc.kune.core.client.errors.NameInUseException;
 import cc.kune.core.client.errors.UserNotFoundException;
+import cc.kune.core.server.access.FinderService;
+import cc.kune.core.server.manager.TagUserContentManager;
+import cc.kune.core.server.manager.file.FileUtils;
+import cc.kune.core.server.manager.impl.DefaultManager;
+import cc.kune.core.server.manager.impl.SearchResult;
+import cc.kune.core.server.manager.impl.ServerManagerException;
+import cc.kune.core.server.utils.FilenameUtils;
 import cc.kune.core.shared.domain.ContentStatus;
 import cc.kune.core.shared.domain.RateResult;
 import cc.kune.domain.Container;

Modified: trunk/src/main/java/cc/kune/core/server/content/ContentUtils.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentUtils.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/content/ContentUtils.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.content;
+package cc.kune.core.server.content;
 
 import cc.kune.core.client.errors.ContentNotFoundException;
 

Modified: trunk/src/main/java/cc/kune/core/server/content/CreationService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/content/CreationService.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/content/CreationService.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.content;
+package cc.kune.core.server.content;
 
 
 import cc.kune.domain.Container;

Modified: trunk/src/main/java/cc/kune/core/server/content/CreationServiceDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/content/CreationServiceDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/content/CreationServiceDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,10 +17,10 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.content;
+package cc.kune.core.server.content;
 
-import org.ourproject.kune.platf.server.tool.ServerToolRegistry;
 
+import cc.kune.core.server.tool.ServerToolRegistry;
 import cc.kune.domain.Container;
 import cc.kune.domain.Content;
 import cc.kune.domain.Group;

Copied: trunk/src/main/java/cc/kune/core/server/i18n (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/i18n)

Modified: trunk/src/main/java/cc/kune/core/server/i18n/I18nTranslationServiceDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/i18n/I18nTranslationServiceDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/i18n/I18nTranslationServiceDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,12 +17,12 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.i18n;
+package cc.kune.core.server.i18n;
 
-import org.ourproject.kune.platf.server.UserSession;
-import org.ourproject.kune.platf.server.manager.I18nTranslationManager;
 
 import cc.kune.common.client.utils.TextUtils;
+import cc.kune.core.server.UserSession;
+import cc.kune.core.server.manager.I18nTranslationManager;
 import cc.kune.core.shared.i18n.I18nTranslationService;
 import cc.kune.domain.I18nTranslation;
 

Copied: trunk/src/main/java/cc/kune/core/server/init (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/init)

Modified: trunk/src/main/java/cc/kune/core/server/init/DatabaseInitializer.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/init/DatabaseInitializer.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/init/DatabaseInitializer.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,20 +1,20 @@
-package org.ourproject.kune.platf.server.init;
+package cc.kune.core.server.init;
 
 import java.util.TimeZone;
 
 import javax.persistence.NoResultException;
 
-import org.ourproject.kune.platf.server.content.ContentManager;
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.manager.I18nCountryManager;
-import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
-import org.ourproject.kune.platf.server.manager.I18nTranslationManager;
-import org.ourproject.kune.platf.server.manager.LicenseManager;
-import org.ourproject.kune.platf.server.manager.UserManager;
-import org.ourproject.kune.platf.server.properties.DatabaseProperties;
 import org.waveprotocol.box.server.authentication.PasswordDigest;
 
 import cc.kune.core.client.errors.UserMustBeLoggedException;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.manager.I18nCountryManager;
+import cc.kune.core.server.manager.I18nLanguageManager;
+import cc.kune.core.server.manager.I18nTranslationManager;
+import cc.kune.core.server.manager.LicenseManager;
+import cc.kune.core.server.manager.UserManager;
+import cc.kune.core.server.properties.DatabaseProperties;
 import cc.kune.core.shared.domain.ContentStatus;
 import cc.kune.core.shared.dto.GroupType;
 import cc.kune.domain.Content;

Modified: trunk/src/main/java/cc/kune/core/server/init/FinderRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/init/FinderRegistry.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/init/FinderRegistry.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,4 +1,4 @@
-package org.ourproject.kune.platf.server.init;
+package cc.kune.core.server.init;
 
 import cc.kune.domain.finders.ContainerFinder;
 import cc.kune.domain.finders.ContentFinder;

Copied: trunk/src/main/java/cc/kune/core/server/manager/ExtMediaDescripManager.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/ExtMediaDescripManager.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/ExtMediaDescripManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/manager/ExtMediaDescripManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import java.util.List;
+
+import cc.kune.domain.ExtMediaDescrip;
+
+public interface ExtMediaDescripManager extends Manager<ExtMediaDescrip, Long> {
+    List<ExtMediaDescrip> getAll();
+}

Copied: trunk/src/main/java/cc/kune/core/server/manager/FileManager.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/FileManager.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/FileManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/manager/FileManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,54 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package cc.kune.core.server.manager;
+
+import java.io.File;
+import java.io.IOException;
+
+public interface FileManager {
+
+    /**
+     * Create a new file adding a numeric sequence if the file already exists
+     * 
+     * @param dir
+     *            the directory (use File.separator for dir delimiters)
+     * @param fileName
+     *            (the new file name)
+     * @return if 'file.txt' exists it creates 'file 1.txt' and if 'file 1.txt'
+     *         exists it creates 'file 2.txt' and so on
+     * @throws IOException
+     */
+    File createFileWithSequentialName(String dir, String fileName) throws IOException;
+
+    /**
+     * @param dir
+     *            the directory (use File.separator for dir delimiters)
+     * @return true if and only if the directory was created, along with all
+     *         necessary parent directories; false otherwise
+     */
+    boolean mkdir(String dir);
+
+    /**
+     * @param dir
+     *            the directory (use File.separator for dir delimiters)
+     */
+    boolean rmdir(String dir) throws IOException;
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/manager/GroupManager.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/GroupManager.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/GroupManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/manager/GroupManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,77 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import java.util.List;
+
+
+import cc.kune.core.client.errors.AccessViolationException;
+import cc.kune.core.client.errors.EmailAddressInUseException;
+import cc.kune.core.client.errors.GroupNameInUseException;
+import cc.kune.core.client.errors.UserMustBeLoggedException;
+import cc.kune.core.server.manager.impl.SearchResult;
+import cc.kune.domain.Content;
+import cc.kune.domain.Group;
+import cc.kune.domain.User;
+
+public interface GroupManager extends Manager<Group, Long> {
+
+    void changeDefLicense(User user, Group group, String licenseShortName);
+
+    void changeWsTheme(User user, Group group, String theme) throws AccessViolationException;
+
+    void clearGroupBackImage(Group group);
+
+    Group createGroup(Group group, User user) throws GroupNameInUseException, UserMustBeLoggedException;
+
+    Group createUserGroup(User user) throws GroupNameInUseException, EmailAddressInUseException;
+
+    Group createUserGroup(User user, boolean wantPersonalHomepage) throws GroupNameInUseException,
+            EmailAddressInUseException;
+
+    List<Group> findAdminInGroups(Long groupId);
+
+    Group findByShortName(String groupName);
+
+    List<Group> findCollabInGroups(Long groupId);
+
+    List<String> findEnabledTools(Long id);
+
+    /**
+     * IMPORTANT: returns null if userId is null
+     * 
+     * @param userId
+     * @return
+     */
+    Group getGroupOfUserWithId(Long userId);
+
+    Group getSiteDefaultGroup();
+
+    SearchResult<Group> search(String search);
+
+    SearchResult<Group> search(String search, Integer firstResult, Integer maxResults);
+
+    void setDefaultContent(String groupShortName, Content content);
+
+    void setGroupBackImage(Group group, Content content);
+
+    void setToolEnabled(User userLogged, String groupShortName, String toolName, boolean enabled);
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/manager/I18nCountryManager.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/I18nCountryManager.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/I18nCountryManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/manager/I18nCountryManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,32 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import java.util.List;
+
+import cc.kune.domain.I18nCountry;
+
+public interface I18nCountryManager extends Manager<I18nCountry, Long> {
+
+    List<I18nCountry> getAll();
+
+    I18nCountry findByCode(String country);
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/manager/I18nLanguageManager.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/I18nLanguageManager.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/I18nLanguageManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/manager/I18nLanguageManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,32 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import java.util.List;
+
+import cc.kune.domain.I18nLanguage;
+
+public interface I18nLanguageManager extends Manager<I18nLanguage, Long> {
+
+    I18nLanguage findByCode(String language);
+
+    List<I18nLanguage> getAll();
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/manager/I18nTranslationManager.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/I18nTranslationManager.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/I18nTranslationManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/manager/I18nTranslationManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,52 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import java.util.HashMap;
+import java.util.List;
+
+
+import cc.kune.core.client.errors.DefaultException;
+import cc.kune.core.server.manager.impl.SearchResult;
+import cc.kune.domain.I18nTranslation;
+
+public interface I18nTranslationManager extends Manager<I18nTranslation, Long> {
+
+    HashMap<String, String> getLexicon(String language);
+
+    List<I18nTranslation> getTranslatedLexicon(String language);
+
+    SearchResult<I18nTranslation> getTranslatedLexicon(String language, Integer firstResult, Integer maxResults);
+
+    String getTranslation(String language, String text);
+
+    String getTranslation(String language, String text, Integer arg);
+
+    String getTranslation(String language, String text, String arg);
+
+    List<I18nTranslation> getUntranslatedLexicon(String language);
+
+    SearchResult<I18nTranslation> getUntranslatedLexicon(String language, Integer firstResult, Integer maxResults);
+
+    String setTranslation(String id, String translation) throws DefaultException;
+
+    void setTranslation(String language, String text, String translation);
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/manager/LicenseManager.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/LicenseManager.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/LicenseManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/manager/LicenseManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,43 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import java.util.List;
+
+import cc.kune.domain.License;
+import cc.kune.domain.finders.LicenseFinder;
+
+public interface LicenseManager {
+
+    License findByShortName(String licenseDef);
+
+    List<License> getAll();
+
+    List<License> getCC();
+
+    License getDefLicense();
+
+    List<License> getNotCC();
+
+    License persist(final License license);
+
+    void setLicenseFinder(final LicenseFinder licenseFinder);
+
+}
\ No newline at end of file

Copied: trunk/src/main/java/cc/kune/core/server/manager/Manager.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/Manager.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/Manager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/manager/Manager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,49 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import org.apache.lucene.search.BooleanClause;
+
+import cc.kune.core.server.manager.impl.SearchResult;
+
+public interface Manager<T, X> {
+
+    void clear();
+
+    T find(X id);
+
+    T merge(T entity);
+
+    T persist(T entity);
+
+    void reIndex();
+
+    void remove(T entity);
+
+    SearchResult<T> search(final String query, final String[] fields, final BooleanClause.Occur[] flags,
+            final Integer firstResult, final Integer maxResults);
+
+    SearchResult<T> search(final String[] queries, final String[] fields, final BooleanClause.Occur[] flags,
+            final Integer firstResult, final Integer maxResults);
+
+    SearchResult<T> search(final String[] queries, final String[] fields, final Integer firstResult,
+            final Integer maxResults);
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/manager/RateManager.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/RateManager.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/RateManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/manager/RateManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+
+import cc.kune.domain.Content;
+import cc.kune.domain.Rate;
+import cc.kune.domain.User;
+
+public interface RateManager extends Manager<Rate, Long> {
+
+    Rate find(User user, Content content);
+
+    Double getRateAvg(Content content);
+
+    Long getRateByUsers(Content content);
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/manager/SocialNetworkManager.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/SocialNetworkManager.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/SocialNetworkManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/manager/SocialNetworkManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,61 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+
+
+import cc.kune.core.client.errors.AccessViolationException;
+import cc.kune.core.client.errors.DefaultException;
+import cc.kune.core.shared.dto.SocialNetworkRequestResult;
+import cc.kune.domain.Group;
+import cc.kune.domain.SocialNetwork;
+import cc.kune.domain.User;
+import cc.kune.domain.utils.ParticipationData;
+import cc.kune.domain.utils.SocialNetworkData;
+
+public interface SocialNetworkManager extends Manager<SocialNetwork, Long> {
+
+    void acceptJoinGroup(User userLogged, Group group, Group inGroup) throws DefaultException;
+
+    void addGroupToAdmins(User userLogged, Group group, Group inGroup) throws DefaultException;
+
+    void addGroupToCollabs(User userLogged, Group group, Group inGroup) throws DefaultException;
+
+    void addGroupToViewers(User userLogged, Group group, Group inGroup) throws DefaultException;
+
+    void deleteMember(User userLogged, Group group, Group inGroup) throws DefaultException, AccessViolationException;
+
+    void denyJoinGroup(User userLogged, Group group, Group inGroup) throws DefaultException;
+
+    ParticipationData findParticipation(User user, Group group) throws DefaultException;
+
+    SocialNetwork get(User userLogged, Group group) throws DefaultException;
+
+    SocialNetworkData getSocialNetworkData(User userLogged, Group group);
+
+    SocialNetworkRequestResult requestToJoin(User user, Group inGroup) throws DefaultException;
+
+    void setAdminAsCollab(User userLogged, Group group, Group inGroup) throws DefaultException;
+
+    void setCollabAsAdmin(User userLogged, Group group, Group inGroup) throws DefaultException;
+
+    void unJoinGroup(Group groupToUnJoin, Group inGroup) throws DefaultException;
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/manager/TagManager.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagManager.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/TagManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/manager/TagManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import cc.kune.domain.Tag;
+
+public interface TagManager extends Manager<Tag, Long> {
+
+    Tag findByTagName(String tag);
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/manager/TagUserContentManager.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManager.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/TagUserContentManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/manager/TagUserContentManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,38 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import cc.kune.core.shared.domain.TagCloudResult;
+import cc.kune.domain.Content;
+import cc.kune.domain.Group;
+import cc.kune.domain.TagUserContent;
+import cc.kune.domain.User;
+
+public interface TagUserContentManager extends Manager<TagUserContent, Long> {
+
+    TagCloudResult getTagCloudResultByGroup(Group group);
+
+    String getTagsAsString(User user, Content content);
+
+    void remove(User user, Content content);
+
+    void setTags(User user, Content content, String tags);
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/manager/TagUserContentManagerDefault.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/TagUserContentManagerDefault.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/manager/TagUserContentManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,127 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.EntityManager;
+import javax.persistence.NoResultException;
+
+
+import cc.kune.common.client.utils.TextUtils;
+import cc.kune.core.server.manager.impl.DefaultManager;
+import cc.kune.core.shared.domain.TagCloudResult;
+import cc.kune.core.shared.domain.TagCount;
+import cc.kune.domain.Content;
+import cc.kune.domain.Group;
+import cc.kune.domain.Tag;
+import cc.kune.domain.TagUserContent;
+import cc.kune.domain.User;
+import cc.kune.domain.finders.TagUserContentFinder;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class TagUserContentManagerDefault extends DefaultManager<TagUserContent, Long> implements TagUserContentManager {
+    private final TagUserContentFinder finder;
+    private final Provider<EntityManager> provider;
+    private final TagManager tagManager;
+
+    @Inject
+    public TagUserContentManagerDefault(final Provider<EntityManager> provider, final TagManager tagManager,
+            final TagUserContentFinder finder) {
+        super(provider, TagUserContent.class);
+        this.provider = provider;
+        this.tagManager = tagManager;
+        this.finder = finder;
+    }
+
+    List<Tag> find(final User user, final Content content) {
+        return finder.findTags(user, content);
+    }
+
+    private int getMaxCount(final Group group) {
+        return finder.getMaxGrouped(group).intValue();
+    }
+
+    private int getMinCount(final Group group) {
+        return finder.getMinGrouped(group).intValue();
+    }
+
+    private List<TagCount> getSummaryByGroup(final Group group) {
+        return finder.getTagsGroups(group);
+    }
+
+    @Override
+    public TagCloudResult getTagCloudResultByGroup(final Group group) {
+        try {
+            return new TagCloudResult(getSummaryByGroup(group), getMaxCount(group), getMinCount(group));
+        } catch (final NoResultException e) {
+            return new TagCloudResult();
+        }
+    }
+
+    @Override
+    public String getTagsAsString(final User user, final Content content) {
+        final StringBuffer tagConcatenated = new StringBuffer();
+        if (user.getId() != null) {
+            // FIXME: User must be persisted (this fails on tests)
+            final List<Tag> tags = find(user, content);
+            for (final Tag tag : tags) {
+                tagConcatenated.append(" ").append(tag.getName());
+            }
+        }
+        return tagConcatenated.toString().replaceFirst(" ", "");
+    }
+
+    @Override
+    public void remove(final User user, final Content content) {
+        for (final TagUserContent item : finder.find(user, content)) {
+            provider.get().remove(item);
+        }
+    }
+
+    @Override
+    public void setTags(final User user, final Content content, final String tags) {
+        final ArrayList<String> tagsStripped = TextUtils.splitTags(tags);
+        final ArrayList<Tag> tagList = new ArrayList<Tag>();
+
+        for (final String tagString : tagsStripped) {
+            Tag tag;
+            try {
+                tag = tagManager.findByTagName(tagString);
+            } catch (final NoResultException e) {
+                tag = new Tag(tagString);
+                tagManager.persist(tag);
+            }
+            if (!tagList.contains(tag)) {
+                tagList.add(tag);
+            }
+        }
+        remove(user, content);
+        for (final Tag tag : tagList) {
+            final TagUserContent tagUserContent = new TagUserContent(tag, user, content);
+            persist(tagUserContent);
+        }
+    }
+}

Copied: trunk/src/main/java/cc/kune/core/server/manager/ToolConfigurationManager.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/ToolConfigurationManager.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/ToolConfigurationManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/manager/ToolConfigurationManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,26 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import cc.kune.domain.ToolConfiguration;
+
+public interface ToolConfigurationManager extends Manager<ToolConfiguration, Long> {
+    ToolConfiguration persist(ToolConfiguration config);
+}

Copied: trunk/src/main/java/cc/kune/core/server/manager/UserManager.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/UserManager.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/UserManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/manager/UserManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,69 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import org.waveprotocol.box.server.authentication.PasswordDigest;
+
+import cc.kune.core.client.errors.I18nNotFoundException;
+import cc.kune.core.server.manager.impl.SearchResult;
+import cc.kune.domain.User;
+import cc.kune.domain.utils.UserBuddiesData;
+
+public interface UserManager {
+    /**
+     * CreateUser new method with language country and timezone params
+     * 
+     * @param shortName
+     * @param longName
+     * @param email
+     * @param passwd
+     * @param timezone
+     * @param country
+     * @param language
+     * @param timezone
+     * @return User
+     * @throws I18nNotFoundException
+     */
+    User createUser(String shortName, String longName, String email, String passwd, String language, String country,
+            String timezone) throws I18nNotFoundException;
+
+    void createWaveAccount(String shortName, PasswordDigest passwdDigest);
+
+    /**
+     * IMPORTANT: if userId == null, it returns User.UNKNOWN_USER
+     * 
+     * @param userId
+     * @return
+     */
+    User find(Long userId);
+
+    User findByShortname(String shortName);
+
+    UserBuddiesData getUserBuddies(String shortName);
+
+    User login(String nickOrEmail, String passwd);
+
+    void reIndex();
+
+    SearchResult<User> search(String search);
+
+    SearchResult<User> search(String search, Integer firstResult, Integer maxResults);
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/manager/file (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/file)

Modified: trunk/src/main/java/cc/kune/core/server/manager/file/EntityLogoDownloadManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/EntityLogoDownloadManager.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/file/EntityLogoDownloadManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import java.io.IOException;
 
@@ -27,9 +27,9 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.ourproject.kune.platf.server.manager.GroupManager;
 
 import cc.kune.core.client.services.FileConstants;
+import cc.kune.core.server.manager.GroupManager;
 import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.domain.Group;
 

Modified: trunk/src/main/java/cc/kune/core/server/manager/file/EntityLogoUploadManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/EntityLogoUploadManager.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/file/EntityLogoUploadManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -29,12 +29,12 @@
 import magick.MagickException;
 
 import org.apache.commons.fileupload.FileItem;
-import org.ourproject.kune.platf.server.auth.ActionLevel;
-import org.ourproject.kune.platf.server.auth.Authenticated;
-import org.ourproject.kune.platf.server.auth.Authorizated;
-import org.ourproject.kune.platf.server.manager.GroupManager;
 
 import cc.kune.core.client.services.FileConstants;
+import cc.kune.core.server.auth.ActionLevel;
+import cc.kune.core.server.auth.Authenticated;
+import cc.kune.core.server.auth.Authorizated;
+import cc.kune.core.server.manager.GroupManager;
 import cc.kune.core.shared.domain.AccessRol;
 import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.core.shared.i18n.I18nTranslationService;

Modified: trunk/src/main/java/cc/kune/core/server/manager/file/FileDownloadManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManager.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/file/FileDownloadManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -31,16 +31,16 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.ourproject.kune.platf.server.auth.ActionLevel;
-import org.ourproject.kune.platf.server.auth.Authenticated;
-import org.ourproject.kune.platf.server.auth.Authorizated;
-import org.ourproject.kune.platf.server.content.ContentManager;
-import org.ourproject.kune.platf.server.content.ContentUtils;
-import org.ourproject.kune.platf.server.properties.KuneProperties;
 
 import cc.kune.core.client.errors.ContentNotFoundException;
 import cc.kune.core.client.services.FileConstants;
 import cc.kune.core.client.services.ImageSize;
+import cc.kune.core.server.auth.ActionLevel;
+import cc.kune.core.server.auth.Authenticated;
+import cc.kune.core.server.auth.Authorizated;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.content.ContentUtils;
+import cc.kune.core.server.properties.KuneProperties;
 import cc.kune.core.shared.domain.AccessRol;
 import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.domain.BasicMimeType;

Modified: trunk/src/main/java/cc/kune/core/server/manager/file/FileDownloadManagerUtils.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManagerUtils.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/file/FileDownloadManagerUtils.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import java.io.BufferedInputStream;
 import java.io.FileInputStream;

Modified: trunk/src/main/java/cc/kune/core/server/manager/file/FileJsonUploadManagerAbstract.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileJsonUploadManagerAbstract.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/file/FileJsonUploadManagerAbstract.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import java.io.IOException;
 import java.io.Writer;

Modified: trunk/src/main/java/cc/kune/core/server/manager/file/FileManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileManagerDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/file/FileManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,13 +17,14 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import java.io.File;
 import java.io.IOException;
 
-import org.ourproject.kune.platf.server.manager.FileManager;
 
+import cc.kune.core.server.manager.FileManager;
+
 import com.google.inject.Singleton;
 
 @Singleton

Modified: trunk/src/main/java/cc/kune/core/server/manager/file/FileUploadManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileUploadManager.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/file/FileUploadManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -26,18 +26,18 @@
 import net.sf.json.JSONObject;
 
 import org.apache.commons.fileupload.FileItem;
-import org.ourproject.kune.platf.server.UserSession;
-import org.ourproject.kune.platf.server.access.AccessService;
-import org.ourproject.kune.platf.server.auth.ActionLevel;
-import org.ourproject.kune.platf.server.auth.Authenticated;
-import org.ourproject.kune.platf.server.auth.Authorizated;
-import org.ourproject.kune.platf.server.content.ContentManager;
-import org.ourproject.kune.platf.server.content.ContentUtils;
-import org.ourproject.kune.platf.server.manager.FileManager;
-import org.ourproject.kune.platf.server.properties.KuneProperties;
-import org.ourproject.kune.platf.server.utils.StringW;
 
 import cc.kune.core.client.services.ImageSize;
+import cc.kune.core.server.UserSession;
+import cc.kune.core.server.access.AccessService;
+import cc.kune.core.server.auth.ActionLevel;
+import cc.kune.core.server.auth.Authenticated;
+import cc.kune.core.server.auth.Authorizated;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.content.ContentUtils;
+import cc.kune.core.server.manager.FileManager;
+import cc.kune.core.server.properties.KuneProperties;
+import cc.kune.core.server.utils.StringW;
 import cc.kune.core.shared.domain.AccessRol;
 import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.core.shared.i18n.I18nTranslationService;

Modified: trunk/src/main/java/cc/kune/core/server/manager/file/FileUploadManagerAbstract.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileUploadManagerAbstract.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/file/FileUploadManagerAbstract.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import java.io.File;
 import java.io.IOException;
@@ -37,9 +37,9 @@
 import org.apache.commons.fileupload.servlet.ServletFileUpload;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.ourproject.kune.platf.server.properties.KuneProperties;
 
 import cc.kune.core.client.services.FileConstants;
+import cc.kune.core.server.properties.KuneProperties;
 import cc.kune.core.shared.domain.utils.StateToken;
 
 import com.google.inject.Inject;

Modified: trunk/src/main/java/cc/kune/core/server/manager/file/FileUtils.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileUtils.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/file/FileUtils.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import java.io.File;
 import java.io.FileInputStream;

Modified: trunk/src/main/java/cc/kune/core/server/manager/file/ImageUtilsDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/ImageUtilsDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/file/ImageUtilsDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import java.awt.Dimension;
 import java.awt.Rectangle;

Copied: trunk/src/main/java/cc/kune/core/server/manager/impl (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl)

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/DefaultManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/DefaultManager.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/DefaultManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import java.util.List;
 

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/ExtMediaDescripManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/ExtMediaDescripManagerDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/ExtMediaDescripManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,14 +17,14 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import java.util.List;
 
 import javax.persistence.EntityManager;
 
-import org.ourproject.kune.platf.server.manager.ExtMediaDescripManager;
 
+import cc.kune.core.server.manager.ExtMediaDescripManager;
 import cc.kune.domain.ExtMediaDescrip;
 import cc.kune.domain.finders.ExtMediaDescripFinder;
 

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/GroupManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/GroupManagerDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/GroupManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import java.util.Collection;
 import java.util.List;
@@ -31,18 +31,18 @@
 import org.apache.lucene.queryParser.ParseException;
 import org.apache.lucene.search.Query;
 import org.hibernate.exception.ConstraintViolationException;
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.manager.LicenseManager;
-import org.ourproject.kune.platf.server.properties.DatabaseProperties;
-import org.ourproject.kune.platf.server.properties.KuneProperties;
-import org.ourproject.kune.platf.server.tool.ServerTool;
-import org.ourproject.kune.platf.server.tool.ServerToolRegistry;
 
 import cc.kune.core.client.errors.AccessViolationException;
 import cc.kune.core.client.errors.DefaultException;
 import cc.kune.core.client.errors.EmailAddressInUseException;
 import cc.kune.core.client.errors.GroupNameInUseException;
 import cc.kune.core.client.errors.UserMustBeLoggedException;
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.manager.LicenseManager;
+import cc.kune.core.server.properties.DatabaseProperties;
+import cc.kune.core.server.properties.KuneProperties;
+import cc.kune.core.server.tool.ServerTool;
+import cc.kune.core.server.tool.ServerToolRegistry;
 import cc.kune.core.shared.domain.AdmissionType;
 import cc.kune.core.shared.domain.GroupListMode;
 import cc.kune.core.shared.dto.GroupType;

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/I18nCountryManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/I18nCountryManagerDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/I18nCountryManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,14 +17,14 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import java.util.List;
 
 import javax.persistence.EntityManager;
 
-import org.ourproject.kune.platf.server.manager.I18nCountryManager;
 
+import cc.kune.core.server.manager.I18nCountryManager;
 import cc.kune.domain.I18nCountry;
 import cc.kune.domain.finders.I18nCountryFinder;
 

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/I18nLanguageManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/I18nLanguageManagerDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/I18nLanguageManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,14 +17,14 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import java.util.List;
 
 import javax.persistence.EntityManager;
 
-import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
 
+import cc.kune.core.server.manager.I18nLanguageManager;
 import cc.kune.domain.I18nLanguage;
 import cc.kune.domain.finders.I18nLanguageFinder;
 

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/I18nTranslationManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/I18nTranslationManagerDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/I18nTranslationManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import java.util.HashMap;
 import java.util.List;
@@ -25,11 +25,11 @@
 
 import javax.persistence.EntityManager;
 
-import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
-import org.ourproject.kune.platf.server.manager.I18nTranslationManager;
 
 import cc.kune.common.client.utils.TextUtils;
 import cc.kune.core.client.errors.DefaultException;
+import cc.kune.core.server.manager.I18nLanguageManager;
+import cc.kune.core.server.manager.I18nTranslationManager;
 import cc.kune.domain.I18nLanguage;
 import cc.kune.domain.I18nTranslation;
 import cc.kune.domain.finders.I18nTranslationFinder;

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/LicenseManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/LicenseManagerDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/LicenseManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,15 +17,15 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import java.util.List;
 
 import javax.persistence.EntityManager;
 
-import org.ourproject.kune.platf.server.manager.LicenseManager;
-import org.ourproject.kune.platf.server.properties.DatabaseProperties;
 
+import cc.kune.core.server.manager.LicenseManager;
+import cc.kune.core.server.properties.DatabaseProperties;
 import cc.kune.domain.License;
 import cc.kune.domain.finders.LicenseFinder;
 

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/RateManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/RateManagerDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/RateManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,13 +17,13 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import javax.persistence.EntityManager;
 import javax.persistence.NoResultException;
 
-import org.ourproject.kune.platf.server.manager.RateManager;
 
+import cc.kune.core.server.manager.RateManager;
 import cc.kune.domain.Content;
 import cc.kune.domain.Rate;
 import cc.kune.domain.User;

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/SearchResult.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/SearchResult.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/SearchResult.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import java.util.List;
 

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/ServerManagerException.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/ServerManagerException.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/ServerManagerException.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,9 +17,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
-import org.ourproject.kune.platf.server.ServerException;
+import cc.kune.core.server.ServerException;
 
 public class ServerManagerException extends ServerException {
 

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/SocialNetworkManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/SocialNetworkManagerDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/SocialNetworkManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,16 +17,12 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import java.util.List;
 
 import javax.persistence.EntityManager;
 
-import org.ourproject.kune.platf.server.ServerException;
-import org.ourproject.kune.platf.server.access.AccessRightsService;
-import org.ourproject.kune.platf.server.manager.SocialNetworkManager;
-import org.ourproject.kune.platf.server.manager.UserManager;
 
 import cc.kune.core.client.errors.AccessViolationException;
 import cc.kune.core.client.errors.AlreadyGroupMemberException;
@@ -34,6 +30,10 @@
 import cc.kune.core.client.errors.DefaultException;
 import cc.kune.core.client.errors.LastAdminInGroupException;
 import cc.kune.core.client.errors.UserMustBeLoggedException;
+import cc.kune.core.server.ServerException;
+import cc.kune.core.server.access.AccessRightsService;
+import cc.kune.core.server.manager.SocialNetworkManager;
+import cc.kune.core.server.manager.UserManager;
 import cc.kune.core.shared.domain.AdmissionType;
 import cc.kune.core.shared.domain.GroupListMode;
 import cc.kune.core.shared.domain.SocialNetworkVisibility;

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/TagManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/TagManagerDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/TagManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,12 +17,12 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import javax.persistence.EntityManager;
 
-import org.ourproject.kune.platf.server.manager.TagManager;
 
+import cc.kune.core.server.manager.TagManager;
 import cc.kune.domain.Tag;
 import cc.kune.domain.finders.TagFinder;
 

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/ToolConfigurationManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/ToolConfigurationManagerDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/ToolConfigurationManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,12 +17,12 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import javax.persistence.EntityManager;
 
-import org.ourproject.kune.platf.server.manager.ToolConfigurationManager;
 
+import cc.kune.core.server.manager.ToolConfigurationManager;
 import cc.kune.domain.ToolConfiguration;
 
 import com.google.inject.Inject;

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/UserManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/impl/UserManagerDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/UserManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import java.util.Collection;
 import java.util.HashSet;
@@ -33,13 +33,6 @@
 import org.apache.lucene.search.Query;
 import org.jivesoftware.smack.RosterEntry;
 import org.jivesoftware.smack.packet.RosterPacket.ItemType;
-import org.ourproject.kune.chat.server.managers.ChatConnection;
-import org.ourproject.kune.chat.server.managers.ChatException;
-import org.ourproject.kune.chat.server.managers.XmppManager;
-import org.ourproject.kune.platf.server.manager.I18nCountryManager;
-import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
-import org.ourproject.kune.platf.server.manager.UserManager;
-import org.ourproject.kune.platf.server.properties.ChatProperties;
 import org.waveprotocol.box.server.CoreSettings;
 import org.waveprotocol.box.server.authentication.PasswordDigest;
 import org.waveprotocol.box.server.persistence.AccountStore;
@@ -48,6 +41,13 @@
 import cc.kune.core.client.errors.GroupNameInUseException;
 import cc.kune.core.client.errors.I18nNotFoundException;
 import cc.kune.core.client.errors.UserRegistrationException;
+import cc.kune.core.server.manager.I18nCountryManager;
+import cc.kune.core.server.manager.I18nLanguageManager;
+import cc.kune.core.server.manager.UserManager;
+import cc.kune.core.server.properties.ChatProperties;
+import cc.kune.core.server.xmpp.ChatConnection;
+import cc.kune.core.server.xmpp.ChatException;
+import cc.kune.core.server.xmpp.XmppManager;
 import cc.kune.core.shared.i18n.I18nTranslationService;
 import cc.kune.domain.I18nCountry;
 import cc.kune.domain.I18nLanguage;

Copied: trunk/src/main/java/cc/kune/core/server/mapper (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/mapper)

Modified: trunk/src/main/java/cc/kune/core/server/mapper/DozerMapper.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/mapper/DozerMapper.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/mapper/DozerMapper.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.mapper;
+package cc.kune.core.server.mapper;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -25,8 +25,8 @@
 import net.sf.dozer.util.mapping.DozerBeanMapperSingletonWrapper;
 import net.sf.dozer.util.mapping.MapperIF;
 
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
 
+import cc.kune.core.server.manager.impl.SearchResult;
 import cc.kune.core.shared.dto.SearchResultDTO;
 
 import com.google.inject.Singleton;

Modified: trunk/src/main/java/cc/kune/core/server/mapper/GroupListModeConverter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/mapper/GroupListModeConverter.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/mapper/GroupListModeConverter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.mapper;
+package cc.kune.core.server.mapper;
 
 import java.text.MessageFormat;
 import java.util.HashMap;

Modified: trunk/src/main/java/cc/kune/core/server/mapper/Mapper.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/mapper/Mapper.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/mapper/Mapper.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,12 +17,12 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.mapper;
+package cc.kune.core.server.mapper;
 
 import java.util.List;
 
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
 
+import cc.kune.core.server.manager.impl.SearchResult;
 import cc.kune.core.shared.dto.SearchResultDTO;
 
 public interface Mapper {

Copied: trunk/src/main/java/cc/kune/core/server/properties (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/properties)

Modified: trunk/src/main/java/cc/kune/core/server/properties/ChatProperties.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/properties/ChatProperties.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/properties/ChatProperties.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.properties;
+package cc.kune.core.server.properties;
 
 import com.google.inject.Inject;
 import com.google.inject.Singleton;

Modified: trunk/src/main/java/cc/kune/core/server/properties/DatabaseProperties.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/properties/DatabaseProperties.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/properties/DatabaseProperties.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.properties;
+package cc.kune.core.server.properties;
 
 import com.google.inject.Inject;
 import com.google.inject.Singleton;

Modified: trunk/src/main/java/cc/kune/core/server/properties/KuneProperties.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/properties/KuneProperties.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/properties/KuneProperties.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.properties;
+package cc.kune.core.server.properties;
 
 public interface KuneProperties {
     String SITE_URL = "kune.siteurl";

Modified: trunk/src/main/java/cc/kune/core/server/properties/KunePropertiesDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/properties/KunePropertiesDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/properties/KunePropertiesDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,15 +17,16 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.properties;
+package cc.kune.core.server.properties;
 
 import java.io.IOException;
 import java.io.InputStream;
 import java.text.MessageFormat;
 import java.util.Properties;
 
-import org.ourproject.kune.platf.server.ServerException;
 
+import cc.kune.core.server.ServerException;
+
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
 

Modified: trunk/src/main/java/cc/kune/core/server/properties/PropertiesFileName.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/properties/PropertiesFileName.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/properties/PropertiesFileName.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.properties;
+package cc.kune.core.server.properties;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;

Copied: trunk/src/main/java/cc/kune/core/server/rack/ContainerListener.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/ContainerListener.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rack/ContainerListener.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/rack/ContainerListener.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,26 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.rack;
+
+public interface ContainerListener {
+    void start();
+
+    void stop();
+}

Copied: trunk/src/main/java/cc/kune/core/server/rack/Rack.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/Rack.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rack/Rack.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/rack/Rack.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,99 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+/*
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package cc.kune.core.server.rack;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import cc.kune.core.server.rack.dock.Dock;
+import cc.kune.core.server.rack.dock.RequestMatcher;
+
+import com.google.inject.Module;
+
+public class Rack {
+    public static final Log LOG = LogFactory.getLog(Rack.class);
+    private final ArrayList<Dock> docks;
+    private final ArrayList<Module> modules;
+    private final ArrayList<RequestMatcher> excludes;
+    private final ArrayList<Class<? extends ContainerListener>> listeners;
+
+    public Rack() {
+        this.docks = new ArrayList<Dock>();
+        this.modules = new ArrayList<Module>();
+        this.excludes = new ArrayList<RequestMatcher>();
+        this.listeners = new ArrayList<Class<? extends ContainerListener>>();
+    }
+
+    public void add(final Class<? extends ContainerListener> listenerType) {
+        listeners.add(listenerType);
+
+    }
+
+    public void add(final Dock dock) {
+        LOG.debug("INSTALLING: " + dock.toString());
+        docks.add(dock);
+    }
+
+    public void add(final Module module) {
+        modules.add(module);
+    }
+
+    public void addExclusion(RequestMatcher matcher) {
+        excludes.add(matcher);
+    }
+
+    public List<Dock> getDocks() {
+        return docks;
+    }
+
+    public List<RequestMatcher> getExcludes() {
+        return excludes;
+    }
+
+    public List<Module> getGuiceModules() {
+        return modules;
+    }
+
+    public List<Class<? extends ContainerListener>> getListeners() {
+        return listeners;
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/rack/RackBuilder.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/RackBuilder.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rack/RackBuilder.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/rack/RackBuilder.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,121 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.rack;
+
+import javax.servlet.Filter;
+import javax.servlet.http.HttpServlet;
+
+
+import cc.kune.core.server.rack.dock.RegexDock;
+import cc.kune.core.server.rack.dock.RegexMatcher;
+import cc.kune.core.server.rack.filters.gwts.GWTServiceFilter;
+import cc.kune.core.server.rack.filters.rest.RESTServiceFilter;
+import cc.kune.core.server.rack.filters.servlet.ServletServiceFilter;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+import com.google.inject.Module;
+
+public class RackBuilder {
+
+    public static class RackDockBuilder {
+        private final String regex;
+        private final Rack rack;
+
+        public RackDockBuilder(final Rack rack, final String regex) {
+            this.rack = rack;
+            this.regex = regex;
+        }
+
+        public RackDockBuilder install(final Filter... filters) {
+            for (final Filter filter : filters) {
+                final RegexDock dock = new RegexDock(regex);
+                dock.setFilter(filter);
+                rack.add(dock);
+            }
+            return this;
+        }
+
+    }
+
+    private final Rack rack;
+
+    public RackBuilder() {
+        this.rack = new Rack();
+    }
+
+    public RackBuilder add(final Class<? extends ContainerListener> listener) {
+        rack.add(listener);
+        return this;
+    }
+
+    public RackDockBuilder at(final String regex) {
+        return new RackDockBuilder(rack, regex);
+    }
+
+    public RackBuilder exclude(final String... excludes) {
+        for (final String exclude : excludes) {
+            rack.addExclusion(new RegexMatcher(exclude));
+        }
+        return this;
+    }
+
+    public Rack getRack() {
+        return rack;
+    }
+
+    public RackBuilder installGWTServices(final String root, final Class<? extends RemoteService>... serviceClasses) {
+
+        for (final Class<? extends RemoteService> serviceClass : serviceClasses) {
+            final String simpleName = serviceClass.getSimpleName();
+            final RegexDock dock = new RegexDock(root + simpleName + "$");
+            dock.setFilter(new GWTServiceFilter(serviceClass));
+            rack.add(dock);
+        }
+
+        return this;
+    }
+
+    public void installRESTServices(final String root, final Class<?>... serviceClasses) {
+        for (final Class<?> serviceClass : serviceClasses) {
+            final String simpleName = serviceClass.getSimpleName();
+            final String pattern = root + simpleName + "/(.*)$";
+            final RegexDock dock = new RegexDock(pattern);
+            dock.setFilter(new RESTServiceFilter(pattern, serviceClass));
+            rack.add(dock);
+        }
+    }
+
+    public void installServlet(final String root, final Class<? extends HttpServlet>... servletClasses) {
+        for (final Class<? extends HttpServlet> servletClass : servletClasses) {
+            final String simpleName = servletClass.getSimpleName();
+            final RegexDock dock = new RegexDock(root + simpleName + "$");
+            dock.setFilter(new ServletServiceFilter(servletClass));
+            rack.add(dock);
+        }
+
+    }
+
+    public RackBuilder use(final Module... list) {
+        for (final Module m : list) {
+            rack.add(m);
+        }
+        return this;
+    }
+}

Copied: trunk/src/main/java/cc/kune/core/server/rack/RackHelper.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/RackHelper.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rack/RackHelper.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/rack/RackHelper.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,57 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.rack;
+
+import javax.servlet.ServletRequest;
+import javax.servlet.http.HttpServletRequest;
+
+public final class RackHelper {
+    public static String buildForwardString(final ServletRequest request, final String forward) {
+        String parameters = RackHelper.extractParameters(request);
+        return new StringBuilder(forward).append(parameters).toString();
+    }
+
+    public static String extractParameters(final ServletRequest request) {
+        HttpServletRequest httpServletRequest = (HttpServletRequest) request;
+        String uri = httpServletRequest.getRequestURI();
+        int index = uri.indexOf('?');
+        if (index > 0) {
+            return uri.substring(index);
+        } else {
+            return "";
+        }
+    }
+
+    public static String getRelativeURL(final ServletRequest request) {
+        HttpServletRequest req = (HttpServletRequest) request;
+        String contextPath = req.getContextPath();
+        String uri = req.getRequestURI();
+        return uri.substring(contextPath.length());
+    }
+
+    public static String getURI(final ServletRequest request) {
+        HttpServletRequest httpServletRequest = (HttpServletRequest) request;
+        return httpServletRequest.getRequestURI();
+    }
+
+    private RackHelper() {
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/rack/RackModule.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/RackModule.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rack/RackModule.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/rack/RackModule.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,24 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.rack;
+
+public interface RackModule {
+    void configure(RackBuilder builder);
+}

Copied: trunk/src/main/java/cc/kune/core/server/rack/RackServletFilter.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/RackServletFilter.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rack/RackServletFilter.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/rack/RackServletFilter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,184 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.rack;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.waveprotocol.box.server.rpc.ServerRpcProvider;
+
+import cc.kune.core.server.ServerException;
+import cc.kune.core.server.rack.dock.Dock;
+import cc.kune.core.server.rack.dock.RequestMatcher;
+
+import com.google.inject.Injector;
+
+public class RackServletFilter implements Filter {
+    public static class DockChain implements FilterChain {
+        private final Iterator<Dock> iterator;
+
+        public DockChain(final Iterator<Dock> iterator) {
+            this.iterator = iterator;
+        }
+
+        @Override
+        public void doFilter(final ServletRequest request, final ServletResponse response) throws IOException,
+                ServletException {
+            Dock dock = null;
+            boolean matched = false;
+
+            final String relative = RackHelper.getRelativeURL(request);
+            while (!matched && iterator.hasNext()) {
+                dock = iterator.next();
+                matched = dock.matches(relative);
+            }
+            if (matched) {
+                execute(dock.getFilter(), request, response);
+            }
+        }
+
+        private void execute(final Filter filter, final ServletRequest request, final ServletResponse response)
+                throws IOException, ServletException {
+            // log.debug("RACK FILTER: " + filter.getClass().getSimpleName());
+            filter.doFilter(request, response, this);
+        }
+    }
+
+    public static final String INJECTOR_ATTRIBUTE = Injector.class.getName() + "Child";
+    public static final String INJECTOR_PARENT_ATTRIBUTE = ServerRpcProvider.INJECTOR_ATTRIBUTE;
+    private static final Log LOG = LogFactory.getLog(RackServletFilter.class);
+    private static final String MODULE_PARAMETER = RackModule.class.getName();
+    private List<Dock> docks;
+
+    private List<RequestMatcher> excludes;
+    private Injector injector;
+    private Rack rack;
+
+    @Override
+    public void destroy() {
+        for (final Dock dock : docks) {
+            dock.getFilter().destroy();
+        }
+    }
+
+    @Override
+    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
+            throws IOException, ServletException {
+
+        final String relative = RackHelper.getRelativeURL(request);
+        for (final RequestMatcher matcher : excludes) {
+            if (matcher.matches(relative)) {
+                LOG.info("Excluded (from Guice): " + relative);
+                chain.doFilter(request, response);
+                return;
+            }
+        }
+        LOG.debug("REQUEST: " + relative);
+        final FilterChain newChain = new DockChain(docks.iterator());
+        newChain.doFilter(request, response);
+    }
+
+    @Override
+    protected void finalize() throws Throwable {
+        super.finalize();
+        stopContainerListeners(rack.getListeners(), injector);
+    }
+
+    private RackModule getModule(final FilterConfig filterConfig) {
+        final String moduleName = getModuleName(filterConfig);
+        try {
+            final Class<?> clazz = Class.forName(moduleName);
+            final RackModule module = (RackModule) clazz.newInstance();
+            return module;
+        } catch (final Exception e) {
+            throw new ServerException("couldn't instantiate the rack module", e);
+        }
+    }
+
+    private String getModuleName(final FilterConfig filterConfig) {
+        final String moduleName = filterConfig.getInitParameter(MODULE_PARAMETER);
+        if (moduleName == null) {
+            throw new ServerException("Rack module name can't be null!");
+        }
+        return moduleName;
+    }
+
+    @Override
+    public void init(final FilterConfig filterConfig) throws ServletException {
+        LOG.debug("INITIALIZING RackServletFilter...");
+        final RackModule module = getModule(filterConfig);
+        final RackBuilder builder = new RackBuilder();
+        module.configure(builder);
+        rack = builder.getRack();
+        // final WaveStarter waveStarter = new WaveStarter();
+        // final Injector waveChildInjector = waveStarter.runMain();
+        injector = (Injector) filterConfig.getServletContext().getAttribute(INJECTOR_PARENT_ATTRIBUTE);
+        final Injector kuneChildInjector = installInjector(filterConfig, rack, injector);
+        startContainerListeners(rack.getListeners(), kuneChildInjector);
+        docks = rack.getDocks();
+        excludes = rack.getExcludes();
+        initFilters(filterConfig);
+        LOG.debug("INITIALIZATION DONE!");
+    }
+
+    private void initFilters(final FilterConfig filterConfig) throws ServletException {
+        for (final Dock dock : docks) {
+            dock.getFilter().init(filterConfig);
+        }
+    }
+
+    private Injector installInjector(final FilterConfig filterConfig, final Rack rack, final Injector waveChildInjector) {
+        // final Injector injector = Guice.createInjector();
+        final Injector childInjector = waveChildInjector.createChildInjector(rack.getGuiceModules());
+        filterConfig.getServletContext().setAttribute(INJECTOR_ATTRIBUTE, childInjector);
+        return childInjector;
+    }
+
+    private void startContainerListeners(final List<Class<? extends ContainerListener>> listenerClasses,
+            final Injector injector) {
+        LOG.debug("STARTING CONTAINER LISTENERS...");
+        for (final Class<? extends ContainerListener> listenerClass : listenerClasses) {
+            final ContainerListener listener = injector.getInstance(listenerClass);
+            listener.start();
+        }
+    }
+
+    // FIXME: Dani, never used this:
+    @SuppressWarnings("unused")
+    private void stopContainerListeners(final List<Class<? extends ContainerListener>> listenerClasses,
+            final Injector injector) {
+        LOG.debug("STOPING CONTAINER LISTENERS...");
+        for (final Class<? extends ContainerListener> listenerClass : listenerClasses) {
+            final ContainerListener listener = injector.getInstance(listenerClass);
+            listener.stop();
+        }
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/rack/dock (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/dock)

Modified: trunk/src/main/java/cc/kune/core/server/rack/dock/AbstractDock.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/dock/AbstractDock.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/dock/AbstractDock.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.dock;
+package cc.kune.core.server.rack.dock;
 
 import javax.servlet.Filter;
 

Modified: trunk/src/main/java/cc/kune/core/server/rack/dock/Dock.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/dock/Dock.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/dock/Dock.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.dock;
+package cc.kune.core.server.rack.dock;
 
 import javax.servlet.Filter;
 

Modified: trunk/src/main/java/cc/kune/core/server/rack/dock/RegexDock.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/dock/RegexDock.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/dock/RegexDock.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.dock;
+package cc.kune.core.server.rack.dock;
 
 import java.util.regex.Pattern;
 

Modified: trunk/src/main/java/cc/kune/core/server/rack/dock/RegexMatcher.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/dock/RegexMatcher.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/dock/RegexMatcher.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.dock;
+package cc.kune.core.server.rack.dock;
 
 import java.util.regex.Pattern;
 

Modified: trunk/src/main/java/cc/kune/core/server/rack/dock/RequestMatcher.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/dock/RequestMatcher.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/dock/RequestMatcher.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.dock;
+package cc.kune.core.server.rack.dock;
 
 public interface RequestMatcher {
     boolean matches(String url);

Copied: trunk/src/main/java/cc/kune/core/server/rack/filters/AbstractInjectedFilter.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/filters/AbstractInjectedFilter.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rack/filters/AbstractInjectedFilter.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/AbstractInjectedFilter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,53 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.rack.filters;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+
+
+import cc.kune.core.server.rack.RackServletFilter;
+
+import com.google.inject.Injector;
+
+public abstract class AbstractInjectedFilter implements Filter {
+
+    protected ServletContext ctx;
+
+    @Override
+    public abstract void destroy();
+
+    public <T> T getInstance(final Class<T> type) {
+        return getInjector().getInstance(type);
+    }
+
+    @Override
+    public void init(final FilterConfig filterConfig) throws ServletException {
+        this.ctx = filterConfig.getServletContext();
+        getInjector().injectMembers(this);
+    }
+
+    private Injector getInjector() {
+        return (Injector) ctx.getAttribute(RackServletFilter.INJECTOR_ATTRIBUTE);
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/rack/filters/ApplicationListener.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/filters/ApplicationListener.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rack/filters/ApplicationListener.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/ApplicationListener.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,29 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.rack.filters;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public interface ApplicationListener {
+    void doBefore(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse);
+
+    void doAfter(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse);
+}

Copied: trunk/src/main/java/cc/kune/core/server/rack/filters/ForwardFilter.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/filters/ForwardFilter.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rack/filters/ForwardFilter.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/ForwardFilter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,81 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.rack.filters;
+
+import java.io.IOException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+
+import cc.kune.core.server.rack.RackHelper;
+
+public class ForwardFilter extends AbstractInjectedFilter {
+    // private static final Log log = LogFactory.getLog(ForwardFilter.class);
+
+    private final String forward;
+    private final Pattern pattern;
+
+    public ForwardFilter(final String forward) {
+        this(".*", forward);
+    }
+
+    public ForwardFilter(final String pattern, final String forward) {
+        this.forward = forward;
+        this.pattern = Pattern.compile(pattern);
+    }
+
+    @Override
+    public void destroy() {
+    }
+
+    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
+            throws IOException, ServletException {
+
+        String relativeURL = RackHelper.getRelativeURL(request);
+        Matcher matcher = pattern.matcher(relativeURL);
+        matcher.matches();
+
+        int groupCount = matcher.groupCount();
+        // log.debug("GROUP COUNT: " + groupCount);
+        String replaced = forward;
+        for (int index = 0; index < groupCount; index++) {
+            String tag = "{" + index + "}";
+            String group = matcher.group(index + 1);
+            // log.debug("REPLACING " + tag + " WITH + " + group);
+            replaced = replaced.replace(tag, group);
+        }
+
+        String forwardString = RackHelper.buildForwardString(request, replaced);
+        forward(request, response, forwardString);
+    }
+
+    private void forward(final ServletRequest request, final ServletResponse response, final String forwardString)
+            throws ServletException, IOException {
+        // log.debug("FORWADING TO: " + forwardString);
+        HttpServletRequest httpRequest = (HttpServletRequest) request;
+        httpRequest.getRequestDispatcher(forwardString).forward(request, response);
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/rack/filters/ListenerFilter.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/filters/ListenerFilter.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rack/filters/ListenerFilter.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/ListenerFilter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,50 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.rack.filters;
+
+import java.io.IOException;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class ListenerFilter extends AbstractInjectedFilter {
+    private final Class<? extends ApplicationListener> listenerClass;
+
+    public ListenerFilter(final Class<? extends ApplicationListener> listenerClass) {
+        this.listenerClass = listenerClass;
+    }
+
+    @Override
+    public void destroy() {
+    }
+
+    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
+            throws IOException, ServletException {
+        ApplicationListener listener = super.getInstance(listenerClass);
+        listener.doBefore((HttpServletRequest) request, (HttpServletResponse) response);
+        chain.doFilter(request, response);
+        listener.doAfter((HttpServletRequest) request, (HttpServletResponse) response);
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/rack/filters/LogFilter.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/filters/LogFilter.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rack/filters/LogFilter.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/LogFilter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,54 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.rack.filters;
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import cc.kune.core.server.rack.RackHelper;
+
+public class LogFilter implements Filter {
+    public static final Log LOG = LogFactory.getLog(LogFilter.class);
+
+    public void destroy() {
+    }
+
+    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
+            throws IOException, ServletException {
+        // final long start = System.currentTimeMillis();
+        LOG.debug("REQUEST: " + RackHelper.getURI(request));
+        chain.doFilter(request, response);
+        // final long finish = System.currentTimeMillis();
+        // log.debug("TOTAL TIME: " + (finish - start) + " miliseconds");
+    }
+
+    public void init(final FilterConfig filterConfig) throws ServletException {
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/rack/filters/RedirectFilter.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/filters/RedirectFilter.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rack/filters/RedirectFilter.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/RedirectFilter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,52 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.rack.filters;
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletResponse;
+
+public class RedirectFilter implements Filter {
+    private final String redirect;
+
+    public RedirectFilter(String redirect) {
+        this.redirect = redirect;
+    }
+
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
+            ServletException {
+
+        HttpServletResponse httpResponse = (HttpServletResponse) response;
+        httpResponse.sendRedirect(redirect);
+    }
+
+    public void init(FilterConfig filterConfig) throws ServletException {
+    }
+
+    public void destroy() {
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/rack/filters/gwts (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/filters/gwts)

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/gwts/DelegatedRemoteServlet.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/gwts/DelegatedRemoteServlet.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/gwts/DelegatedRemoteServlet.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.filters.gwts;
+package cc.kune.core.server.rack.filters.gwts;
 
 import javax.servlet.ServletContext;
 

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/gwts/GWTServiceFilter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/gwts/GWTServiceFilter.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/gwts/GWTServiceFilter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.filters.gwts;
+package cc.kune.core.server.rack.filters.gwts;
 
 import java.io.IOException;
 
@@ -31,9 +31,10 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.ourproject.kune.rack.RackHelper;
-import org.ourproject.kune.rack.filters.AbstractInjectedFilter;
 
+import cc.kune.core.server.rack.RackHelper;
+import cc.kune.core.server.rack.filters.AbstractInjectedFilter;
+
 import com.google.gwt.user.client.rpc.RemoteService;
 
 public class GWTServiceFilter extends AbstractInjectedFilter {

Copied: trunk/src/main/java/cc/kune/core/server/rack/filters/rest (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/filters/rest)

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/rest/DefaultRESTMethodFinder.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/rest/DefaultRESTMethodFinder.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/rest/DefaultRESTMethodFinder.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.filters.rest;
+package cc.kune.core.server.rack.filters.rest;
 
 import java.lang.reflect.Method;
 import java.util.Arrays;

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/rest/JSONLibRESTSerializer.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/rest/JSONLibRESTSerializer.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/rest/JSONLibRESTSerializer.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,13 +17,13 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.filters.rest;
+package cc.kune.core.server.rack.filters.rest;
 
 import net.sf.json.JSONSerializer;
 import net.sf.json.JsonConfig;
 import net.sf.json.util.CycleDetectionStrategy;
 
-import org.ourproject.kune.platf.server.ServerException;
+import cc.kune.core.server.ServerException;
 
 public class JSONLibRESTSerializer implements RESTSerializer {
     private final JsonConfig config;

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/rest/Parameters.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/rest/Parameters.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/rest/Parameters.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.filters.rest;
+package cc.kune.core.server.rack.filters.rest;
 
 public interface Parameters {
     String get(String name);

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/rest/ParametersAdapter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/rest/ParametersAdapter.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/rest/ParametersAdapter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -21,7 +21,7 @@
 /**
  * 
  \*/
-package org.ourproject.kune.rack.filters.rest;
+package cc.kune.core.server.rack.filters.rest;
 
 import javax.servlet.ServletRequest;
 

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/rest/REST.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/rest/REST.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/rest/REST.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.filters.rest;
+package cc.kune.core.server.rack.filters.rest;
 
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTMethod.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/rest/RESTMethod.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTMethod.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,11 +17,11 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.filters.rest;
+package cc.kune.core.server.rack.filters.rest;
 
 import java.lang.reflect.Method;
 
-import org.ourproject.kune.platf.server.ServerException;
+import cc.kune.core.server.ServerException;
 
 public class RESTMethod {
     public static final String FORMAT_JSON = "json";

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTMethodFinder.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/rest/RESTMethodFinder.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTMethodFinder.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.filters.rest;
+package cc.kune.core.server.rack.filters.rest;
 
 public interface RESTMethodFinder {
     RESTMethod findMethod(String methodName, Parameters parameters, Class<?> serviceType);

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTSerializer.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/rest/RESTSerializer.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTSerializer.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.filters.rest;
+package cc.kune.core.server.rack.filters.rest;
 
 public interface RESTSerializer {
     String serialize(Object target, String format);

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTServiceDefinition.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/rest/RESTServiceDefinition.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTServiceDefinition.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.filters.rest;
+package cc.kune.core.server.rack.filters.rest;
 
 import java.lang.reflect.Method;
 import java.util.ArrayList;

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTServiceFilter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/rest/RESTServiceFilter.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTServiceFilter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.filters.rest;
+package cc.kune.core.server.rack.filters.rest;
 
 import java.io.IOException;
 import java.io.PrintWriter;
@@ -31,9 +31,10 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.ourproject.kune.rack.RackHelper;
-import org.ourproject.kune.rack.filters.AbstractInjectedFilter;
 
+import cc.kune.core.server.rack.RackHelper;
+import cc.kune.core.server.rack.filters.AbstractInjectedFilter;
+
 import com.google.inject.Inject;
 
 public class RESTServiceFilter extends AbstractInjectedFilter {

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTServicesModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/rest/RESTServicesModule.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/rest/RESTServicesModule.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.filters.rest;
+package cc.kune.core.server.rack.filters.rest;
 
 import com.google.inject.AbstractModule;
 

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/rest/TransactionalServiceExecutor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/rest/TransactionalServiceExecutor.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/rest/TransactionalServiceExecutor.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.filters.rest;
+package cc.kune.core.server.rack.filters.rest;
 
 import com.google.inject.Inject;
 import com.google.inject.persist.Transactional;

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/rest/XStreamRESTSerializer.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/rest/XStreamRESTSerializer.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/rest/XStreamRESTSerializer.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.rack.filters.rest;
+package cc.kune.core.server.rack.filters.rest;
 
 import java.util.HashMap;
 

Copied: trunk/src/main/java/cc/kune/core/server/rack/filters/servlet (from rev 1292, trunk/src/main/java/org/ourproject/kune/rack/filters/servlet)

Modified: trunk/src/main/java/cc/kune/core/server/rack/filters/servlet/ServletServiceFilter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/servlet/ServletServiceFilter.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rack/filters/servlet/ServletServiceFilter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.rack.filters.servlet;
+package cc.kune.core.server.rack.filters.servlet;
 
 import java.io.IOException;
 
@@ -30,9 +30,10 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.ourproject.kune.rack.RackHelper;
-import org.ourproject.kune.rack.filters.AbstractInjectedFilter;
 
+import cc.kune.core.server.rack.RackHelper;
+import cc.kune.core.server.rack.filters.AbstractInjectedFilter;
+
 public class ServletServiceFilter extends AbstractInjectedFilter {
     Log log = LogFactory.getLog(ServletServiceFilter.class);
     private final Class<? extends HttpServlet> servletClass;

Copied: trunk/src/main/java/cc/kune/core/server/rest (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/rest)

Modified: trunk/src/main/java/cc/kune/core/server/rest/ContentJSONService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rest/ContentJSONService.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rest/ContentJSONService.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,15 +17,15 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.rest;
+package cc.kune.core.server.rest;
 
-import org.ourproject.kune.platf.client.services.SearcherConstants;
-import org.ourproject.kune.platf.server.content.ContainerManager;
-import org.ourproject.kune.platf.server.content.ContentManager;
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
-import org.ourproject.kune.platf.server.mapper.Mapper;
-import org.ourproject.kune.rack.filters.rest.REST;
 
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.manager.impl.SearchResult;
+import cc.kune.core.server.mapper.Mapper;
+import cc.kune.core.server.rack.filters.rest.REST;
+import cc.kune.core.shared.SearcherConstants;
 import cc.kune.core.shared.dto.LinkDTO;
 import cc.kune.core.shared.dto.SearchResultDTO;
 import cc.kune.domain.Container;

Modified: trunk/src/main/java/cc/kune/core/server/rest/GroupJSONService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rest/GroupJSONService.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rest/GroupJSONService.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,14 +17,14 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.rest;
+package cc.kune.core.server.rest;
 
-import org.ourproject.kune.platf.client.services.SearcherConstants;
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
-import org.ourproject.kune.platf.server.mapper.Mapper;
-import org.ourproject.kune.rack.filters.rest.REST;
 
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.manager.impl.SearchResult;
+import cc.kune.core.server.mapper.Mapper;
+import cc.kune.core.server.rack.filters.rest.REST;
+import cc.kune.core.shared.SearcherConstants;
 import cc.kune.core.shared.dto.LinkDTO;
 import cc.kune.core.shared.dto.SearchResultDTO;
 import cc.kune.domain.Group;

Modified: trunk/src/main/java/cc/kune/core/server/rest/I18nTranslationJSONService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rest/I18nTranslationJSONService.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rest/I18nTranslationJSONService.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,16 +17,16 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.rest;
+package cc.kune.core.server.rest;
 
 import java.util.List;
 
-import org.ourproject.kune.platf.client.services.SearcherConstants;
-import org.ourproject.kune.platf.server.manager.I18nTranslationManager;
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
-import org.ourproject.kune.platf.server.mapper.Mapper;
-import org.ourproject.kune.rack.filters.rest.REST;
 
+import cc.kune.core.server.manager.I18nTranslationManager;
+import cc.kune.core.server.manager.impl.SearchResult;
+import cc.kune.core.server.mapper.Mapper;
+import cc.kune.core.server.rack.filters.rest.REST;
+import cc.kune.core.shared.SearcherConstants;
 import cc.kune.core.shared.dto.I18nTranslationDTO;
 import cc.kune.core.shared.dto.SearchResultDTO;
 import cc.kune.domain.I18nTranslation;

Modified: trunk/src/main/java/cc/kune/core/server/rest/TestJSONService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rest/TestJSONService.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rest/TestJSONService.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,14 +17,15 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.rest;
+package cc.kune.core.server.rest;
 
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
-import org.ourproject.kune.rack.filters.rest.REST;
 
+import cc.kune.core.server.rack.filters.rest.REST;
+
 import com.google.inject.Inject;
 
 public class TestJSONService {

Modified: trunk/src/main/java/cc/kune/core/server/rest/UserJSONService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rest/UserJSONService.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rest/UserJSONService.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,14 +17,14 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.rest;
+package cc.kune.core.server.rest;
 
-import org.ourproject.kune.platf.client.services.SearcherConstants;
-import org.ourproject.kune.platf.server.manager.UserManager;
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
-import org.ourproject.kune.platf.server.mapper.Mapper;
-import org.ourproject.kune.rack.filters.rest.REST;
 
+import cc.kune.core.server.manager.UserManager;
+import cc.kune.core.server.manager.impl.SearchResult;
+import cc.kune.core.server.mapper.Mapper;
+import cc.kune.core.server.rack.filters.rest.REST;
+import cc.kune.core.shared.SearcherConstants;
 import cc.kune.core.shared.dto.LinkDTO;
 import cc.kune.core.shared.dto.SearchResultDTO;
 import cc.kune.domain.User;

Copied: trunk/src/main/java/cc/kune/core/server/rpc (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/rpc)

Modified: trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rpc/ContentRPC.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,31 +17,12 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.rpc;
+package cc.kune.core.server.rpc;
 
 import java.util.Date;
 
 import javax.persistence.NoResultException;
 
-import org.ourproject.kune.chat.server.managers.XmppManager;
-import org.ourproject.kune.platf.server.UserSession;
-import org.ourproject.kune.platf.server.access.AccessRightsService;
-import org.ourproject.kune.platf.server.access.AccessService;
-import org.ourproject.kune.platf.server.access.FinderService;
-import org.ourproject.kune.platf.server.auth.ActionLevel;
-import org.ourproject.kune.platf.server.auth.Authenticated;
-import org.ourproject.kune.platf.server.auth.Authorizated;
-import org.ourproject.kune.platf.server.content.CommentManager;
-import org.ourproject.kune.platf.server.content.ContainerManager;
-import org.ourproject.kune.platf.server.content.ContentManager;
-import org.ourproject.kune.platf.server.content.ContentUtils;
-import org.ourproject.kune.platf.server.content.CreationService;
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.manager.TagUserContentManager;
-import org.ourproject.kune.platf.server.mapper.Mapper;
-import org.ourproject.kune.platf.server.state.StateContainer;
-import org.ourproject.kune.platf.server.state.StateContent;
-import org.ourproject.kune.platf.server.state.StateService;
 
 import cc.kune.core.client.errors.AccessViolationException;
 import cc.kune.core.client.errors.ContentNotFoundException;
@@ -49,6 +30,25 @@
 import cc.kune.core.client.errors.NoDefaultContentException;
 import cc.kune.core.client.errors.ToolNotFoundException;
 import cc.kune.core.client.rpcservices.ContentService;
+import cc.kune.core.server.UserSession;
+import cc.kune.core.server.access.AccessRightsService;
+import cc.kune.core.server.access.AccessService;
+import cc.kune.core.server.access.FinderService;
+import cc.kune.core.server.auth.ActionLevel;
+import cc.kune.core.server.auth.Authenticated;
+import cc.kune.core.server.auth.Authorizated;
+import cc.kune.core.server.content.CommentManager;
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.content.ContentUtils;
+import cc.kune.core.server.content.CreationService;
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.manager.TagUserContentManager;
+import cc.kune.core.server.mapper.Mapper;
+import cc.kune.core.server.state.StateContainer;
+import cc.kune.core.server.state.StateContent;
+import cc.kune.core.server.state.StateService;
+import cc.kune.core.server.xmpp.XmppManager;
 import cc.kune.core.shared.domain.AccessRol;
 import cc.kune.core.shared.domain.ContentStatus;
 import cc.kune.core.shared.domain.RateResult;

Modified: trunk/src/main/java/cc/kune/core/server/rpc/GroupRPC.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rpc/GroupRPC.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rpc/GroupRPC.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,19 +17,19 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.rpc;
+package cc.kune.core.server.rpc;
 
-import org.ourproject.kune.platf.server.UserSession;
-import org.ourproject.kune.platf.server.auth.ActionLevel;
-import org.ourproject.kune.platf.server.auth.Authenticated;
-import org.ourproject.kune.platf.server.auth.Authorizated;
-import org.ourproject.kune.platf.server.content.ContentManager;
-import org.ourproject.kune.platf.server.content.ContentUtils;
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.mapper.Mapper;
 
 import cc.kune.core.client.errors.DefaultException;
 import cc.kune.core.client.rpcservices.GroupService;
+import cc.kune.core.server.UserSession;
+import cc.kune.core.server.auth.ActionLevel;
+import cc.kune.core.server.auth.Authenticated;
+import cc.kune.core.server.auth.Authorizated;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.content.ContentUtils;
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.mapper.Mapper;
 import cc.kune.core.shared.domain.AccessRol;
 import cc.kune.core.shared.domain.AdmissionType;
 import cc.kune.core.shared.domain.SocialNetworkVisibility;

Modified: trunk/src/main/java/cc/kune/core/server/rpc/I18nRPC.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rpc/I18nRPC.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rpc/I18nRPC.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,22 +17,22 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.rpc;
+package cc.kune.core.server.rpc;
 
 import java.util.HashMap;
 
 import javax.persistence.NoResultException;
 import javax.servlet.http.HttpServletRequest;
 
-import org.ourproject.kune.platf.server.UserSession;
-import org.ourproject.kune.platf.server.auth.Authenticated;
-import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
-import org.ourproject.kune.platf.server.manager.I18nTranslationManager;
-import org.ourproject.kune.platf.server.mapper.Mapper;
 
 import cc.kune.core.client.errors.DefaultException;
 import cc.kune.core.client.errors.SessionExpiredException;
 import cc.kune.core.client.rpcservices.I18nService;
+import cc.kune.core.server.UserSession;
+import cc.kune.core.server.auth.Authenticated;
+import cc.kune.core.server.manager.I18nLanguageManager;
+import cc.kune.core.server.manager.I18nTranslationManager;
+import cc.kune.core.server.mapper.Mapper;
 import cc.kune.core.shared.dto.I18nLanguageDTO;
 import cc.kune.domain.I18nLanguage;
 import cc.kune.domain.I18nTranslation;

Modified: trunk/src/main/java/cc/kune/core/server/rpc/RPC.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rpc/RPC.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rpc/RPC.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.rpc;
+package cc.kune.core.server.rpc;
 
 /**
  * marker interface (should not contain any method!)

Modified: trunk/src/main/java/cc/kune/core/server/rpc/SiteRPC.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rpc/SiteRPC.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rpc/SiteRPC.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,25 +17,25 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.rpc;
+package cc.kune.core.server.rpc;
 
 import java.util.TimeZone;
 
-import org.ourproject.kune.platf.server.InitData;
-import org.ourproject.kune.platf.server.UserSession;
-import org.ourproject.kune.platf.server.manager.ExtMediaDescripManager;
-import org.ourproject.kune.platf.server.manager.I18nCountryManager;
-import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
-import org.ourproject.kune.platf.server.manager.LicenseManager;
-import org.ourproject.kune.platf.server.manager.UserManager;
-import org.ourproject.kune.platf.server.mapper.Mapper;
-import org.ourproject.kune.platf.server.properties.ChatProperties;
-import org.ourproject.kune.platf.server.properties.KuneProperties;
-import org.ourproject.kune.platf.server.tool.ServerToolRegistry;
-import org.ourproject.kune.platf.server.users.UserInfoService;
 
 import cc.kune.core.client.errors.DefaultException;
 import cc.kune.core.client.rpcservices.SiteService;
+import cc.kune.core.server.InitData;
+import cc.kune.core.server.UserSession;
+import cc.kune.core.server.manager.ExtMediaDescripManager;
+import cc.kune.core.server.manager.I18nCountryManager;
+import cc.kune.core.server.manager.I18nLanguageManager;
+import cc.kune.core.server.manager.LicenseManager;
+import cc.kune.core.server.manager.UserManager;
+import cc.kune.core.server.mapper.Mapper;
+import cc.kune.core.server.properties.ChatProperties;
+import cc.kune.core.server.properties.KuneProperties;
+import cc.kune.core.server.tool.ServerToolRegistry;
+import cc.kune.core.server.users.UserInfoService;
 import cc.kune.core.shared.dto.InitDataDTO;
 
 import com.google.inject.Inject;

Modified: trunk/src/main/java/cc/kune/core/server/rpc/SocialNetworkRPC.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rpc/SocialNetworkRPC.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rpc/SocialNetworkRPC.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,18 +17,18 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.rpc;
+package cc.kune.core.server.rpc;
 
-import org.ourproject.kune.platf.server.UserSession;
-import org.ourproject.kune.platf.server.auth.ActionLevel;
-import org.ourproject.kune.platf.server.auth.Authenticated;
-import org.ourproject.kune.platf.server.auth.Authorizated;
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.manager.SocialNetworkManager;
-import org.ourproject.kune.platf.server.mapper.Mapper;
 
 import cc.kune.core.client.errors.DefaultException;
 import cc.kune.core.client.rpcservices.SocialNetworkService;
+import cc.kune.core.server.UserSession;
+import cc.kune.core.server.auth.ActionLevel;
+import cc.kune.core.server.auth.Authenticated;
+import cc.kune.core.server.auth.Authorizated;
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.manager.SocialNetworkManager;
+import cc.kune.core.server.mapper.Mapper;
 import cc.kune.core.shared.domain.AccessRol;
 import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.core.shared.dto.SocialNetworkDataDTO;

Modified: trunk/src/main/java/cc/kune/core/server/rpc/UserRPC.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rpc/UserRPC.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/rpc/UserRPC.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,22 +17,12 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.rpc;
+package cc.kune.core.server.rpc;
 
 import javax.servlet.http.HttpSession;
 
 import org.jivesoftware.smack.util.Base64;
 import org.json.JSONObject;
-import org.ourproject.kune.platf.server.UserSession;
-import org.ourproject.kune.platf.server.auth.ActionLevel;
-import org.ourproject.kune.platf.server.auth.Authenticated;
-import org.ourproject.kune.platf.server.auth.Authorizated;
-import org.ourproject.kune.platf.server.auth.SessionService;
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.manager.UserManager;
-import org.ourproject.kune.platf.server.mapper.Mapper;
-import org.ourproject.kune.platf.server.users.UserInfo;
-import org.ourproject.kune.platf.server.users.UserInfoService;
 import org.waveprotocol.box.server.CoreSettings;
 import org.waveprotocol.box.server.authentication.SessionManager;
 
@@ -40,6 +30,16 @@
 import cc.kune.core.client.errors.DefaultException;
 import cc.kune.core.client.errors.UserAuthException;
 import cc.kune.core.client.rpcservices.UserService;
+import cc.kune.core.server.UserSession;
+import cc.kune.core.server.auth.ActionLevel;
+import cc.kune.core.server.auth.Authenticated;
+import cc.kune.core.server.auth.Authorizated;
+import cc.kune.core.server.auth.SessionService;
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.manager.UserManager;
+import cc.kune.core.server.mapper.Mapper;
+import cc.kune.core.server.users.UserInfo;
+import cc.kune.core.server.users.UserInfoService;
 import cc.kune.core.shared.domain.AccessRol;
 import cc.kune.core.shared.domain.UserSNetVisibility;
 import cc.kune.core.shared.domain.utils.StateToken;

Copied: trunk/src/main/java/cc/kune/core/server/state (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/state)

Modified: trunk/src/main/java/cc/kune/core/server/state/StateAbstract.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/state/StateAbstract.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/state/StateAbstract.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.state;
+package cc.kune.core.server.state;
 
 import java.util.List;
 

Modified: trunk/src/main/java/cc/kune/core/server/state/StateContainer.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/state/StateContainer.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/state/StateContainer.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.state;
+package cc.kune.core.server.state;
 
 
 import cc.kune.core.shared.domain.TagCloudResult;

Modified: trunk/src/main/java/cc/kune/core/server/state/StateContent.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/state/StateContent.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/state/StateContent.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.state;
+package cc.kune.core.server.state;
 
 import java.util.Date;
 import java.util.List;

Modified: trunk/src/main/java/cc/kune/core/server/state/StateNoContent.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/state/StateNoContent.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/state/StateNoContent.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.state;
+package cc.kune.core.server.state;
 
 
 /**

Modified: trunk/src/main/java/cc/kune/core/server/state/StateService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/state/StateService.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/state/StateService.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.state;
+package cc.kune.core.server.state;
 
 
 import cc.kune.domain.Container;

Modified: trunk/src/main/java/cc/kune/core/server/state/StateServiceDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/state/StateServiceDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/state/StateServiceDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,14 +17,14 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.state;
+package cc.kune.core.server.state;
 
-import org.ourproject.kune.platf.server.access.AccessRightsService;
-import org.ourproject.kune.platf.server.content.ContentManager;
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.manager.SocialNetworkManager;
-import org.ourproject.kune.platf.server.manager.TagUserContentManager;
 
+import cc.kune.core.server.access.AccessRightsService;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.manager.SocialNetworkManager;
+import cc.kune.core.server.manager.TagUserContentManager;
 import cc.kune.core.shared.i18n.I18nTranslationService;
 import cc.kune.domain.Container;
 import cc.kune.domain.Content;

Copied: trunk/src/main/java/cc/kune/core/server/tool (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/tool)

Modified: trunk/src/main/java/cc/kune/core/server/tool/ServerTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/tool/ServerTool.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/tool/ServerTool.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.tool;
+package cc.kune.core.server.tool;
 
 
 import cc.kune.domain.Container;

Modified: trunk/src/main/java/cc/kune/core/server/tool/ServerToolRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/tool/ServerToolRegistry.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/tool/ServerToolRegistry.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.tool;
+package cc.kune.core.server.tool;
 
 import java.util.ArrayList;
 import java.util.Collection;

Modified: trunk/src/main/java/cc/kune/core/server/tool/ServerToolTarget.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/tool/ServerToolTarget.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/tool/ServerToolTarget.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.tool;
+package cc.kune.core.server.tool;
 
 public enum ServerToolTarget {
     forUsers, forGroups, forBoth

Modified: trunk/src/main/java/cc/kune/core/server/tool/ToolSimple.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/tool/ToolSimple.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/tool/ToolSimple.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  \*/
-package org.ourproject.kune.platf.server.tool;
+package cc.kune.core.server.tool;
 
 public class ToolSimple {
 

Copied: trunk/src/main/java/cc/kune/core/server/users (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/users)

Modified: trunk/src/main/java/cc/kune/core/server/users/Link.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/users/Link.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/users/Link.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.users;
+package cc.kune.core.server.users;
 
 import java.util.List;
 

Modified: trunk/src/main/java/cc/kune/core/server/users/UserInfo.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfo.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/users/UserInfo.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.users;
+package cc.kune.core.server.users;
 
 import java.util.List;
 

Modified: trunk/src/main/java/cc/kune/core/server/users/UserInfoService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfoService.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/users/UserInfoService.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.users;
+package cc.kune.core.server.users;
 
 
 import cc.kune.core.client.errors.DefaultException;

Modified: trunk/src/main/java/cc/kune/core/server/users/UserInfoServiceDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfoServiceDefault.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/users/UserInfoServiceDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,12 +17,12 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.users;
+package cc.kune.core.server.users;
 
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.manager.SocialNetworkManager;
 
 import cc.kune.core.client.errors.DefaultException;
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.manager.SocialNetworkManager;
 import cc.kune.domain.Content;
 import cc.kune.domain.Group;
 import cc.kune.domain.User;

Copied: trunk/src/main/java/cc/kune/core/server/utils (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/server/utils)

Modified: trunk/src/main/java/cc/kune/core/server/utils/FilenameUtils.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/utils/FilenameUtils.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/utils/FilenameUtils.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.utils;
+package cc.kune.core.server.utils;
 
 import org.apache.commons.lang.StringUtils;
 

Modified: trunk/src/main/java/cc/kune/core/server/utils/StringW.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/utils/StringW.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/utils/StringW.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
 //package com.generationjava.lang;
 // copied in kune from:
 // http://svn.apache.org/repos/asf/jakarta/taglibs/proper/string/trunk/src/org/apache/taglibs/string/util/StringW.java
-package org.ourproject.kune.platf.server.utils;
+package cc.kune.core.server.utils;
 
 import org.apache.commons.lang.StringUtils;
 

Modified: trunk/src/main/java/cc/kune/core/server/utils/XmlW.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/utils/XmlW.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/main/java/cc/kune/core/server/utils/XmlW.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
 //package com.generationjava.web;
 // Copied in kune from:
 // http://svn.apache.org/repos/asf/jakarta/taglibs/proper/string/trunk/src/org/apache/taglibs/string/util/XmlW.java
-package org.ourproject.kune.platf.server.utils;
+package cc.kune.core.server.utils;
 
 import org.apache.commons.lang.StringUtils;
 

Copied: trunk/src/main/java/cc/kune/core/server/xmpp/ChatConnection.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/chat/server/managers/ChatConnection.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/xmpp/ChatConnection.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/xmpp/ChatConnection.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,24 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.xmpp;
+
+public interface ChatConnection {
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/xmpp/ChatException.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/chat/server/managers/ChatException.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/xmpp/ChatException.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/xmpp/ChatException.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.xmpp;
+
+import org.jivesoftware.smack.XMPPException;
+
+public class ChatException extends RuntimeException {
+
+    private static final long serialVersionUID = 3777046831841032482L;
+
+    public ChatException() {
+        super("");
+    }
+
+    public ChatException(final XMPPException cause) {
+        super(cause);
+    }
+}

Copied: trunk/src/main/java/cc/kune/core/server/xmpp/Room.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/chat/server/managers/Room.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/xmpp/Room.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/xmpp/Room.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,24 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.xmpp;
+
+public interface Room {
+    void setListener(RoomListener listener);
+}

Copied: trunk/src/main/java/cc/kune/core/server/xmpp/RoomConfigurationDumper.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/chat/server/managers/RoomConfigurationDumper.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/xmpp/RoomConfigurationDumper.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/xmpp/RoomConfigurationDumper.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,76 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.xmpp;
+
+import java.util.Iterator;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jivesoftware.smack.XMPPException;
+import org.jivesoftware.smackx.Form;
+import org.jivesoftware.smackx.FormField;
+import org.jivesoftware.smackx.muc.MultiUserChat;
+
+class RoomConfigurationDumper {
+
+    private static final Log LOG = LogFactory.getLog(RoomConfigurationDumper.class);
+
+    public static void showConfiguration(final Form form) {
+        for (Iterator<FormField> fields = form.getFields(); fields.hasNext();) {
+            FormField formField = fields.next();
+            log("Field label: " + formField.getLabel());
+            log("Field variable: " + formField.getVariable());
+            log("Field type: " + formField.getType());
+            log("Field desc: " + formField.getDescription());
+            log("Field options: " + log(formField.getOptions()));
+            log("Field values: " + log(formField.getValues()));
+            log("Field end -------------------");
+        }
+    }
+
+    private static String log(final Iterator<?> options) {
+        String s = "";
+        while (options.hasNext()) {
+            s += "| " + options.next().toString();
+        }
+        return s;
+    }
+
+    private static void log(final String string) {
+        LOG.debug(string);
+    }
+
+    void configure2(final MultiUserChat muc) throws XMPPException {
+        Form form = muc.getConfigurationForm().createAnswerForm();
+        form.setAnswer("muc#roomconfig_passwordprotectedroom", false);
+        // form.setAnswer("muc#roomconfig_roomname",
+        // mucRoomDialog.getRoomName());
+
+        form.setAnswer("muc#roomconfig_persistentroom", true);
+
+        // List owners = new ArrayList();
+        // owners.add(SparkManager.getSessionManager().getBareAddress());
+        // form.setAnswer("muc#roomconfig_roomowners", owners);
+
+        // new DataFormDialog(groupChat, form);
+        muc.sendConfigurationForm(form);
+
+    }
+}

Copied: trunk/src/main/java/cc/kune/core/server/xmpp/RoomListener.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/chat/server/managers/RoomListener.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/xmpp/RoomListener.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/xmpp/RoomListener.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,26 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.xmpp;
+
+public interface RoomListener {
+
+    void onMessage(String from, String to, String body);
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/xmpp/XmppConnection.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppConnection.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/xmpp/XmppConnection.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/xmpp/XmppConnection.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,41 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.xmpp;
+
+import org.jivesoftware.smack.XMPPConnection;
+
+public class XmppConnection implements ChatConnection {
+    private final XMPPConnection conn;
+    private final String userName;
+
+    public XmppConnection(final String userName, final XMPPConnection conn) {
+        this.userName = userName;
+        this.conn = conn;
+    }
+
+    public XMPPConnection getConn() {
+        return conn;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/xmpp/XmppManager.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppManager.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/xmpp/XmppManager.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/xmpp/XmppManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,44 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.xmpp;
+
+import java.util.Collection;
+
+import org.jivesoftware.smack.RosterEntry;
+
+public interface XmppManager {
+
+    Room createRoom(ChatConnection connection, String roomName, String ownerAlias);
+
+    void destroyRoom(ChatConnection conn, String roomName);
+
+    void disconnect(ChatConnection connection);
+
+    Collection<RosterEntry> getRoster(ChatConnection connection);
+
+    Room joinRoom(ChatConnection connection, String roomName, String alias);
+
+    ChatConnection login(String userName, String password, String resource);
+
+    void sendMessage(Room room, String message);
+
+    void sendMessage(String userName, String message);
+
+}

Copied: trunk/src/main/java/cc/kune/core/server/xmpp/XmppManagerDefault.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppManagerDefault.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/xmpp/XmppManagerDefault.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/xmpp/XmppManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,194 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.xmpp;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jivesoftware.smack.Chat;
+import org.jivesoftware.smack.ConnectionConfiguration;
+import org.jivesoftware.smack.MessageListener;
+import org.jivesoftware.smack.Roster;
+import org.jivesoftware.smack.RosterEntry;
+import org.jivesoftware.smack.XMPPConnection;
+import org.jivesoftware.smack.XMPPException;
+import org.jivesoftware.smack.packet.Message;
+import org.jivesoftware.smackx.Form;
+import org.jivesoftware.smackx.FormField;
+import org.jivesoftware.smackx.muc.MultiUserChat;
+
+import cc.kune.core.server.properties.ChatProperties;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class XmppManagerDefault implements XmppManager {
+    public static final Log LOG = LogFactory.getLog(XmppManagerDefault.class);
+
+    private final ChatProperties chatProperties;
+
+    @Inject
+    public XmppManagerDefault(final ChatProperties chatProperties) {
+        this.chatProperties = chatProperties;
+    }
+
+    public Room createRoom(final ChatConnection conn, final String roomName, final String alias) {
+        XmppConnection xConn = (XmppConnection) conn;
+        MultiUserChat muc = new MultiUserChat(xConn.getConn(), getRoomName(roomName));
+        try {
+            muc.create(alias);
+            configure(muc);
+            XmppRoom room = new XmppRoom(muc, alias);
+            muc.addMessageListener(room);
+            return room;
+        } catch (XMPPException e) {
+            throw new ChatException(e);
+        }
+    }
+
+    public void destroyRoom(final ChatConnection conn, final String roomName) {
+        XmppConnection xConn = (XmppConnection) conn;
+        MultiUserChat muc = new MultiUserChat(xConn.getConn(), getRoomName(roomName));
+        try {
+            muc.destroy("Room removed by kune server", "");
+        } catch (XMPPException e) {
+            throw new ChatException(e);
+        }
+    }
+
+    public void disconnect(final ChatConnection connection) {
+        XmppConnection xConn = (XmppConnection) connection;
+        xConn.getConn().disconnect();
+
+    }
+
+    public Collection<RosterEntry> getRoster(final ChatConnection conn) {
+        XmppConnection xConn = (XmppConnection) conn;
+        Roster roster = xConn.getConn().getRoster();
+        return roster.getEntries();
+    }
+
+    public Room joinRoom(final ChatConnection connection, final String roomName, final String alias) {
+        XmppConnection xConn = (XmppConnection) connection;
+        MultiUserChat muc = new MultiUserChat(xConn.getConn(), getRoomName(roomName));
+        try {
+            muc.join(alias);
+            // configure(muc);
+            XmppRoom room = new XmppRoom(muc, alias);
+            muc.addMessageListener(room);
+            return room;
+        } catch (XMPPException e) {
+            throw new ChatException(e);
+        }
+    }
+
+    public ChatConnection login(final String userName, final String password, final String resource) {
+        ConnectionConfiguration config = new ConnectionConfiguration(getServerName(), 5222);
+        XMPPConnection conn = new XMPPConnection(config);
+        try {
+            conn.connect();
+            conn.login(userName, password, resource, true);
+            return new XmppConnection(userName, conn);
+        } catch (XMPPException e) {
+            throw new ChatException(e);
+        }
+    }
+
+    public void sendMessage(final Room room, final String body) {
+        XmppRoom xAccess = (XmppRoom) room;
+        MultiUserChat muc = xAccess.getMuc();
+        Message message = muc.createMessage();
+        message.setBody(body);
+        message.setFrom(muc.getNickname());
+        try {
+            muc.sendMessage(body);
+        } catch (XMPPException e) {
+            throw new ChatException(e);
+        }
+    }
+
+    public void sendMessage(final String userName, final String text) {
+        ChatConnection connection = login(chatProperties.getAdminJID(), chatProperties.getAdminPasswd(),
+                "kuneserveradmin" + System.currentTimeMillis());
+        XMPPConnection xmppConn = ((XmppConnection) connection).getConn();
+
+        String userJid = userName + "@" + chatProperties.getDomain();
+        Chat newChat = xmppConn.getChatManager().createChat(userJid, new MessageListener() {
+            public void processMessage(final Chat arg0, final Message arg1) {
+                LOG.info("Sended message: " + text);
+            }
+        });
+        try {
+            final Message message = new Message();
+            message.setFrom(chatProperties.getDomain());
+            message.setTo(userJid);
+            message.setBody(text);
+            newChat.sendMessage(message);
+        } catch (Exception e) {
+            LOG.error("Error Delivering xmpp message to " + userName);
+        }
+        xmppConn.disconnect();
+    }
+
+    private void configure(final MultiUserChat muc) throws XMPPException {
+        Form form = muc.getConfigurationForm();
+        Form answer = form.createAnswerForm();
+
+        for (Iterator<FormField> fields = form.getFields(); fields.hasNext();) {
+            FormField field = fields.next();
+            String type = field.getType();
+            if (isVisible(type) && isNotEmpty(field) && isNotList(type)) {
+                List<String> values = new ArrayList<String>();
+                for (Iterator<String> it = field.getValues(); it.hasNext();) {
+                    values.add(it.next());
+                }
+                answer.setAnswer(field.getVariable(), values);
+            }
+        }
+        answer.setAnswer("muc#roomconfig_persistentroom", true);
+        muc.sendConfigurationForm(answer);
+    }
+
+    private String getRoomName(final String room) {
+        return room + "@" + chatProperties.getRoomHost();
+    }
+
+    private String getServerName() {
+        return chatProperties.getDomain();
+    }
+
+    private boolean isNotEmpty(final FormField field) {
+        return field.getVariable() != null;
+    }
+
+    private boolean isNotList(final String type) {
+        return !FormField.TYPE_JID_MULTI.equals(type) && !FormField.TYPE_LIST_MULTI.equals(type)
+                && !FormField.TYPE_LIST_SINGLE.equals(type) && !isVisible(type);
+    }
+
+    private boolean isVisible(final String type) {
+        return !FormField.TYPE_HIDDEN.equals(type);
+    }
+}

Copied: trunk/src/main/java/cc/kune/core/server/xmpp/XmppRoom.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppRoom.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/server/xmpp/XmppRoom.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/xmpp/XmppRoom.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,59 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.xmpp;
+
+import org.jivesoftware.smack.PacketListener;
+import org.jivesoftware.smack.packet.Message;
+import org.jivesoftware.smack.packet.Packet;
+import org.jivesoftware.smackx.muc.MultiUserChat;
+
+public class XmppRoom implements Room, PacketListener {
+    private final String alias;
+    private RoomListener listener;
+    private final MultiUserChat muc;
+
+    public XmppRoom(final MultiUserChat muc, final String alias) {
+        this.muc = muc;
+        this.alias = alias;
+    }
+
+    public String getAlias() {
+        return alias;
+    }
+
+    public void processPacket(final Packet packet) {
+        if (packet instanceof Message) {
+            processMessage((Message) packet);
+        }
+    }
+
+    private void processMessage(final Message message) {
+        listener.onMessage(message.getFrom(), message.getTo(), message.getBody());
+    }
+
+    public void setListener(final RoomListener listener) {
+        this.listener = listener;
+    }
+
+    public MultiUserChat getMuc() {
+        return muc;
+    }
+
+}

Copied: trunk/src/main/java/cc/kune/core/shared/SearcherConstants.java (from rev 1292, trunk/src/main/java/org/ourproject/kune/platf/client/services/SearcherConstants.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/SearcherConstants.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/shared/SearcherConstants.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.shared;
+
+public final class SearcherConstants {
+
+    public final static String START_PARAM = "start";
+    public final static String LIMIT_PARAM = "limit";
+    public final static String QUERY_PARAM = "query";
+    public final static String MIMETYPE_PARAM = "mimetype";
+    public final static String MIMETYPE2_PARAM = "mimetype2";
+    public final static String GROUP_PARAM = "group";
+
+    public final static String GROUP_DATA_PROXY_URL = "/ws/json/GroupJSONService/search";
+    public final static String USER_DATA_PROXY_URL = "/ws/json/UserJSONService/search";
+    public final static String CONTENT_DATA_PROXY_URL = "/ws/json/ContentJSONService/search";
+    public final static String I18N_JSON_SERVICE = "/ws/json/I18nTranslationJSONService/search";
+    public final static String I18N_JSON_SERVICE_TRANSLATED = "/ws/json/I18nTranslationJSONService/searchtranslated";
+
+    public final static String CONTENT_TEMPLATE_TEXT_PREFIX = "<div class=\"search-item\"><span class=\"kune-IconHyperlink\"><img src=\"";
+    public final static String CONTENT_TEMPLATE_TEXT_SUFFIX = "\" style=\"height: 16px; width: 16px;\" />{shortName}:&nbsp;{longName}</span></div>";
+
+    private SearcherConstants() {
+    }
+}


Property changes on: trunk/src/main/java/cc/kune/core/shared/SearcherConstants.java
___________________________________________________________________
Name: svn:mergeinfo
   + 

Modified: trunk/src/main/java/cc/kune/pspace/client/PSpaceGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/pspace/client/PSpaceGinModule.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/cc/kune/pspace/client/PSpaceGinModule.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -19,7 +19,6 @@
  */
 package cc.kune.pspace.client;
 
-
 import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
 
 public class PSpaceGinModule extends AbstractPresenterModule {
@@ -33,6 +32,7 @@
     protected void configure() {
         bindPresenter(PSpacePresenter.class, PSpacePresenter.PSpaceView.class, PSpacePanel.class,
                 PSpacePresenter.PSpaceProxy.class);
+        bind(PSpaceParts.class).asEagerSingleton();
     }
 
 }
\ No newline at end of file

Modified: trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java
===================================================================
--- trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -30,6 +30,7 @@
 import com.google.gwt.dom.client.Element;
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.ui.FlowPanel;
 import com.google.gwt.user.client.ui.Frame;
 import com.google.gwt.user.client.ui.HasText;
@@ -75,6 +76,7 @@
         layer.addClassName("k-box-5shadow");
         layer.addClassName("k-5corners");
         icon.setResource(res.browser32());
+        Window.alert("kk");
         wsArmor.getPublicSpace().add(widget);
     }
 

Deleted: trunk/src/main/java/cc/kune/wave/server/CustomServerRpcProvider.java.txt
===================================================================
--- trunk/src/main/java/cc/kune/wave/server/CustomServerRpcProvider.java.txt	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/cc/kune/wave/server/CustomServerRpcProvider.java.txt	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,509 +0,0 @@
-package cc.kune.wave.server;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import javax.servlet.Servlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
-import org.eclipse.jetty.server.Connector;
-import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
-import org.eclipse.jetty.servlet.DefaultServlet;
-import org.eclipse.jetty.servlet.ServletHolder;
-import org.eclipse.jetty.util.resource.ResourceCollection;
-import org.eclipse.jetty.webapp.WebAppContext;
-import org.eclipse.jetty.websocket.WebSocket;
-import org.eclipse.jetty.websocket.WebSocketServlet;
-import org.ourproject.kune.rack.RackServletFilter;
-import org.waveprotocol.box.common.comms.WaveClientRpc.ProtocolAuthenticate;
-import org.waveprotocol.box.common.comms.WaveClientRpc.ProtocolAuthenticationResult;
-import org.waveprotocol.box.server.CoreSettings;
-import org.waveprotocol.box.server.authentication.SessionManager;
-import org.waveprotocol.box.server.rpc.BaseUrlHelper;
-import org.waveprotocol.box.server.rpc.MessageExpectingChannel;
-import org.waveprotocol.box.server.rpc.ProtoCallback;
-import org.waveprotocol.box.server.rpc.Rpc;
-import org.waveprotocol.box.server.rpc.ServerRpcController;
-import org.waveprotocol.box.server.rpc.SocketIOServerChannel;
-import org.waveprotocol.box.server.rpc.WebSocketServerChannel;
-import org.waveprotocol.box.server.util.NetUtils;
-import org.waveprotocol.wave.model.util.Pair;
-import org.waveprotocol.wave.model.wave.ParticipantId;
-import org.waveprotocol.wave.util.logging.Log;
-
-import com.glines.socketio.server.SocketIOInbound;
-import com.glines.socketio.server.SocketIOServlet;
-import com.glines.socketio.server.transport.FlashSocketTransport;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
-import com.google.inject.name.Named;
-import com.google.protobuf.Descriptors;
-import com.google.protobuf.Descriptors.MethodDescriptor;
-import com.google.protobuf.Message;
-import com.google.protobuf.RpcCallback;
-import com.google.protobuf.Service;
-import com.google.protobuf.UnknownFieldSet;
-
-/**
- * ServerRpcProvider can provide instances of type Service over an incoming
- * network socket and service incoming RPCs to these services and their methods.
- *
- *
- */
-public class CustomServerRpcProvider {
-    abstract class Connection implements ProtoCallback {
-        private final Map<Long, ServerRpcController> activeRpcs = new ConcurrentHashMap<Long, ServerRpcController>();
-
-        // The logged in user.
-        // Note: Due to this bug:
-        // http://code.google.com/p/wave-protocol/issues/detail?id=119,
-        // the field may be null on first connect and then set later using an
-        // RPC.
-        private ParticipantId loggedInUser;
-
-        /**
-         * @param loggedInUser
-         *            The currently logged in user, or null if no user is logged
-         *            in.
-         */
-        public Connection(final ParticipantId loggedInUser) {
-            this.loggedInUser = loggedInUser;
-        }
-
-        private ParticipantId authenticate(final String token) {
-            final HttpSession session = sessionManager.getSessionFromToken(token);
-            final ParticipantId user = sessionManager.getLoggedInUser(session);
-            return user;
-        }
-
-        protected void expectMessages(final MessageExpectingChannel channel) {
-            synchronized (registeredServices) {
-                for (final RegisteredServiceMethod serviceMethod : registeredServices.values()) {
-                    channel.expectMessage(serviceMethod.service.getRequestPrototype(serviceMethod.method));
-                    LOG.fine("Expecting: " + serviceMethod.method.getFullName());
-                }
-            }
-            channel.expectMessage(Rpc.CancelRpc.getDefaultInstance());
-        }
-
-        @Override
-        public void message(final long sequenceNo, final Message message) {
-            if (message instanceof Rpc.CancelRpc) {
-                final ServerRpcController controller = activeRpcs.get(sequenceNo);
-                if (controller == null) {
-                    throw new IllegalStateException("Trying to cancel an RPC that is not active!");
-                } else {
-                    LOG.info("Cancelling open RPC " + sequenceNo);
-                    controller.cancel();
-                }
-            } else if (message instanceof ProtocolAuthenticate) {
-                // Workaround for bug:
-                // http://codereview.waveprotocol.org/224001/
-
-                // When we get this message, either the connection will not be
-                // logged in
-                // (loggedInUser == null) or the connection will have been
-                // authenticated
-                // via cookies
-                // (in which case loggedInUser must match the authenticated
-                // user, and
-                // this message has no
-                // effect).
-
-                final ProtocolAuthenticate authMessage = (ProtocolAuthenticate) message;
-                final ParticipantId authenticatedAs = authenticate(authMessage.getToken());
-
-                Preconditions.checkArgument(authenticatedAs != null, "Auth token invalid");
-                Preconditions.checkState(loggedInUser == null || loggedInUser.equals(authenticatedAs),
-                        "Session already authenticated as a different user");
-
-                loggedInUser = authenticatedAs;
-                LOG.info("Session authenticated as " + loggedInUser);
-                sendMessage(sequenceNo, ProtocolAuthenticationResult.getDefaultInstance());
-            } else if (registeredServices.containsKey(message.getDescriptorForType())) {
-                if (activeRpcs.containsKey(sequenceNo)) {
-                    throw new IllegalStateException("Can't invoke a new RPC with a sequence number already in use.");
-                } else {
-                    final RegisteredServiceMethod serviceMethod = registeredServices.get(message.getDescriptorForType());
-
-                    // Create the internal ServerRpcController used to invoke
-                    // the call.
-                    final ServerRpcController controller = new ServerRpcControllerImpl(message, serviceMethod.service,
-                            serviceMethod.method, loggedInUser, new RpcCallback<Message>() {
-                                @Override
-                                synchronized public void run(final Message message) {
-                                    if (message instanceof Rpc.RpcFinished
-                                            || !serviceMethod.method.getOptions().getExtension(Rpc.isStreamingRpc)) {
-                                        // This RPC is over - remove it from the
-                                        // map.
-                                        final boolean failed = message instanceof Rpc.RpcFinished ? ((Rpc.RpcFinished) message).getFailed()
-                                                : false;
-                                        LOG.fine("RPC " + sequenceNo + " is now finished, failed = " + failed);
-                                        if (failed) {
-                                            LOG.info("error = " + ((Rpc.RpcFinished) message).getErrorText());
-                                        }
-                                        activeRpcs.remove(sequenceNo);
-                                    }
-                                    sendMessage(sequenceNo, message);
-                                }
-                            });
-
-                    // Kick off a new thread specific to this RPC.
-                    activeRpcs.put(sequenceNo, controller);
-                    threadPool.execute(controller);
-                }
-            } else {
-                // Sent a message type we understand, but don't expect -
-                // erronous case!
-                throw new IllegalStateException("Got expected but unknown message  (" + message + ") for sequence: "
-                        + sequenceNo);
-            }
-        }
-
-        protected abstract void sendMessage(long sequenceNo, Message message);
-
-        @Override
-        public void unknown(final long sequenceNo, final String messageType, final String message) {
-            throw new IllegalStateException("Got unknown message (type: " + messageType + ", " + message
-                    + ") for sequence: " + sequenceNo);
-        }
-
-        @Override
-        public void unknown(final long sequenceNo, final String messageType, final UnknownFieldSet message) {
-            throw new IllegalStateException("Got unknown message (type: " + messageType + ", " + message
-                    + ") for sequence: " + sequenceNo);
-        }
-    }
-
-    /**
-     * Internal, static container class for any specific registered service
-     * method.
-     */
-    static class RegisteredServiceMethod {
-        final MethodDescriptor method;
-        final Service service;
-
-        RegisteredServiceMethod(final Service service, final MethodDescriptor method) {
-            this.service = service;
-            this.method = method;
-        }
-    }
-    class SocketIOConnection extends Connection {
-        private final SocketIOServerChannel socketChannel;
-
-        SocketIOConnection(final ParticipantId loggedInUser) {
-            super(loggedInUser);
-            socketChannel = new SocketIOServerChannel(this);
-            LOG.info("New websocket connection set up for user " + loggedInUser);
-            expectMessages(socketChannel);
-        }
-
-        public SocketIOServerChannel getWebSocketServerChannel() {
-            return socketChannel;
-        }
-
-        @Override
-        protected void sendMessage(final long sequenceNo, final Message message) {
-            socketChannel.sendMessage(sequenceNo, message);
-        }
-    }
-    public class WaveSocketIOServlet extends SocketIOServlet {
-        @Override
-        protected SocketIOInbound doSocketIOConnect(final HttpServletRequest request, final String[] protocols) {
-            final ParticipantId loggedInUser = sessionManager.getLoggedInUser(request.getSession(false));
-
-            final SocketIOConnection connection = new SocketIOConnection(loggedInUser);
-            return connection.getWebSocketServerChannel();
-        }
-    }
-    public class WaveWebSocketServlet extends WebSocketServlet {
-        @Override
-        protected WebSocket doWebSocketConnect(final HttpServletRequest request, final String protocol) {
-            final ParticipantId loggedInUser = sessionManager.getLoggedInUser(request.getSession(false));
-
-            final WebSocketConnection connection = new WebSocketConnection(loggedInUser);
-            return connection.getWebSocketServerChannel();
-        }
-    }
-    class WebSocketConnection extends Connection {
-        private final WebSocketServerChannel socketChannel;
-
-        WebSocketConnection(final ParticipantId loggedInUser) {
-            super(loggedInUser);
-            socketChannel = new WebSocketServerChannel(this);
-            LOG.info("New websocket connection set up for user " + loggedInUser);
-            expectMessages(socketChannel);
-        }
-
-        public WebSocketServerChannel getWebSocketServerChannel() {
-            return socketChannel;
-        }
-
-        @Override
-        protected void sendMessage(final long sequenceNo, final Message message) {
-            socketChannel.sendMessage(sequenceNo, message);
-        }
-    }
-    private static final Log LOG = Log.get(CustomServerRpcProvider.class);
-
-    private static InetSocketAddress[] parseAddressList(final List<String> addressList) {
-        if (addressList == null || addressList.size() == 0) {
-            return new InetSocketAddress[0];
-        } else {
-            final Set<InetSocketAddress> addresses = Sets.newHashSet();
-            for (final String str : addressList) {
-                if (str.length() == 0) {
-                    LOG.warning("Encountered empty address in http addresses list.");
-                } else {
-                    try {
-                        final InetSocketAddress address = NetUtils.parseHttpAddress(str);
-                        if (!addresses.contains(address)) {
-                            addresses.add(address);
-                        } else {
-                            LOG.warning("Ignoring duplicate address in http addresses list: Duplicate entry '" + str
-                                    + "' resolved to " + address.getAddress().getHostAddress());
-                        }
-                    } catch (final IOException e) {
-                        LOG.severe("Unable to process address " + str, e);
-                    }
-                }
-            }
-            return addresses.toArray(new InetSocketAddress[0]);
-        }
-    }
-    private final String baseUrl;
-
-    private final Integer flashsocketPolicyPort;
-
-    private final InetSocketAddress[] httpAddresses;
-
-    private Server httpServer = null;
-
-    private final Set<Connection> incomingConnections = Sets.newHashSet();
-
-    private final org.eclipse.jetty.server.SessionManager jettySessionManager;
-
-    // Mapping from incoming protocol buffer type -> specific handler.
-    private final Map<Descriptors.Descriptor, RegisteredServiceMethod> registeredServices = Maps.newHashMap();
-
-    private final String resourceBase;
-
-    /**
-     * Set of servlets
-     */
-    List<Pair<String, ServletHolder>> servletRegistry = Lists.newArrayList();
-
-    private final SessionManager sessionManager;
-
-    private final ExecutorService threadPool;
-
-    /**
-     * Construct a new ServerRpcProvider, hosting on the specified WebSocket
-     * addresses.
-     *
-     * Also accepts an ExecutorService for spawning managing threads.
-     */
-    public CustomServerRpcProvider(final InetSocketAddress[] httpAddresses, final Integer flashsocketPolicyPort,
-            final String baseUrl, final String resourceBase, final ExecutorService threadPool,
-            final SessionManager sessionManager, final org.eclipse.jetty.server.SessionManager jettySessionManager) {
-        this.httpAddresses = httpAddresses;
-        this.flashsocketPolicyPort = flashsocketPolicyPort;
-        this.baseUrl = BaseUrlHelper.removeLastSlash(baseUrl);
-        this.resourceBase = resourceBase;
-        this.threadPool = threadPool;
-        this.sessionManager = sessionManager;
-        this.jettySessionManager = jettySessionManager;
-    }
-
-    /**
-     * Constructs a new ServerRpcProvider with a default ExecutorService.
-     */
-    public CustomServerRpcProvider(final InetSocketAddress[] httpAddresses, final Integer flashsocketPolicyPort,
-            final String baseUrl, final String resourceBase, final SessionManager sessionManager,
-            final org.eclipse.jetty.server.SessionManager jettySessionManager) {
-        this(httpAddresses, flashsocketPolicyPort, baseUrl, resourceBase, Executors.newCachedThreadPool(),
-                sessionManager, jettySessionManager);
-    }
-
-    @Inject
-    public CustomServerRpcProvider(@Named(CoreSettings.HTTP_FRONTEND_ADDRESSES) final List<String> httpAddresses,
-            @Named(CoreSettings.FLASHSOCKET_POLICY_PORT) final Integer flashsocketPolicyPort,
-            @Named(CoreSettings.HTTP_BASE_URL) final String baseUrl,
-            @Named(CoreSettings.RESOURCE_BASE) final String resourceBase, final SessionManager sessionManager,
-            final org.eclipse.jetty.server.SessionManager jettySessionManager) {
-        this(parseAddressList(httpAddresses), flashsocketPolicyPort, baseUrl, resourceBase, sessionManager,
-                jettySessionManager);
-    }
-
-    /**
-     * Add a servlet to the servlet registry. This servlet will be attached to
-     * the specified URL pattern when the server is started up.
-     *
-     * @param urlPattern
-     *            URL pattern for paths. Eg, '/foo', '/foo/*'
-     * @param servlet
-     *            The servlet object to bind to the specified paths
-     * @return the {@link ServletHolder} that holds the servlet.
-     */
-    public ServletHolder addServlet(final String urlPattern, final Servlet servlet) {
-        final ServletHolder servletHolder = new ServletHolder(servlet);
-        servletRegistry.add(new Pair<String, ServletHolder>(urlPattern, servletHolder));
-        return servletHolder;
-    }
-
-    /**
-     * @return a list of {@link SelectChannelConnector} each bound to a
-     *         host:port pair form the list addresses.
-     */
-    private List<SelectChannelConnector> getSelectChannelConnectors(final InetSocketAddress[] httpAddresses) {
-        final List<SelectChannelConnector> list = Lists.newArrayList();
-        for (final InetSocketAddress address : httpAddresses) {
-            final SelectChannelConnector connector = new SelectChannelConnector();
-            connector.setHost(address.getAddress().getHostAddress());
-            connector.setPort(address.getPort());
-            list.add(connector);
-        }
-
-        return list;
-    }
-
-    /**
-     * Returns the socket the WebSocket server is listening on.
-     */
-    public SocketAddress getWebSocketAddress() {
-        if (httpServer == null) {
-            return null;
-        } else {
-            final Connector c = httpServer.getConnectors()[0];
-            return new InetSocketAddress(c.getHost(), c.getLocalPort());
-        }
-    }
-
-    /**
-     * Register all methods provided by the given service type.
-     */
-    public void registerService(final Service service) {
-        synchronized (registeredServices) {
-            for (final MethodDescriptor methodDescriptor : service.getDescriptorForType().getMethods()) {
-                registeredServices.put(methodDescriptor.getInputType(), new RegisteredServiceMethod(service,
-                        methodDescriptor));
-            }
-        }
-    }
-
-    public void startWebSocketServer(final Injector injector) {
-        httpServer = new Server();
-
-        final List<SelectChannelConnector> connectors = getSelectChannelConnectors(httpAddresses);
-        if (connectors.isEmpty()) {
-            LOG.severe("No valid http end point address provided!");
-        }
-        for (final SelectChannelConnector connector : connectors) {
-            httpServer.addConnector(connector);
-        }
-
-        final WebAppContext context = new WebAppContext();
-
-        // FIXME This was with previous ServletContextHandler: needed?
-        // final ServletContextHandler context = new
-        // ServletContextHandler(ServletContextHandler.SESSIONS);
-
-        if (jettySessionManager != null) {
-            context.getSessionHandler().setSessionManager(jettySessionManager);
-        }
-        final ResourceCollection resources = new ResourceCollection(new String[] { "src/main/webapp", resourceBase, });
-        context.setBaseResource(resources);
-        context.setContextPath(baseUrl);
-
-        context.setParentLoaderPriority(true);
-        context.setDescriptor("WEB-INF/web.xml");
-
-        context.setAttribute(RackServletFilter.INJECTOR_PARENT_ATTRIBUTE, injector);
-
-        // Servlet where the websocket connection is served from.
-        final ServletHolder wsholder = new ServletHolder(new WaveWebSocketServlet());
-        context.addServlet(wsholder, "/socket");
-        // TODO(zamfi): fix to let messages span frames.
-        wsholder.setInitParameter("bufferSize", "" + 1024 * 1024); // 1M buffer
-
-        // Servlet where the websocket connection is served from.
-        final ServletHolder sioholder = new ServletHolder(new WaveSocketIOServlet());
-        context.addServlet(sioholder, "/socket.io/*");
-        // TODO(zamfi): fix to let messages span frames.
-        sioholder.setInitParameter("bufferSize", "" + 1024 * 1024); // 1M buffer
-        // Set flash policy server parameters
-        String flashPolicyServerHost = "localhost";
-        final StringBuilder flashPolicyAllowedPorts = new StringBuilder();
-        /*
-         * Loop through addresses, collect list of ports, and determine if we
-         * are to use "localhost" of the AnyHost wildcard.
-         */
-        for (final InetSocketAddress addr : httpAddresses) {
-            if (flashPolicyAllowedPorts.length() > 0) {
-                flashPolicyAllowedPorts.append(",");
-            }
-            flashPolicyAllowedPorts.append(addr.getPort());
-            if (!addr.getAddress().isLoopbackAddress()) {
-                // Until it's possible to pass a list of address, this is the
-                // only valid alternative.
-                flashPolicyServerHost = "0.0.0.0";
-            }
-        }
-        sioholder.setInitParameter(FlashSocketTransport.FLASHPOLICY_SERVER_HOST_KEY, flashPolicyServerHost);
-        sioholder.setInitParameter(FlashSocketTransport.FLASHPOLICY_SERVER_PORT_KEY, "" + flashsocketPolicyPort);
-        // TODO: Change to use the public http address and all other bound
-        // addresses.
-        sioholder.setInitParameter(FlashSocketTransport.FLASHPOLICY_DOMAIN_KEY, "*");
-        sioholder.setInitParameter(FlashSocketTransport.FLASHPOLICY_PORTS_KEY, flashPolicyAllowedPorts.toString());
-
-        // Serve the static content and GWT web client with the default servlet
-        // (acts like a standard file-based web server).
-        final ServletHolder defaultServlet = new ServletHolder(new DefaultServlet());
-        context.addServlet(defaultServlet, "/static/*");
-        context.addServlet(defaultServlet, "/webclient/*");
-        context.addServlet(defaultServlet, "/ws/*");
-        context.addServlet(defaultServlet, "/images/*");
-        context.addServlet(defaultServlet, "/javascripts/*");
-        context.addServlet(defaultServlet, "/stylesheets/*");
-        context.addServlet(defaultServlet, "/templates/*");
-
-        for (final Pair<String, ServletHolder> servlet : servletRegistry) {
-            context.addServlet(servlet.getSecond(), servlet.getFirst());
-        }
-
-        httpServer.setHandler(context);
-
-        try {
-            httpServer.start();
-        } catch (final Exception e) { // yes, .start() throws "Exception"
-            LOG.severe("Fatal error starting http server.", e);
-            return;
-        }
-        LOG.fine("WebSocket server running. --------");
-    }
-
-    /**
-     * Stops this server.
-     */
-    public void stopServer() throws IOException {
-        try {
-            httpServer.stop(); // yes, .stop() throws "Exception"
-        } catch (final Exception e) {
-            LOG.warning("Fatal error stopping http server.", e);
-        }
-        LOG.fine("server shutdown.");
-    }
-}

Deleted: trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,51 +0,0 @@
-<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.1.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.1.0/distro-source/core/src/gwt-module.dtd">
-<module rename-to="wsold">
-  <inherits name="com.google.gwt.i18n.I18N" />
-  <inherits name="com.google.gwt.user.User" />
-  <inherits name="com.google.gwt.resources.Resources" />
-  <!-- for automated testing (see UIObject.ensureDebugId()) -->
-  <inherits name="com.google.gwt.user.Debug" />
-  <!-- http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/4d38cff6b1c217c6/8fae54c512bac373?lnk=gst&q=will+not+be+serialized+because+it+is+final+#8fae54c512bac373 -->
-  <set-property name="gwt.suppressNonStaticFinalFieldWarnings"
-    value="true" />
-  <inherits name="com.calclab.suco.Suco" />
-  <inherits name="org.ourproject.kune.platf.KunePlatform" />
-  <inherits name="org.ourproject.kune.docs.KuneDocs" />
-  <inherits name="org.ourproject.kune.blogs.KuneBlogs" />
-  <inherits name="org.ourproject.kune.wiki.KuneWiki" />
-  <inherits name="org.ourproject.kune.chat.KuneChat" />
-  <inherits name="org.ourproject.kune.gallery.KuneGallery" />
-  <inherits name="org.xwiki.gwt.dom.DOM" />
-  <inherits name="org.cobogw.gwt.user.User" />
-  <!-- gwt-ext -->
-  <inherits name="com.gwtext.GwtExt" />
-  <script src="js/ext/adapter/ext/ext-base.js" />
-  <script src="js/ext/ext-all.js" />
-  <inherits name="com.gwtextux.GwtExtUx" />
-  <inherits name="com.gwtextux.UploadDialog" />
-  <inherits name="com.gwtextux.ToastWindow" />
-  <script src="js/UploadDialog/Ext.ux.UploadDialog.packed.js" />
-  <stylesheet src="js/UploadDialog/css/Ext.ux.UploadDialog.css" />
-  <script src="js/ext-ux-all-min.js" />
-  <!-- kune css -->
-  <stylesheet src="css/all.css" />
-  <inherits name="com.allen_sauer.gwt.log.gwt-log" />
-  <extend-property name="log_level" values="DEBUG" />
-  <set-property name="log_level" value="DEBUG" />
-  <set-property name="log_DivLogger" value="DISABLED" />
-  <set-property name="log_FirebugLogger" value="ENABLED" />
-  <!-- Inspired by Apache log4j PatternLayout: http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html -->
-  <set-configuration-property name="log_pattern"
-    value="%d [%-5p] %m%n" />
-  <!-- <extend-property name="locale" values="es" /> <extend-property name="locale"
-    values="ar" /> -->
-  <!--http://code.google.com/p/google-web-toolkit/issues/detail?id=42 -->
-  <set-property name="user.agent" value="gecko1_8" />
-<!--  <inherits name="com.google.gwt.wave.Wave" />-->
-  <inherits name="org.ourproject.kune.ws.armor.WsArmor" />
-  <!-- Specify the app entry point class. -->
-  <entry-point class="org.ourproject.kune.app.client.OldKuneEntryPoint" />
-  <!-- excluding test sources for this module workaround for open issue 4454
-    see http://code.google.com/p/google-web-toolkit/issues/detail?id=4454 -->
-  <source path='client' excludes="**/*Test.java,**/*Tests.java,**/*MockProvider.java"/>
-</module>
\ No newline at end of file

Modified: trunk/src/main/java/org/ourproject/kune/blogs/server/BlogServerTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/server/BlogServerTool.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/blogs/server/BlogServerTool.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -19,15 +19,15 @@
  */
 package org.ourproject.kune.blogs.server;
 
-import org.ourproject.kune.platf.server.content.ContainerManager;
-import org.ourproject.kune.platf.server.content.ContentManager;
-import org.ourproject.kune.platf.server.manager.ToolConfigurationManager;
-import org.ourproject.kune.platf.server.tool.ServerTool;
-import org.ourproject.kune.platf.server.tool.ServerToolRegistry;
-import org.ourproject.kune.platf.server.tool.ServerToolTarget;
 
 import cc.kune.core.client.errors.ContainerNotPermittedException;
 import cc.kune.core.client.errors.ContentNotPermittedException;
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.manager.ToolConfigurationManager;
+import cc.kune.core.server.tool.ServerTool;
+import cc.kune.core.server.tool.ServerToolRegistry;
+import cc.kune.core.server.tool.ServerToolTarget;
 import cc.kune.core.shared.domain.ContentStatus;
 import cc.kune.core.shared.i18n.I18nTranslationService;
 import cc.kune.domain.Container;

Modified: trunk/src/main/java/org/ourproject/kune/chat/server/ChatServerTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/server/ChatServerTool.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/chat/server/ChatServerTool.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -20,13 +20,13 @@
 package org.ourproject.kune.chat.server;
 
 import org.ourproject.kune.chat.client.ChatClientTool;
-import org.ourproject.kune.platf.server.content.ContainerManager;
-import org.ourproject.kune.platf.server.manager.ToolConfigurationManager;
-import org.ourproject.kune.platf.server.tool.ServerTool;
-import org.ourproject.kune.platf.server.tool.ServerToolRegistry;
-import org.ourproject.kune.platf.server.tool.ServerToolTarget;
 
 import cc.kune.core.client.errors.ContainerNotPermittedException;
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.manager.ToolConfigurationManager;
+import cc.kune.core.server.tool.ServerTool;
+import cc.kune.core.server.tool.ServerToolRegistry;
+import cc.kune.core.server.tool.ServerToolTarget;
 import cc.kune.domain.Container;
 import cc.kune.domain.Content;
 import cc.kune.domain.Group;

Deleted: trunk/src/main/java/org/ourproject/kune/chat/server/managers/ChatConnection.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/server/managers/ChatConnection.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/chat/server/managers/ChatConnection.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,24 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.chat.server.managers;
-
-public interface ChatConnection {
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/chat/server/managers/ChatException.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/server/managers/ChatException.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/chat/server/managers/ChatException.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,35 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.chat.server.managers;
-
-import org.jivesoftware.smack.XMPPException;
-
-public class ChatException extends RuntimeException {
-
-    private static final long serialVersionUID = 3777046831841032482L;
-
-    public ChatException() {
-        super("");
-    }
-
-    public ChatException(final XMPPException cause) {
-        super(cause);
-    }
-}

Deleted: trunk/src/main/java/org/ourproject/kune/chat/server/managers/Room.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/server/managers/Room.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/chat/server/managers/Room.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,24 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.chat.server.managers;
-
-public interface Room {
-    void setListener(RoomListener listener);
-}

Deleted: trunk/src/main/java/org/ourproject/kune/chat/server/managers/RoomConfigurationDumper.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/server/managers/RoomConfigurationDumper.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/chat/server/managers/RoomConfigurationDumper.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,76 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.chat.server.managers;
-
-import java.util.Iterator;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jivesoftware.smack.XMPPException;
-import org.jivesoftware.smackx.Form;
-import org.jivesoftware.smackx.FormField;
-import org.jivesoftware.smackx.muc.MultiUserChat;
-
-class RoomConfigurationDumper {
-
-    private static final Log LOG = LogFactory.getLog(RoomConfigurationDumper.class);
-
-    public static void showConfiguration(final Form form) {
-        for (Iterator<FormField> fields = form.getFields(); fields.hasNext();) {
-            FormField formField = fields.next();
-            log("Field label: " + formField.getLabel());
-            log("Field variable: " + formField.getVariable());
-            log("Field type: " + formField.getType());
-            log("Field desc: " + formField.getDescription());
-            log("Field options: " + log(formField.getOptions()));
-            log("Field values: " + log(formField.getValues()));
-            log("Field end -------------------");
-        }
-    }
-
-    private static String log(final Iterator<?> options) {
-        String s = "";
-        while (options.hasNext()) {
-            s += "| " + options.next().toString();
-        }
-        return s;
-    }
-
-    private static void log(final String string) {
-        LOG.debug(string);
-    }
-
-    void configure2(final MultiUserChat muc) throws XMPPException {
-        Form form = muc.getConfigurationForm().createAnswerForm();
-        form.setAnswer("muc#roomconfig_passwordprotectedroom", false);
-        // form.setAnswer("muc#roomconfig_roomname",
-        // mucRoomDialog.getRoomName());
-
-        form.setAnswer("muc#roomconfig_persistentroom", true);
-
-        // List owners = new ArrayList();
-        // owners.add(SparkManager.getSessionManager().getBareAddress());
-        // form.setAnswer("muc#roomconfig_roomowners", owners);
-
-        // new DataFormDialog(groupChat, form);
-        muc.sendConfigurationForm(form);
-
-    }
-}

Deleted: trunk/src/main/java/org/ourproject/kune/chat/server/managers/RoomListener.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/server/managers/RoomListener.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/chat/server/managers/RoomListener.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,26 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.chat.server.managers;
-
-public interface RoomListener {
-
-    void onMessage(String from, String to, String body);
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppConnection.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppConnection.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppConnection.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,41 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.chat.server.managers;
-
-import org.jivesoftware.smack.XMPPConnection;
-
-public class XmppConnection implements ChatConnection {
-    private final XMPPConnection conn;
-    private final String userName;
-
-    public XmppConnection(final String userName, final XMPPConnection conn) {
-        this.userName = userName;
-        this.conn = conn;
-    }
-
-    public XMPPConnection getConn() {
-        return conn;
-    }
-
-    public String getUserName() {
-        return userName;
-    }
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppManager.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,44 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.chat.server.managers;
-
-import java.util.Collection;
-
-import org.jivesoftware.smack.RosterEntry;
-
-public interface XmppManager {
-
-    Room createRoom(ChatConnection connection, String roomName, String ownerAlias);
-
-    void destroyRoom(ChatConnection conn, String roomName);
-
-    void disconnect(ChatConnection connection);
-
-    Collection<RosterEntry> getRoster(ChatConnection connection);
-
-    Room joinRoom(ChatConnection connection, String roomName, String alias);
-
-    ChatConnection login(String userName, String password, String resource);
-
-    void sendMessage(Room room, String message);
-
-    void sendMessage(String userName, String message);
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppManagerDefault.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,193 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.chat.server.managers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.jivesoftware.smack.Chat;
-import org.jivesoftware.smack.ConnectionConfiguration;
-import org.jivesoftware.smack.MessageListener;
-import org.jivesoftware.smack.Roster;
-import org.jivesoftware.smack.RosterEntry;
-import org.jivesoftware.smack.XMPPConnection;
-import org.jivesoftware.smack.XMPPException;
-import org.jivesoftware.smack.packet.Message;
-import org.jivesoftware.smackx.Form;
-import org.jivesoftware.smackx.FormField;
-import org.jivesoftware.smackx.muc.MultiUserChat;
-import org.ourproject.kune.platf.server.properties.ChatProperties;
-
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-
- at Singleton
-public class XmppManagerDefault implements XmppManager {
-    public static final Log LOG = LogFactory.getLog(XmppManagerDefault.class);
-
-    private final ChatProperties chatProperties;
-
-    @Inject
-    public XmppManagerDefault(final ChatProperties chatProperties) {
-        this.chatProperties = chatProperties;
-    }
-
-    public Room createRoom(final ChatConnection conn, final String roomName, final String alias) {
-        XmppConnection xConn = (XmppConnection) conn;
-        MultiUserChat muc = new MultiUserChat(xConn.getConn(), getRoomName(roomName));
-        try {
-            muc.create(alias);
-            configure(muc);
-            XmppRoom room = new XmppRoom(muc, alias);
-            muc.addMessageListener(room);
-            return room;
-        } catch (XMPPException e) {
-            throw new ChatException(e);
-        }
-    }
-
-    public void destroyRoom(final ChatConnection conn, final String roomName) {
-        XmppConnection xConn = (XmppConnection) conn;
-        MultiUserChat muc = new MultiUserChat(xConn.getConn(), getRoomName(roomName));
-        try {
-            muc.destroy("Room removed by kune server", "");
-        } catch (XMPPException e) {
-            throw new ChatException(e);
-        }
-    }
-
-    public void disconnect(final ChatConnection connection) {
-        XmppConnection xConn = (XmppConnection) connection;
-        xConn.getConn().disconnect();
-
-    }
-
-    public Collection<RosterEntry> getRoster(final ChatConnection conn) {
-        XmppConnection xConn = (XmppConnection) conn;
-        Roster roster = xConn.getConn().getRoster();
-        return roster.getEntries();
-    }
-
-    public Room joinRoom(final ChatConnection connection, final String roomName, final String alias) {
-        XmppConnection xConn = (XmppConnection) connection;
-        MultiUserChat muc = new MultiUserChat(xConn.getConn(), getRoomName(roomName));
-        try {
-            muc.join(alias);
-            // configure(muc);
-            XmppRoom room = new XmppRoom(muc, alias);
-            muc.addMessageListener(room);
-            return room;
-        } catch (XMPPException e) {
-            throw new ChatException(e);
-        }
-    }
-
-    public ChatConnection login(final String userName, final String password, final String resource) {
-        ConnectionConfiguration config = new ConnectionConfiguration(getServerName(), 5222);
-        XMPPConnection conn = new XMPPConnection(config);
-        try {
-            conn.connect();
-            conn.login(userName, password, resource, true);
-            return new XmppConnection(userName, conn);
-        } catch (XMPPException e) {
-            throw new ChatException(e);
-        }
-    }
-
-    public void sendMessage(final Room room, final String body) {
-        XmppRoom xAccess = (XmppRoom) room;
-        MultiUserChat muc = xAccess.getMuc();
-        Message message = muc.createMessage();
-        message.setBody(body);
-        message.setFrom(muc.getNickname());
-        try {
-            muc.sendMessage(body);
-        } catch (XMPPException e) {
-            throw new ChatException(e);
-        }
-    }
-
-    public void sendMessage(final String userName, final String text) {
-        ChatConnection connection = login(chatProperties.getAdminJID(), chatProperties.getAdminPasswd(),
-                "kuneserveradmin" + System.currentTimeMillis());
-        XMPPConnection xmppConn = ((XmppConnection) connection).getConn();
-
-        String userJid = userName + "@" + chatProperties.getDomain();
-        Chat newChat = xmppConn.getChatManager().createChat(userJid, new MessageListener() {
-            public void processMessage(final Chat arg0, final Message arg1) {
-                LOG.info("Sended message: " + text);
-            }
-        });
-        try {
-            final Message message = new Message();
-            message.setFrom(chatProperties.getDomain());
-            message.setTo(userJid);
-            message.setBody(text);
-            newChat.sendMessage(message);
-        } catch (Exception e) {
-            LOG.error("Error Delivering xmpp message to " + userName);
-        }
-        xmppConn.disconnect();
-    }
-
-    private void configure(final MultiUserChat muc) throws XMPPException {
-        Form form = muc.getConfigurationForm();
-        Form answer = form.createAnswerForm();
-
-        for (Iterator<FormField> fields = form.getFields(); fields.hasNext();) {
-            FormField field = fields.next();
-            String type = field.getType();
-            if (isVisible(type) && isNotEmpty(field) && isNotList(type)) {
-                List<String> values = new ArrayList<String>();
-                for (Iterator<String> it = field.getValues(); it.hasNext();) {
-                    values.add(it.next());
-                }
-                answer.setAnswer(field.getVariable(), values);
-            }
-        }
-        answer.setAnswer("muc#roomconfig_persistentroom", true);
-        muc.sendConfigurationForm(answer);
-    }
-
-    private String getRoomName(final String room) {
-        return room + "@" + chatProperties.getRoomHost();
-    }
-
-    private String getServerName() {
-        return chatProperties.getDomain();
-    }
-
-    private boolean isNotEmpty(final FormField field) {
-        return field.getVariable() != null;
-    }
-
-    private boolean isNotList(final String type) {
-        return !FormField.TYPE_JID_MULTI.equals(type) && !FormField.TYPE_LIST_MULTI.equals(type)
-                && !FormField.TYPE_LIST_SINGLE.equals(type) && !isVisible(type);
-    }
-
-    private boolean isVisible(final String type) {
-        return !FormField.TYPE_HIDDEN.equals(type);
-    }
-}

Deleted: trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppRoom.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppRoom.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/chat/server/managers/XmppRoom.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,59 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.chat.server.managers;
-
-import org.jivesoftware.smack.PacketListener;
-import org.jivesoftware.smack.packet.Message;
-import org.jivesoftware.smack.packet.Packet;
-import org.jivesoftware.smackx.muc.MultiUserChat;
-
-public class XmppRoom implements Room, PacketListener {
-    private final String alias;
-    private RoomListener listener;
-    private final MultiUserChat muc;
-
-    public XmppRoom(final MultiUserChat muc, final String alias) {
-        this.muc = muc;
-        this.alias = alias;
-    }
-
-    public String getAlias() {
-        return alias;
-    }
-
-    public void processPacket(final Packet packet) {
-        if (packet instanceof Message) {
-            processMessage((Message) packet);
-        }
-    }
-
-    private void processMessage(final Message message) {
-        listener.onMessage(message.getFrom(), message.getTo(), message.getBody());
-    }
-
-    public void setListener(final RoomListener listener) {
-        this.listener = listener;
-    }
-
-    public MultiUserChat getMuc() {
-        return muc;
-    }
-
-}

Modified: trunk/src/main/java/org/ourproject/kune/docs/server/DocumentServerTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/server/DocumentServerTool.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/docs/server/DocumentServerTool.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -21,15 +21,15 @@
 
 import java.util.Date;
 
-import org.ourproject.kune.platf.server.content.ContainerManager;
-import org.ourproject.kune.platf.server.content.ContentManager;
-import org.ourproject.kune.platf.server.manager.ToolConfigurationManager;
-import org.ourproject.kune.platf.server.tool.ServerTool;
-import org.ourproject.kune.platf.server.tool.ServerToolRegistry;
-import org.ourproject.kune.platf.server.tool.ServerToolTarget;
 
 import cc.kune.core.client.errors.ContainerNotPermittedException;
 import cc.kune.core.client.errors.ContentNotPermittedException;
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.manager.ToolConfigurationManager;
+import cc.kune.core.server.tool.ServerTool;
+import cc.kune.core.server.tool.ServerToolRegistry;
+import cc.kune.core.server.tool.ServerToolTarget;
 import cc.kune.core.shared.domain.ContentStatus;
 import cc.kune.core.shared.i18n.I18nTranslationService;
 import cc.kune.domain.Container;

Modified: trunk/src/main/java/org/ourproject/kune/gallery/server/GalleryServerTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/server/GalleryServerTool.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/gallery/server/GalleryServerTool.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -19,14 +19,14 @@
  */
 package org.ourproject.kune.gallery.server;
 
-import org.ourproject.kune.platf.server.content.ContainerManager;
-import org.ourproject.kune.platf.server.manager.ToolConfigurationManager;
-import org.ourproject.kune.platf.server.tool.ServerTool;
-import org.ourproject.kune.platf.server.tool.ServerToolRegistry;
-import org.ourproject.kune.platf.server.tool.ServerToolTarget;
 
 import cc.kune.core.client.errors.ContainerNotPermittedException;
 import cc.kune.core.client.errors.ContentNotPermittedException;
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.manager.ToolConfigurationManager;
+import cc.kune.core.server.tool.ServerTool;
+import cc.kune.core.server.tool.ServerToolRegistry;
+import cc.kune.core.server.tool.ServerToolTarget;
 import cc.kune.core.shared.i18n.I18nTranslationService;
 import cc.kune.domain.Container;
 import cc.kune.domain.Content;

Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/services/SearcherConstants.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/SearcherConstants.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/SearcherConstants.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,42 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.client.services;
-
-public final class SearcherConstants {
-
-    public final static String START_PARAM = "start";
-    public final static String LIMIT_PARAM = "limit";
-    public final static String QUERY_PARAM = "query";
-    public final static String MIMETYPE_PARAM = "mimetype";
-    public final static String MIMETYPE2_PARAM = "mimetype2";
-    public final static String GROUP_PARAM = "group";
-
-    public final static String GROUP_DATA_PROXY_URL = "/ws/json/GroupJSONService/search";
-    public final static String USER_DATA_PROXY_URL = "/ws/json/UserJSONService/search";
-    public final static String CONTENT_DATA_PROXY_URL = "/ws/json/ContentJSONService/search";
-    public final static String I18N_JSON_SERVICE = "/ws/json/I18nTranslationJSONService/search";
-    public final static String I18N_JSON_SERVICE_TRANSLATED = "/ws/json/I18nTranslationJSONService/searchtranslated";
-
-    public final static String CONTENT_TEMPLATE_TEXT_PREFIX = "<div class=\"search-item\"><span class=\"kune-IconHyperlink\"><img src=\"";
-    public final static String CONTENT_TEMPLATE_TEXT_SUFFIX = "\" style=\"height: 16px; width: 16px;\" />{shortName}:&nbsp;{longName}</span></div>";
-
-    private SearcherConstants() {
-    }
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/InitData.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/InitData.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/InitData.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,294 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.ourproject.kune.platf.server.tool.ToolSimple;
-import org.ourproject.kune.platf.server.users.UserInfo;
-
-import cc.kune.domain.ExtMediaDescrip;
-import cc.kune.domain.I18nCountry;
-import cc.kune.domain.I18nLanguage;
-import cc.kune.domain.License;
-
-public class InitData {
-
-    private String siteUrl;
-    private List<License> licenses;
-    private List<I18nLanguage> languages;
-    private List<I18nCountry> countries;
-    private String[] timezones;
-    private UserInfo userInfo;
-    private String chatHttpBase;
-    private String siteDomain;
-    private String chatDomain;
-    private String chatRoomHost;
-    private License defaultLicense;
-    private String currentCCversion;
-    private String defaultWsTheme;
-    private String[] wsThemes;
-    private String siteLogoUrl;
-    private String galleryPermittedExtensions;
-    private String maxFileSizeInMb;
-    private int imgResizewidth;
-    private int imgThumbsize;
-    private int imgCropsize;
-    private int imgIconsize;
-    private ArrayList<ToolSimple> userTools;
-    private ArrayList<ToolSimple> groupTools;
-    private List<ExtMediaDescrip> extMediaDescrips;
-
-    private String flvEmbedObject;
-
-    private String oggEmbedObject;
-
-    private String mp3EmbedObject;
-
-    private String aviEmbedObject;
-
-    public String getAviEmbedObject() {
-        return aviEmbedObject;
-    }
-
-    public String getChatDomain() {
-        return chatDomain;
-    }
-
-    public String getChatHttpBase() {
-        return chatHttpBase;
-    }
-
-    public String getChatRoomHost() {
-        return chatRoomHost;
-    }
-
-    public List<I18nCountry> getCountries() {
-        return countries;
-    }
-
-    public String getCurrentCCversion() {
-        return currentCCversion;
-    }
-
-    public License getDefaultLicense() {
-        return defaultLicense;
-    }
-
-    public String getDefaultWsTheme() {
-        return defaultWsTheme;
-    }
-
-    public List<ExtMediaDescrip> getExtMediaDescrips() {
-        return extMediaDescrips;
-    }
-
-    public String getFlvEmbedObject() {
-        return flvEmbedObject;
-    }
-
-    public String getGalleryPermittedExtensions() {
-        return galleryPermittedExtensions;
-    }
-
-    public ArrayList<ToolSimple> getGroupTools() {
-        return groupTools;
-    }
-
-    public int getImgCropsize() {
-        return imgCropsize;
-    }
-
-    public int getImgIconsize() {
-        return imgIconsize;
-    }
-
-    public int getImgResizewidth() {
-        return imgResizewidth;
-    }
-
-    public int getImgThumbsize() {
-        return imgThumbsize;
-    }
-
-    public List<I18nLanguage> getLanguages() {
-        return languages;
-    }
-
-    public List<License> getLicenses() {
-        return licenses;
-    }
-
-    public String getMaxFileSizeInMb() {
-        return maxFileSizeInMb;
-    }
-
-    public String getMp3EmbedObject() {
-        return mp3EmbedObject;
-    }
-
-    public String getOggEmbedObject() {
-        return oggEmbedObject;
-    }
-
-    @Deprecated
-    public String getSiteDomain() {
-        return siteDomain;
-    }
-
-    public String getSiteLogoUrl() {
-        return siteLogoUrl;
-    }
-
-    public String getSiteUrl() {
-        return siteUrl;
-    }
-
-    public String[] getTimezones() {
-        return timezones;
-    }
-
-    public UserInfo getUserInfo() {
-        return userInfo;
-    }
-
-    public ArrayList<ToolSimple> getUserTools() {
-        return userTools;
-    }
-
-    public String[] getWsThemes() {
-        return wsThemes;
-    }
-
-    public void setAviEmbedObject(final String aviEmbedObject) {
-        this.aviEmbedObject = aviEmbedObject;
-    }
-
-    public void setChatDomain(final String chatDomain) {
-        this.chatDomain = chatDomain;
-    }
-
-    public void setChatHttpBase(final String chatHttpBase) {
-        this.chatHttpBase = chatHttpBase;
-    }
-
-    public void setChatRoomHost(final String chatRoomHost) {
-        this.chatRoomHost = chatRoomHost;
-    }
-
-    public void setCountries(final List<I18nCountry> countries) {
-        this.countries = countries;
-    }
-
-    public void setCurrentCCversion(final String currentCCversion) {
-        this.currentCCversion = currentCCversion;
-    }
-
-    public void setDefaultLicense(final License defaultLicense) {
-        this.defaultLicense = defaultLicense;
-    }
-
-    public void setDefaultWsTheme(final String defaultWsTheme) {
-        this.defaultWsTheme = defaultWsTheme;
-    }
-
-    public void setExtMediaDescrips(final List<ExtMediaDescrip> extMediaDescrips) {
-        this.extMediaDescrips = extMediaDescrips;
-    }
-
-    public void setFlvEmbedObject(final String flvEmbedObject) {
-        this.flvEmbedObject = flvEmbedObject;
-    }
-
-    public void setGalleryPermittedExtensions(final String galleryPermittedExtensions) {
-        this.galleryPermittedExtensions = galleryPermittedExtensions;
-    }
-
-    public void setGroupTools(final ArrayList<ToolSimple> groupTools) {
-        this.groupTools = groupTools;
-    }
-
-    public void setImgCropsize(final int imgCropsize) {
-        this.imgCropsize = imgCropsize;
-    }
-
-    public void setImgIconsize(final int imgIconsize) {
-        this.imgIconsize = imgIconsize;
-    }
-
-    public void setImgResizewidth(final int imgResizewidth) {
-        this.imgResizewidth = imgResizewidth;
-    }
-
-    public void setImgThumbsize(final int imgThumbsize) {
-        this.imgThumbsize = imgThumbsize;
-    }
-
-    public void setLanguages(final List<I18nLanguage> languages) {
-        this.languages = languages;
-    }
-
-    public void setLicenses(final List<License> licenses) {
-        this.licenses = licenses;
-    }
-
-    public void setMaxFileSizeInMb(final String maxFileSizeInMb) {
-        this.maxFileSizeInMb = maxFileSizeInMb;
-    }
-
-    public void setMp3EmbedObject(final String mp3EmbedObject) {
-        this.mp3EmbedObject = mp3EmbedObject;
-    }
-
-    public void setOggEmbedObject(final String oggEmbedObject) {
-        this.oggEmbedObject = oggEmbedObject;
-    }
-
-    @Deprecated
-    public void setSiteDomain(final String siteDomain) {
-        this.siteDomain = siteDomain;
-    }
-
-    public void setSiteLogoUrl(final String siteLogoUrl) {
-        this.siteLogoUrl = siteLogoUrl;
-    }
-
-    public void setSiteUrl(final String siteUrl) {
-        this.siteUrl = siteUrl;
-    }
-
-    public void setTimezones(final String[] timezones) {
-        this.timezones = timezones;
-    }
-
-    public void setUserInfo(final UserInfo currentUserInfo) {
-        this.userInfo = currentUserInfo;
-    }
-
-    public void setUserTools(final ArrayList<ToolSimple> userTools) {
-        this.userTools = userTools;
-    }
-
-    public void setWsThemes(final String[] wsThemes) {
-        this.wsThemes = wsThemes;
-    }
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/KunePersistenceService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/KunePersistenceService.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/KunePersistenceService.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,44 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server;
-
-import org.ourproject.kune.platf.server.init.DatabaseInitializer;
-
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import com.google.inject.persist.PersistService;
-
- at Singleton
-public class KunePersistenceService {
-    @Inject
-    DatabaseInitializer databaseInitializer;
-    @Inject
-    PersistService persistenceService;
-
-    public void start() {
-        try {
-            persistenceService.start();
-            databaseInitializer.initConditional();
-        } catch (final Exception e) {
-            throw new ServerException("Error starting persistence service", e);
-        }
-    }
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/LoggerMethodInterceptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/LoggerMethodInterceptor.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/LoggerMethodInterceptor.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,123 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server;
-
-import org.aopalliance.intercept.MethodInterceptor;
-import org.aopalliance.intercept.MethodInvocation;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class LoggerMethodInterceptor implements MethodInterceptor {
-
-    private static final Log LOG = LogFactory.getLog(LoggerMethodInterceptor.class);
-    private final boolean simplifyNames;
-
-    public LoggerMethodInterceptor() {
-        this(true);
-    }
-
-    public LoggerMethodInterceptor(final boolean simplifyNames) {
-        this.simplifyNames = simplifyNames;
-    }
-
-    public Object invoke(final MethodInvocation invocation) throws Throwable {
-        logInvocation(invocation);
-        try {
-            final Object result = invocation.proceed();
-            logResult(invocation, result);
-            return result;
-        } catch (Exception e) {
-            logException(invocation, e);
-            throw e;
-        }
-    }
-
-    protected void log(final String output) {
-        LOG.debug(output);
-    }
-
-    protected void logException(final MethodInvocation invocation, final Throwable e) {
-        StringBuffer buffer = createBuffer(invocation);
-        addMethodName(invocation, buffer);
-        buffer.append(" EXCEPTION => ");
-        buffer.append(e.toString());
-        log(buffer.toString());
-    }
-
-    protected void logInvocation(final MethodInvocation invocation) {
-        StringBuffer buffer = createBuffer(invocation);
-        addMethodName(invocation, buffer);
-        addMethodParameters(invocation, buffer);
-        log(buffer.toString());
-    }
-
-    protected void logResult(final MethodInvocation invocation, final Object result) {
-        StringBuffer buffer = createBuffer(invocation);
-        addMethodName(invocation, buffer);
-        if (invocation.getMethod().getReturnType() != null) {
-            buffer.append(" => ");
-            buffer.append(getValue(result));
-        }
-        log(buffer.toString());
-    }
-
-    private void addMethodName(final MethodInvocation invocation, final StringBuffer buffer) {
-        buffer.append(".");
-        buffer.append(invocation.getMethod().getName());
-    }
-
-    private void addMethodParameters(final MethodInvocation invocation, final StringBuffer buffer) {
-        buffer.append("(");
-        Object[] arguments = invocation.getArguments();
-        for (Object arg : arguments) {
-            buffer.append(getValue(arg)).append(", ");
-        }
-        buffer.append(")");
-    }
-
-    private void addTargetClassName(final MethodInvocation invocation, final StringBuffer buffer) {
-        buffer.append(getSimpleName(invocation.getThis().getClass()));
-    }
-
-    private StringBuffer createBuffer(final MethodInvocation invocation) {
-        StringBuffer buffer = new StringBuffer();
-        addTargetClassName(invocation, buffer);
-        return buffer;
-    }
-
-    private String getSimpleName(final Class<? extends Object> type) {
-        String simpleName = type.getSimpleName();
-        if (simplifyNames == true) {
-            int index = simpleName.indexOf('$');
-            if (index > 0) {
-                simpleName = simpleName.substring(0, index);
-            }
-        }
-        return simpleName;
-    }
-
-    private String getValue(final Object result) {
-        if (result == null) {
-            return "null";
-        } else {
-            return result.toString();
-        }
-    }
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/OutermostCallInterceptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/OutermostCallInterceptor.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/OutermostCallInterceptor.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,78 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server;
-
-import org.aopalliance.intercept.MethodInterceptor;
-import org.aopalliance.intercept.MethodInvocation;
-
-import com.google.inject.Inject;
-import com.google.inject.Injector;
-
-/*
- * See:
- * http://tembrel.blogspot.com/2007/09/matcher-and-methodinterceptor-for-dwr.html
- *
- */
-
-public final class OutermostCallInterceptor implements MethodInterceptor {
-    /**
-     * Decorates a MethodInterceptor so that only the outermost invocation using
-     * that interceptor will be intercepted and nested invocations willbe
-     * ignored.
-     */
-    public static MethodInterceptor outermostCall(final MethodInterceptor interceptor) {
-        return new OutermostCallInterceptor(interceptor);
-    }
-
-    private final MethodInterceptor interceptor;
-
-    @SuppressWarnings("rawtypes")
-    private final ThreadLocal count = new ThreadLocal() {
-        @Override
-        protected Integer initialValue() {
-            return 0;
-        }
-    };
-
-    private OutermostCallInterceptor(final MethodInterceptor interceptor) {
-        this.interceptor = interceptor;
-    }
-
-    @SuppressWarnings("unchecked")
-    public Object invoke(final MethodInvocation invocation) throws Throwable {
-        final int savedCount = (Integer) count.get();
-        count.set(savedCount + 1);
-        try {
-            if ((Integer) count.get() > 1) {
-                return invocation.proceed();
-            } else {
-                return interceptor.invoke(invocation);
-            }
-        } finally {
-            count.set(savedCount);
-        }
-    }
-
-    /** Ensure underlying interceptor is injected. */
-    @Inject
-    void injectInterceptor(final Injector injector) {
-        injector.injectMembers(interceptor);
-    }
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/PlatformServerModule.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,181 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server;
-
-import static org.ourproject.kune.platf.server.OutermostCallInterceptor.outermostCall;
-
-import org.ourproject.kune.app.server.AbstractExtendedModule;
-import org.ourproject.kune.chat.server.managers.XmppManager;
-import org.ourproject.kune.chat.server.managers.XmppManagerDefault;
-import org.ourproject.kune.platf.server.access.AccessRightsService;
-import org.ourproject.kune.platf.server.access.AccessRightsServiceDefault;
-import org.ourproject.kune.platf.server.access.AccessService;
-import org.ourproject.kune.platf.server.access.AccessServiceDefault;
-import org.ourproject.kune.platf.server.access.FinderService;
-import org.ourproject.kune.platf.server.access.FinderServiceDefault;
-import org.ourproject.kune.platf.server.auth.Authenticated;
-import org.ourproject.kune.platf.server.auth.AuthenticatedMethodInterceptor;
-import org.ourproject.kune.platf.server.auth.Authorizated;
-import org.ourproject.kune.platf.server.auth.AuthorizatedMethodInterceptor;
-import org.ourproject.kune.platf.server.auth.SessionService;
-import org.ourproject.kune.platf.server.auth.SessionServiceDefault;
-import org.ourproject.kune.platf.server.content.CommentManager;
-import org.ourproject.kune.platf.server.content.CommentManagerDefault;
-import org.ourproject.kune.platf.server.content.ContainerManager;
-import org.ourproject.kune.platf.server.content.ContainerManagerDefault;
-import org.ourproject.kune.platf.server.content.ContentManager;
-import org.ourproject.kune.platf.server.content.ContentManagerDefault;
-import org.ourproject.kune.platf.server.content.CreationService;
-import org.ourproject.kune.platf.server.content.CreationServiceDefault;
-import org.ourproject.kune.platf.server.i18n.I18nTranslationServiceDefault;
-import org.ourproject.kune.platf.server.manager.ExtMediaDescripManager;
-import org.ourproject.kune.platf.server.manager.FileManager;
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.manager.I18nCountryManager;
-import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
-import org.ourproject.kune.platf.server.manager.I18nTranslationManager;
-import org.ourproject.kune.platf.server.manager.LicenseManager;
-import org.ourproject.kune.platf.server.manager.RateManager;
-import org.ourproject.kune.platf.server.manager.SocialNetworkManager;
-import org.ourproject.kune.platf.server.manager.TagManager;
-import org.ourproject.kune.platf.server.manager.TagUserContentManager;
-import org.ourproject.kune.platf.server.manager.TagUserContentManagerDefault;
-import org.ourproject.kune.platf.server.manager.ToolConfigurationManager;
-import org.ourproject.kune.platf.server.manager.UserManager;
-import org.ourproject.kune.platf.server.manager.file.EntityLogoDownloadManager;
-import org.ourproject.kune.platf.server.manager.file.EntityLogoUploadManager;
-import org.ourproject.kune.platf.server.manager.file.FileDownloadManager;
-import org.ourproject.kune.platf.server.manager.file.FileManagerDefault;
-import org.ourproject.kune.platf.server.manager.file.FileUploadManager;
-import org.ourproject.kune.platf.server.manager.impl.ExtMediaDescripManagerDefault;
-import org.ourproject.kune.platf.server.manager.impl.GroupManagerDefault;
-import org.ourproject.kune.platf.server.manager.impl.I18nCountryManagerDefault;
-import org.ourproject.kune.platf.server.manager.impl.I18nLanguageManagerDefault;
-import org.ourproject.kune.platf.server.manager.impl.I18nTranslationManagerDefault;
-import org.ourproject.kune.platf.server.manager.impl.LicenseManagerDefault;
-import org.ourproject.kune.platf.server.manager.impl.RateManagerDefault;
-import org.ourproject.kune.platf.server.manager.impl.SocialNetworkManagerDefault;
-import org.ourproject.kune.platf.server.manager.impl.TagManagerDefault;
-import org.ourproject.kune.platf.server.manager.impl.ToolConfigurationManagerDefault;
-import org.ourproject.kune.platf.server.manager.impl.UserManagerDefault;
-import org.ourproject.kune.platf.server.mapper.DozerMapper;
-import org.ourproject.kune.platf.server.mapper.Mapper;
-import org.ourproject.kune.platf.server.properties.KuneProperties;
-import org.ourproject.kune.platf.server.properties.KunePropertiesDefault;
-import org.ourproject.kune.platf.server.rpc.ContentRPC;
-import org.ourproject.kune.platf.server.rpc.GroupRPC;
-import org.ourproject.kune.platf.server.rpc.I18nRPC;
-import org.ourproject.kune.platf.server.rpc.SiteRPC;
-import org.ourproject.kune.platf.server.rpc.SocialNetworkRPC;
-import org.ourproject.kune.platf.server.rpc.UserRPC;
-import org.ourproject.kune.platf.server.state.StateService;
-import org.ourproject.kune.platf.server.state.StateServiceDefault;
-import org.ourproject.kune.platf.server.tool.ServerToolRegistry;
-import org.ourproject.kune.platf.server.users.UserInfoService;
-import org.ourproject.kune.platf.server.users.UserInfoServiceDefault;
-
-import cc.kune.core.client.rpcservices.ContentService;
-import cc.kune.core.client.rpcservices.GroupService;
-import cc.kune.core.client.rpcservices.I18nService;
-import cc.kune.core.client.rpcservices.SiteService;
-import cc.kune.core.client.rpcservices.SocialNetworkService;
-import cc.kune.core.client.rpcservices.UserService;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.domain.Comment;
-import cc.kune.domain.SocialNetwork;
-
-import com.google.inject.matcher.Matchers;
-
-public class PlatformServerModule extends AbstractExtendedModule {
-    private void bindFinders() {
-        // http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/Injector.html
-        // (...) Just-in-time bindings created for child injectors will be
-        // created in an ancestor injector whenever possible (...)
-        // (This fails with finders, then we make explicit bindings)
-
-        bind(SocialNetwork.class);
-        bind(Comment.class);
-    }
-
-    private void bindManagers() {
-        bind(UserManager.class).to(UserManagerDefault.class);
-        bind(GroupManager.class).to(GroupManagerDefault.class);
-        bind(ContentManager.class).to(ContentManagerDefault.class);
-        bind(ToolConfigurationManager.class).to(ToolConfigurationManagerDefault.class);
-        bind(ContainerManager.class).to(ContainerManagerDefault.class);
-        bind(LicenseManager.class).to(LicenseManagerDefault.class);
-        bind(SocialNetworkManager.class).to(SocialNetworkManagerDefault.class);
-        bind(XmppManager.class).to(XmppManagerDefault.class);
-        bind(RateManager.class).to(RateManagerDefault.class);
-        bind(I18nCountryManager.class).to(I18nCountryManagerDefault.class);
-        bind(I18nLanguageManager.class).to(I18nLanguageManagerDefault.class);
-        bind(I18nTranslationManager.class).to(I18nTranslationManagerDefault.class);
-        bind(TagManager.class).to(TagManagerDefault.class);
-        bind(TagUserContentManager.class).to(TagUserContentManagerDefault.class);
-        bind(CommentManager.class).to(CommentManagerDefault.class);
-        bind(FileManager.class).to(FileManagerDefault.class);
-        bind(ExtMediaDescripManager.class).to(ExtMediaDescripManagerDefault.class);
-    }
-
-    private void bindRPC() {
-        bind(SiteService.class).to(SiteRPC.class);
-        bind(GroupService.class).to(GroupRPC.class);
-        bind(ContentService.class).to(ContentRPC.class);
-        bind(UserService.class).to(UserRPC.class);
-        bind(SocialNetworkService.class).to(SocialNetworkRPC.class);
-        bind(I18nService.class).to(I18nRPC.class);
-    }
-
-    private void bindServices() {
-        bind(UserInfoService.class).to(UserInfoServiceDefault.class);
-        bind(CreationService.class).to(CreationServiceDefault.class);
-        bind(AccessRightsService.class).to(AccessRightsServiceDefault.class);
-        bind(AccessService.class).to(AccessServiceDefault.class);
-        bind(FinderService.class).to(FinderServiceDefault.class);
-        bind(StateService.class).to(StateServiceDefault.class);
-        bind(I18nTranslationService.class).to(I18nTranslationServiceDefault.class);
-        bind(SessionService.class).to(SessionServiceDefault.class);
-    }
-
-    @Override
-    protected void configure() {
-        // install(PersistService.usingJpa().across(UnitOfWork.TRANSACTION).buildModule());
-        bind(KunePersistenceService.class);
-
-        bindFinders();
-        bindManagers();
-        bindRPC();
-        bindServices();
-        bind(KuneProperties.class).to(KunePropertiesDefault.class);
-        bind(Mapper.class).to(DozerMapper.class);
-        bind(ServerToolRegistry.class);
-        // bind(FileUploadManager.class).in(ServletScopes.REQUEST);
-        bind(FileUploadManager.class);
-        bind(FileDownloadManager.class);
-        bind(EntityLogoUploadManager.class);
-        bind(EntityLogoDownloadManager.class);
-
-        bindInterceptor(Matchers.any(), Matchers.annotatedWith(Authenticated.class),
-                outermostCall(new AuthenticatedMethodInterceptor()));
-        bindInterceptor(Matchers.any(), Matchers.annotatedWith(Authorizated.class),
-                outermostCall(new AuthorizatedMethodInterceptor()));
-    }
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/ServerException.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/ServerException.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/ServerException.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,50 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class ServerException extends RuntimeException {
-
-    private static final long serialVersionUID = 2028618233098694418L;
-
-    private static final Log LOG = LogFactory.getLog(ServerException.class);
-
-    public ServerException() {
-        super();
-    }
-
-    public ServerException(final String text) {
-        super(text);
-        LOG.error(text);
-    }
-
-    public ServerException(final String text, final Throwable cause) {
-        super(text, cause);
-        LOG.error(text, cause);
-    }
-
-    public ServerException(final Throwable cause) {
-        super(cause);
-        LOG.error("ServerManagerException", cause);
-    }
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/UserSession.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/UserSession.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/UserSession.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,74 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server;
-
-import org.ourproject.kune.platf.server.manager.UserManager;
-
-import cc.kune.domain.User;
-
-import com.google.inject.Inject;
-import com.google.inject.servlet.SessionScoped;
-
- at SessionScoped
-public class UserSession {
-    private String userHash;
-    private Long userId;
-    private final UserManager manager;
-
-    @Inject
-    public UserSession(final UserManager manager) {
-        this.manager = manager;
-    }
-
-    public String getHash() {
-        return userHash;
-    }
-
-    public User getUser() {
-        return manager.find(userId);
-    }
-
-    public boolean isUserLoggedIn() {
-        return userId != null;
-    }
-
-    public boolean isUserNotLoggedIn() {
-        return !isUserLoggedIn();
-    }
-
-    public void login(final User user, final String newUserHash) {
-        setUser(user);
-        setHash(newUserHash);
-    }
-
-    public void logout() {
-        userId = null;
-        userHash = null;
-    }
-
-    private void setHash(final String hash) {
-        this.userHash = hash;
-    }
-
-    private void setUser(final User user) {
-        userId = user.getId();
-    }
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/ExtMediaDescripManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/ExtMediaDescripManager.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/ExtMediaDescripManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,28 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import java.util.List;
-
-import cc.kune.domain.ExtMediaDescrip;
-
-public interface ExtMediaDescripManager extends Manager<ExtMediaDescrip, Long> {
-    List<ExtMediaDescrip> getAll();
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/FileManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/FileManager.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/FileManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,54 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.platf.server.manager;
-
-import java.io.File;
-import java.io.IOException;
-
-public interface FileManager {
-
-    /**
-     * Create a new file adding a numeric sequence if the file already exists
-     * 
-     * @param dir
-     *            the directory (use File.separator for dir delimiters)
-     * @param fileName
-     *            (the new file name)
-     * @return if 'file.txt' exists it creates 'file 1.txt' and if 'file 1.txt'
-     *         exists it creates 'file 2.txt' and so on
-     * @throws IOException
-     */
-    File createFileWithSequentialName(String dir, String fileName) throws IOException;
-
-    /**
-     * @param dir
-     *            the directory (use File.separator for dir delimiters)
-     * @return true if and only if the directory was created, along with all
-     *         necessary parent directories; false otherwise
-     */
-    boolean mkdir(String dir);
-
-    /**
-     * @param dir
-     *            the directory (use File.separator for dir delimiters)
-     */
-    boolean rmdir(String dir) throws IOException;
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/GroupManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/GroupManager.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/GroupManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,77 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import java.util.List;
-
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
-
-import cc.kune.core.client.errors.AccessViolationException;
-import cc.kune.core.client.errors.EmailAddressInUseException;
-import cc.kune.core.client.errors.GroupNameInUseException;
-import cc.kune.core.client.errors.UserMustBeLoggedException;
-import cc.kune.domain.Content;
-import cc.kune.domain.Group;
-import cc.kune.domain.User;
-
-public interface GroupManager extends Manager<Group, Long> {
-
-    void changeDefLicense(User user, Group group, String licenseShortName);
-
-    void changeWsTheme(User user, Group group, String theme) throws AccessViolationException;
-
-    void clearGroupBackImage(Group group);
-
-    Group createGroup(Group group, User user) throws GroupNameInUseException, UserMustBeLoggedException;
-
-    Group createUserGroup(User user) throws GroupNameInUseException, EmailAddressInUseException;
-
-    Group createUserGroup(User user, boolean wantPersonalHomepage) throws GroupNameInUseException,
-            EmailAddressInUseException;
-
-    List<Group> findAdminInGroups(Long groupId);
-
-    Group findByShortName(String groupName);
-
-    List<Group> findCollabInGroups(Long groupId);
-
-    List<String> findEnabledTools(Long id);
-
-    /**
-     * IMPORTANT: returns null if userId is null
-     * 
-     * @param userId
-     * @return
-     */
-    Group getGroupOfUserWithId(Long userId);
-
-    Group getSiteDefaultGroup();
-
-    SearchResult<Group> search(String search);
-
-    SearchResult<Group> search(String search, Integer firstResult, Integer maxResults);
-
-    void setDefaultContent(String groupShortName, Content content);
-
-    void setGroupBackImage(Group group, Content content);
-
-    void setToolEnabled(User userLogged, String groupShortName, String toolName, boolean enabled);
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/I18nCountryManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/I18nCountryManager.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/I18nCountryManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,32 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import java.util.List;
-
-import cc.kune.domain.I18nCountry;
-
-public interface I18nCountryManager extends Manager<I18nCountry, Long> {
-
-    List<I18nCountry> getAll();
-
-    I18nCountry findByCode(String country);
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/I18nLanguageManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/I18nLanguageManager.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/I18nLanguageManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,32 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import java.util.List;
-
-import cc.kune.domain.I18nLanguage;
-
-public interface I18nLanguageManager extends Manager<I18nLanguage, Long> {
-
-    I18nLanguage findByCode(String language);
-
-    List<I18nLanguage> getAll();
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/I18nTranslationManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/I18nTranslationManager.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/I18nTranslationManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,52 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import java.util.HashMap;
-import java.util.List;
-
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
-
-import cc.kune.core.client.errors.DefaultException;
-import cc.kune.domain.I18nTranslation;
-
-public interface I18nTranslationManager extends Manager<I18nTranslation, Long> {
-
-    HashMap<String, String> getLexicon(String language);
-
-    List<I18nTranslation> getTranslatedLexicon(String language);
-
-    SearchResult<I18nTranslation> getTranslatedLexicon(String language, Integer firstResult, Integer maxResults);
-
-    String getTranslation(String language, String text);
-
-    String getTranslation(String language, String text, Integer arg);
-
-    String getTranslation(String language, String text, String arg);
-
-    List<I18nTranslation> getUntranslatedLexicon(String language);
-
-    SearchResult<I18nTranslation> getUntranslatedLexicon(String language, Integer firstResult, Integer maxResults);
-
-    String setTranslation(String id, String translation) throws DefaultException;
-
-    void setTranslation(String language, String text, String translation);
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/LicenseManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/LicenseManager.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/LicenseManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,43 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import java.util.List;
-
-import cc.kune.domain.License;
-import cc.kune.domain.finders.LicenseFinder;
-
-public interface LicenseManager {
-
-    License findByShortName(String licenseDef);
-
-    List<License> getAll();
-
-    List<License> getCC();
-
-    License getDefLicense();
-
-    List<License> getNotCC();
-
-    License persist(final License license);
-
-    void setLicenseFinder(final LicenseFinder licenseFinder);
-
-}
\ No newline at end of file

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/Manager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/Manager.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/Manager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,48 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import org.apache.lucene.search.BooleanClause;
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
-
-public interface Manager<T, X> {
-
-    void clear();
-
-    T find(X id);
-
-    T merge(T entity);
-
-    T persist(T entity);
-
-    void reIndex();
-
-    void remove(T entity);
-
-    SearchResult<T> search(final String query, final String[] fields, final BooleanClause.Occur[] flags,
-            final Integer firstResult, final Integer maxResults);
-
-    SearchResult<T> search(final String[] queries, final String[] fields, final BooleanClause.Occur[] flags,
-            final Integer firstResult, final Integer maxResults);
-
-    SearchResult<T> search(final String[] queries, final String[] fields, final Integer firstResult,
-            final Integer maxResults);
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/RateManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/RateManager.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/RateManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,35 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-
-import cc.kune.domain.Content;
-import cc.kune.domain.Rate;
-import cc.kune.domain.User;
-
-public interface RateManager extends Manager<Rate, Long> {
-
-    Rate find(User user, Content content);
-
-    Double getRateAvg(Content content);
-
-    Long getRateByUsers(Content content);
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/SocialNetworkManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/SocialNetworkManager.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/SocialNetworkManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,61 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-
-
-import cc.kune.core.client.errors.AccessViolationException;
-import cc.kune.core.client.errors.DefaultException;
-import cc.kune.core.shared.dto.SocialNetworkRequestResult;
-import cc.kune.domain.Group;
-import cc.kune.domain.SocialNetwork;
-import cc.kune.domain.User;
-import cc.kune.domain.utils.ParticipationData;
-import cc.kune.domain.utils.SocialNetworkData;
-
-public interface SocialNetworkManager extends Manager<SocialNetwork, Long> {
-
-    void acceptJoinGroup(User userLogged, Group group, Group inGroup) throws DefaultException;
-
-    void addGroupToAdmins(User userLogged, Group group, Group inGroup) throws DefaultException;
-
-    void addGroupToCollabs(User userLogged, Group group, Group inGroup) throws DefaultException;
-
-    void addGroupToViewers(User userLogged, Group group, Group inGroup) throws DefaultException;
-
-    void deleteMember(User userLogged, Group group, Group inGroup) throws DefaultException, AccessViolationException;
-
-    void denyJoinGroup(User userLogged, Group group, Group inGroup) throws DefaultException;
-
-    ParticipationData findParticipation(User user, Group group) throws DefaultException;
-
-    SocialNetwork get(User userLogged, Group group) throws DefaultException;
-
-    SocialNetworkData getSocialNetworkData(User userLogged, Group group);
-
-    SocialNetworkRequestResult requestToJoin(User user, Group inGroup) throws DefaultException;
-
-    void setAdminAsCollab(User userLogged, Group group, Group inGroup) throws DefaultException;
-
-    void setCollabAsAdmin(User userLogged, Group group, Group inGroup) throws DefaultException;
-
-    void unJoinGroup(Group groupToUnJoin, Group inGroup) throws DefaultException;
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagManager.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,28 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import cc.kune.domain.Tag;
-
-public interface TagManager extends Manager<Tag, Long> {
-
-    Tag findByTagName(String tag);
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManager.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,38 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import cc.kune.core.shared.domain.TagCloudResult;
-import cc.kune.domain.Content;
-import cc.kune.domain.Group;
-import cc.kune.domain.TagUserContent;
-import cc.kune.domain.User;
-
-public interface TagUserContentManager extends Manager<TagUserContent, Long> {
-
-    TagCloudResult getTagCloudResultByGroup(Group group);
-
-    String getTagsAsString(User user, Content content);
-
-    void remove(User user, Content content);
-
-    void setTags(User user, Content content, String tags);
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,127 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.NoResultException;
-
-import org.ourproject.kune.platf.server.manager.impl.DefaultManager;
-
-import cc.kune.common.client.utils.TextUtils;
-import cc.kune.core.shared.domain.TagCloudResult;
-import cc.kune.core.shared.domain.TagCount;
-import cc.kune.domain.Content;
-import cc.kune.domain.Group;
-import cc.kune.domain.Tag;
-import cc.kune.domain.TagUserContent;
-import cc.kune.domain.User;
-import cc.kune.domain.finders.TagUserContentFinder;
-
-import com.google.inject.Inject;
-import com.google.inject.Provider;
-import com.google.inject.Singleton;
-
- at Singleton
-public class TagUserContentManagerDefault extends DefaultManager<TagUserContent, Long> implements TagUserContentManager {
-    private final TagUserContentFinder finder;
-    private final Provider<EntityManager> provider;
-    private final TagManager tagManager;
-
-    @Inject
-    public TagUserContentManagerDefault(final Provider<EntityManager> provider, final TagManager tagManager,
-            final TagUserContentFinder finder) {
-        super(provider, TagUserContent.class);
-        this.provider = provider;
-        this.tagManager = tagManager;
-        this.finder = finder;
-    }
-
-    List<Tag> find(final User user, final Content content) {
-        return finder.findTags(user, content);
-    }
-
-    private int getMaxCount(final Group group) {
-        return finder.getMaxGrouped(group).intValue();
-    }
-
-    private int getMinCount(final Group group) {
-        return finder.getMinGrouped(group).intValue();
-    }
-
-    private List<TagCount> getSummaryByGroup(final Group group) {
-        return finder.getTagsGroups(group);
-    }
-
-    @Override
-    public TagCloudResult getTagCloudResultByGroup(final Group group) {
-        try {
-            return new TagCloudResult(getSummaryByGroup(group), getMaxCount(group), getMinCount(group));
-        } catch (final NoResultException e) {
-            return new TagCloudResult();
-        }
-    }
-
-    @Override
-    public String getTagsAsString(final User user, final Content content) {
-        final StringBuffer tagConcatenated = new StringBuffer();
-        if (user.getId() != null) {
-            // FIXME: User must be persisted (this fails on tests)
-            final List<Tag> tags = find(user, content);
-            for (final Tag tag : tags) {
-                tagConcatenated.append(" ").append(tag.getName());
-            }
-        }
-        return tagConcatenated.toString().replaceFirst(" ", "");
-    }
-
-    @Override
-    public void remove(final User user, final Content content) {
-        for (final TagUserContent item : finder.find(user, content)) {
-            provider.get().remove(item);
-        }
-    }
-
-    @Override
-    public void setTags(final User user, final Content content, final String tags) {
-        final ArrayList<String> tagsStripped = TextUtils.splitTags(tags);
-        final ArrayList<Tag> tagList = new ArrayList<Tag>();
-
-        for (final String tagString : tagsStripped) {
-            Tag tag;
-            try {
-                tag = tagManager.findByTagName(tagString);
-            } catch (final NoResultException e) {
-                tag = new Tag(tagString);
-                tagManager.persist(tag);
-            }
-            if (!tagList.contains(tag)) {
-                tagList.add(tag);
-            }
-        }
-        remove(user, content);
-        for (final Tag tag : tagList) {
-            final TagUserContent tagUserContent = new TagUserContent(tag, user, content);
-            persist(tagUserContent);
-        }
-    }
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/ToolConfigurationManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/ToolConfigurationManager.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/ToolConfigurationManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,26 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import cc.kune.domain.ToolConfiguration;
-
-public interface ToolConfigurationManager extends Manager<ToolConfiguration, Long> {
-    ToolConfiguration persist(ToolConfiguration config);
-}

Deleted: trunk/src/main/java/org/ourproject/kune/platf/server/manager/UserManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/UserManager.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/UserManager.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,69 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
-import org.waveprotocol.box.server.authentication.PasswordDigest;
-
-import cc.kune.core.client.errors.I18nNotFoundException;
-import cc.kune.domain.User;
-import cc.kune.domain.utils.UserBuddiesData;
-
-public interface UserManager {
-    /**
-     * CreateUser new method with language country and timezone params
-     * 
-     * @param shortName
-     * @param longName
-     * @param email
-     * @param passwd
-     * @param timezone
-     * @param country
-     * @param language
-     * @param timezone
-     * @return User
-     * @throws I18nNotFoundException
-     */
-    User createUser(String shortName, String longName, String email, String passwd, String language, String country,
-            String timezone) throws I18nNotFoundException;
-
-    void createWaveAccount(String shortName, PasswordDigest passwdDigest);
-
-    /**
-     * IMPORTANT: if userId == null, it returns User.UNKNOWN_USER
-     * 
-     * @param userId
-     * @return
-     */
-    User find(Long userId);
-
-    User findByShortname(String shortName);
-
-    UserBuddiesData getUserBuddies(String shortName);
-
-    User login(String nickOrEmail, String passwd);
-
-    void reIndex();
-
-    SearchResult<User> search(String search);
-
-    SearchResult<User> search(String search, Integer firstResult, Integer maxResults);
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/rack/ContainerListener.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/ContainerListener.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/rack/ContainerListener.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,26 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.rack;
-
-public interface ContainerListener {
-    void start();
-
-    void stop();
-}

Deleted: trunk/src/main/java/org/ourproject/kune/rack/Rack.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/Rack.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/rack/Rack.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,98 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-/*
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.rack;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.ourproject.kune.rack.dock.Dock;
-import org.ourproject.kune.rack.dock.RequestMatcher;
-
-import com.google.inject.Module;
-
-public class Rack {
-    public static final Log LOG = LogFactory.getLog(Rack.class);
-    private final ArrayList<Dock> docks;
-    private final ArrayList<Module> modules;
-    private final ArrayList<RequestMatcher> excludes;
-    private final ArrayList<Class<? extends ContainerListener>> listeners;
-
-    public Rack() {
-        this.docks = new ArrayList<Dock>();
-        this.modules = new ArrayList<Module>();
-        this.excludes = new ArrayList<RequestMatcher>();
-        this.listeners = new ArrayList<Class<? extends ContainerListener>>();
-    }
-
-    public void add(final Class<? extends ContainerListener> listenerType) {
-        listeners.add(listenerType);
-
-    }
-
-    public void add(final Dock dock) {
-        LOG.debug("INSTALLING: " + dock.toString());
-        docks.add(dock);
-    }
-
-    public void add(final Module module) {
-        modules.add(module);
-    }
-
-    public void addExclusion(RequestMatcher matcher) {
-        excludes.add(matcher);
-    }
-
-    public List<Dock> getDocks() {
-        return docks;
-    }
-
-    public List<RequestMatcher> getExcludes() {
-        return excludes;
-    }
-
-    public List<Module> getGuiceModules() {
-        return modules;
-    }
-
-    public List<Class<? extends ContainerListener>> getListeners() {
-        return listeners;
-    }
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/rack/RackBuilder.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/RackBuilder.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/rack/RackBuilder.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,120 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.rack;
-
-import javax.servlet.Filter;
-import javax.servlet.http.HttpServlet;
-
-import org.ourproject.kune.rack.dock.RegexDock;
-import org.ourproject.kune.rack.dock.RegexMatcher;
-import org.ourproject.kune.rack.filters.gwts.GWTServiceFilter;
-import org.ourproject.kune.rack.filters.rest.RESTServiceFilter;
-import org.ourproject.kune.rack.filters.servlet.ServletServiceFilter;
-
-import com.google.gwt.user.client.rpc.RemoteService;
-import com.google.inject.Module;
-
-public class RackBuilder {
-
-    public static class RackDockBuilder {
-        private final String regex;
-        private final Rack rack;
-
-        public RackDockBuilder(final Rack rack, final String regex) {
-            this.rack = rack;
-            this.regex = regex;
-        }
-
-        public RackDockBuilder install(final Filter... filters) {
-            for (final Filter filter : filters) {
-                final RegexDock dock = new RegexDock(regex);
-                dock.setFilter(filter);
-                rack.add(dock);
-            }
-            return this;
-        }
-
-    }
-
-    private final Rack rack;
-
-    public RackBuilder() {
-        this.rack = new Rack();
-    }
-
-    public RackBuilder add(final Class<? extends ContainerListener> listener) {
-        rack.add(listener);
-        return this;
-    }
-
-    public RackDockBuilder at(final String regex) {
-        return new RackDockBuilder(rack, regex);
-    }
-
-    public RackBuilder exclude(final String... excludes) {
-        for (final String exclude : excludes) {
-            rack.addExclusion(new RegexMatcher(exclude));
-        }
-        return this;
-    }
-
-    public Rack getRack() {
-        return rack;
-    }
-
-    public RackBuilder installGWTServices(final String root, final Class<? extends RemoteService>... serviceClasses) {
-
-        for (final Class<? extends RemoteService> serviceClass : serviceClasses) {
-            final String simpleName = serviceClass.getSimpleName();
-            final RegexDock dock = new RegexDock(root + simpleName + "$");
-            dock.setFilter(new GWTServiceFilter(serviceClass));
-            rack.add(dock);
-        }
-
-        return this;
-    }
-
-    public void installRESTServices(final String root, final Class<?>... serviceClasses) {
-        for (final Class<?> serviceClass : serviceClasses) {
-            final String simpleName = serviceClass.getSimpleName();
-            final String pattern = root + simpleName + "/(.*)$";
-            final RegexDock dock = new RegexDock(pattern);
-            dock.setFilter(new RESTServiceFilter(pattern, serviceClass));
-            rack.add(dock);
-        }
-    }
-
-    public void installServlet(final String root, final Class<? extends HttpServlet>... servletClasses) {
-        for (final Class<? extends HttpServlet> servletClass : servletClasses) {
-            final String simpleName = servletClass.getSimpleName();
-            final RegexDock dock = new RegexDock(root + simpleName + "$");
-            dock.setFilter(new ServletServiceFilter(servletClass));
-            rack.add(dock);
-        }
-
-    }
-
-    public RackBuilder use(final Module... list) {
-        for (final Module m : list) {
-            rack.add(m);
-        }
-        return this;
-    }
-}

Deleted: trunk/src/main/java/org/ourproject/kune/rack/RackHelper.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/RackHelper.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/rack/RackHelper.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,57 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.rack;
-
-import javax.servlet.ServletRequest;
-import javax.servlet.http.HttpServletRequest;
-
-public final class RackHelper {
-    public static String buildForwardString(final ServletRequest request, final String forward) {
-        String parameters = RackHelper.extractParameters(request);
-        return new StringBuilder(forward).append(parameters).toString();
-    }
-
-    public static String extractParameters(final ServletRequest request) {
-        HttpServletRequest httpServletRequest = (HttpServletRequest) request;
-        String uri = httpServletRequest.getRequestURI();
-        int index = uri.indexOf('?');
-        if (index > 0) {
-            return uri.substring(index);
-        } else {
-            return "";
-        }
-    }
-
-    public static String getRelativeURL(final ServletRequest request) {
-        HttpServletRequest req = (HttpServletRequest) request;
-        String contextPath = req.getContextPath();
-        String uri = req.getRequestURI();
-        return uri.substring(contextPath.length());
-    }
-
-    public static String getURI(final ServletRequest request) {
-        HttpServletRequest httpServletRequest = (HttpServletRequest) request;
-        return httpServletRequest.getRequestURI();
-    }
-
-    private RackHelper() {
-    }
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/rack/RackModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/RackModule.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/rack/RackModule.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,25 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.rack;
-
-public interface RackModule {
-    void configure(RackBuilder builder);
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/rack/RackServletFilter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/RackServletFilter.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/rack/RackServletFilter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,176 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.rack;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.ourproject.kune.platf.server.ServerException;
-import org.ourproject.kune.rack.dock.Dock;
-import org.ourproject.kune.rack.dock.RequestMatcher;
-import org.waveprotocol.box.server.rpc.ServerRpcProvider;
-
-import com.google.inject.Injector;
-
-public class RackServletFilter implements Filter {
-    public static class DockChain implements FilterChain {
-        private final Iterator<Dock> iterator;
-
-        public DockChain(final Iterator<Dock> iterator) {
-            this.iterator = iterator;
-        }
-
-        @Override
-        public void doFilter(final ServletRequest request, final ServletResponse response) throws IOException,
-                ServletException {
-            Dock dock = null;
-            boolean matched = false;
-
-            final String relative = RackHelper.getRelativeURL(request);
-            while (!matched && iterator.hasNext()) {
-                dock = iterator.next();
-                matched = dock.matches(relative);
-            }
-            if (matched) {
-                execute(dock.getFilter(), request, response);
-            }
-        }
-
-        private void execute(final Filter filter, final ServletRequest request, final ServletResponse response)
-                throws IOException, ServletException {
-            // log.debug("RACK FILTER: " + filter.getClass().getSimpleName());
-            filter.doFilter(request, response, this);
-        }
-    }
-
-    public static final String INJECTOR_ATTRIBUTE = Injector.class.getName() + "Child";
-    public static final String INJECTOR_PARENT_ATTRIBUTE = ServerRpcProvider.INJECTOR_ATTRIBUTE;
-    private static final Log LOG = LogFactory.getLog(RackServletFilter.class);
-    private static final String MODULE_PARAMETER = RackModule.class.getName();
-    private List<Dock> docks;
-
-    private List<RequestMatcher> excludes;
-
-    @Override
-    public void destroy() {
-        for (final Dock dock : docks) {
-            dock.getFilter().destroy();
-        }
-    }
-
-    @Override
-    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
-            throws IOException, ServletException {
-
-        final String relative = RackHelper.getRelativeURL(request);
-        for (final RequestMatcher matcher : excludes) {
-            if (matcher.matches(relative)) {
-                LOG.info("Excluded (from Guice): " + relative);
-                chain.doFilter(request, response);
-                return;
-            }
-        }
-        LOG.debug("REQUEST: " + relative);
-        final FilterChain newChain = new DockChain(docks.iterator());
-        newChain.doFilter(request, response);
-    }
-
-    private RackModule getModule(final FilterConfig filterConfig) {
-        final String moduleName = getModuleName(filterConfig);
-        try {
-            final Class<?> clazz = Class.forName(moduleName);
-            final RackModule module = (RackModule) clazz.newInstance();
-            return module;
-        } catch (final Exception e) {
-            throw new ServerException("couldn't instantiate the rack module", e);
-        }
-    }
-
-    private String getModuleName(final FilterConfig filterConfig) {
-        final String moduleName = filterConfig.getInitParameter(MODULE_PARAMETER);
-        if (moduleName == null) {
-            throw new ServerException("Rack module name can't be null!");
-        }
-        return moduleName;
-    }
-
-    @Override
-    public void init(final FilterConfig filterConfig) throws ServletException {
-        LOG.debug("INITIALIZING RackServletFilter...");
-        final RackModule module = getModule(filterConfig);
-        final RackBuilder builder = new RackBuilder();
-        module.configure(builder);
-        final Rack rack = builder.getRack();
-        // final WaveStarter waveStarter = new WaveStarter();
-        // final Injector waveChildInjector = waveStarter.runMain();
-        final Injector waveChildInjector = (Injector) filterConfig.getServletContext().getAttribute(
-                INJECTOR_PARENT_ATTRIBUTE);
-        final Injector kuneChildInjector = installInjector(filterConfig, rack, waveChildInjector);
-        startContainerListeners(rack.getListeners(), kuneChildInjector);
-        docks = rack.getDocks();
-        excludes = rack.getExcludes();
-        initFilters(filterConfig);
-        LOG.debug("INITIALIZATION DONE!");
-    }
-
-    private void initFilters(final FilterConfig filterConfig) throws ServletException {
-        for (final Dock dock : docks) {
-            dock.getFilter().init(filterConfig);
-        }
-    }
-
-    private Injector installInjector(final FilterConfig filterConfig, final Rack rack, final Injector waveChildInjector) {
-        // final Injector injector = Guice.createInjector();
-        final Injector childInjector = waveChildInjector.createChildInjector(rack.getGuiceModules());
-        filterConfig.getServletContext().setAttribute(INJECTOR_ATTRIBUTE, childInjector);
-        return childInjector;
-    }
-
-    private void startContainerListeners(final List<Class<? extends ContainerListener>> listenerClasses,
-            final Injector injector) {
-        LOG.debug("STARTING CONTAINER LISTENERS...");
-        for (final Class<? extends ContainerListener> listenerClass : listenerClasses) {
-            final ContainerListener listener = injector.getInstance(listenerClass);
-            listener.start();
-        }
-    }
-
-    // FIXME: Dani, never used this:
-    @SuppressWarnings("unused")
-    private void stopContainerListeners(final List<Class<? extends ContainerListener>> listenerClasses,
-            final Injector injector) {
-        LOG.debug("STOPING CONTAINER LISTENERS...");
-        for (final Class<? extends ContainerListener> listenerClass : listenerClasses) {
-            final ContainerListener listener = injector.getInstance(listenerClass);
-            listener.stop();
-        }
-    }
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/rack/filters/AbstractInjectedFilter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/AbstractInjectedFilter.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/rack/filters/AbstractInjectedFilter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,52 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.rack.filters;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-
-import org.ourproject.kune.rack.RackServletFilter;
-
-import com.google.inject.Injector;
-
-public abstract class AbstractInjectedFilter implements Filter {
-
-    protected ServletContext ctx;
-
-    @Override
-    public abstract void destroy();
-
-    public <T> T getInstance(final Class<T> type) {
-        return getInjector().getInstance(type);
-    }
-
-    @Override
-    public void init(final FilterConfig filterConfig) throws ServletException {
-        this.ctx = filterConfig.getServletContext();
-        getInjector().injectMembers(this);
-    }
-
-    private Injector getInjector() {
-        return (Injector) ctx.getAttribute(RackServletFilter.INJECTOR_ATTRIBUTE);
-    }
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/rack/filters/ApplicationListener.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/ApplicationListener.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/rack/filters/ApplicationListener.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,29 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.rack.filters;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-public interface ApplicationListener {
-    void doBefore(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse);
-
-    void doAfter(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse);
-}

Deleted: trunk/src/main/java/org/ourproject/kune/rack/filters/ForwardFilter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/ForwardFilter.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/rack/filters/ForwardFilter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,81 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.rack.filters;
-
-import java.io.IOException;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-
-import org.ourproject.kune.rack.RackHelper;
-
-public class ForwardFilter extends AbstractInjectedFilter {
-    // private static final Log log = LogFactory.getLog(ForwardFilter.class);
-
-    private final String forward;
-    private final Pattern pattern;
-
-    public ForwardFilter(final String forward) {
-        this(".*", forward);
-    }
-
-    public ForwardFilter(final String pattern, final String forward) {
-        this.forward = forward;
-        this.pattern = Pattern.compile(pattern);
-    }
-
-    @Override
-    public void destroy() {
-    }
-
-    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
-            throws IOException, ServletException {
-
-        String relativeURL = RackHelper.getRelativeURL(request);
-        Matcher matcher = pattern.matcher(relativeURL);
-        matcher.matches();
-
-        int groupCount = matcher.groupCount();
-        // log.debug("GROUP COUNT: " + groupCount);
-        String replaced = forward;
-        for (int index = 0; index < groupCount; index++) {
-            String tag = "{" + index + "}";
-            String group = matcher.group(index + 1);
-            // log.debug("REPLACING " + tag + " WITH + " + group);
-            replaced = replaced.replace(tag, group);
-        }
-
-        String forwardString = RackHelper.buildForwardString(request, replaced);
-        forward(request, response, forwardString);
-    }
-
-    private void forward(final ServletRequest request, final ServletResponse response, final String forwardString)
-            throws ServletException, IOException {
-        // log.debug("FORWADING TO: " + forwardString);
-        HttpServletRequest httpRequest = (HttpServletRequest) request;
-        httpRequest.getRequestDispatcher(forwardString).forward(request, response);
-    }
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/rack/filters/ListenerFilter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/ListenerFilter.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/rack/filters/ListenerFilter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,50 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.rack.filters;
-
-import java.io.IOException;
-
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-public class ListenerFilter extends AbstractInjectedFilter {
-    private final Class<? extends ApplicationListener> listenerClass;
-
-    public ListenerFilter(final Class<? extends ApplicationListener> listenerClass) {
-        this.listenerClass = listenerClass;
-    }
-
-    @Override
-    public void destroy() {
-    }
-
-    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
-            throws IOException, ServletException {
-        ApplicationListener listener = super.getInstance(listenerClass);
-        listener.doBefore((HttpServletRequest) request, (HttpServletResponse) response);
-        chain.doFilter(request, response);
-        listener.doAfter((HttpServletRequest) request, (HttpServletResponse) response);
-    }
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/rack/filters/LogFilter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/LogFilter.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/rack/filters/LogFilter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,53 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.rack.filters;
-
-import java.io.IOException;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.ourproject.kune.rack.RackHelper;
-
-public class LogFilter implements Filter {
-    public static final Log LOG = LogFactory.getLog(LogFilter.class);
-
-    public void destroy() {
-    }
-
-    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)
-            throws IOException, ServletException {
-        // final long start = System.currentTimeMillis();
-        LOG.debug("REQUEST: " + RackHelper.getURI(request));
-        chain.doFilter(request, response);
-        // final long finish = System.currentTimeMillis();
-        // log.debug("TOTAL TIME: " + (finish - start) + " miliseconds");
-    }
-
-    public void init(final FilterConfig filterConfig) throws ServletException {
-    }
-
-}

Deleted: trunk/src/main/java/org/ourproject/kune/rack/filters/RedirectFilter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/filters/RedirectFilter.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/rack/filters/RedirectFilter.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,52 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.rack.filters;
-
-import java.io.IOException;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletResponse;
-
-public class RedirectFilter implements Filter {
-    private final String redirect;
-
-    public RedirectFilter(String redirect) {
-        this.redirect = redirect;
-    }
-
-    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
-            ServletException {
-
-        HttpServletResponse httpResponse = (HttpServletResponse) response;
-        httpResponse.sendRedirect(redirect);
-    }
-
-    public void init(FilterConfig filterConfig) throws ServletException {
-    }
-
-    public void destroy() {
-    }
-
-}

Modified: trunk/src/main/java/org/ourproject/kune/wiki/server/WikiServerTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/server/WikiServerTool.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/wiki/server/WikiServerTool.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -21,15 +21,15 @@
 
 import java.util.Date;
 
-import org.ourproject.kune.platf.server.content.ContainerManager;
-import org.ourproject.kune.platf.server.content.ContentManager;
-import org.ourproject.kune.platf.server.manager.ToolConfigurationManager;
-import org.ourproject.kune.platf.server.tool.ServerTool;
-import org.ourproject.kune.platf.server.tool.ServerToolRegistry;
-import org.ourproject.kune.platf.server.tool.ServerToolTarget;
 
 import cc.kune.core.client.errors.ContainerNotPermittedException;
 import cc.kune.core.client.errors.ContentNotPermittedException;
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.manager.ToolConfigurationManager;
+import cc.kune.core.server.tool.ServerTool;
+import cc.kune.core.server.tool.ServerToolRegistry;
+import cc.kune.core.server.tool.ServerToolTarget;
 import cc.kune.core.shared.domain.ContentStatus;
 import cc.kune.core.shared.domain.GroupListMode;
 import cc.kune.core.shared.i18n.I18nTranslationService;

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalimg/InsertImageLocalPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalimg/InsertImageLocalPanel.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalimg/InsertImageLocalPanel.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -19,12 +19,12 @@
  */
 package org.ourproject.kune.workspace.client.editor.insertlocalimg;
 
-import org.ourproject.kune.platf.client.services.SearcherConstants;
 import org.ourproject.kune.platf.client.ui.rte.insertimg.abstractimg.InsertImageAbstractPanel;
 import org.ourproject.kune.workspace.client.search.AbstractLiveSearcherField;
 
 import cc.kune.core.client.services.FileDownloadUtils;
 import cc.kune.core.client.state.Session;
+import cc.kune.core.shared.SearcherConstants;
 import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.core.shared.dto.BasicMimeTypeDTO;
 import cc.kune.core.shared.dto.LinkDTO;

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocallink/InsertLinkLocalPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocallink/InsertLinkLocalPanel.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocallink/InsertLinkLocalPanel.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -19,12 +19,12 @@
  */
 package org.ourproject.kune.workspace.client.editor.insertlocallink;
 
-import org.ourproject.kune.platf.client.services.SearcherConstants;
 import org.ourproject.kune.platf.client.ui.rte.insertlink.abstractlink.InsertLinkAbstractPanel;
 import org.ourproject.kune.workspace.client.search.AbstractLiveSearcherField;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
 
 import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.shared.SearcherConstants;
 import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.core.shared.dto.LinkDTO;
 import cc.kune.core.shared.dto.StateTokenUtils;

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalmedia/InsertMediaLocalPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalmedia/InsertMediaLocalPanel.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalmedia/InsertMediaLocalPanel.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -19,11 +19,11 @@
  */
 package org.ourproject.kune.workspace.client.editor.insertlocalmedia;
 
-import org.ourproject.kune.platf.client.services.SearcherConstants;
 import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.InsertMediaAbstractPanel;
 import org.ourproject.kune.workspace.client.search.AbstractLiveSearcherField;
 
 import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.shared.SearcherConstants;
 import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.core.shared.dto.BasicMimeTypeDTO;
 import cc.kune.core.shared.dto.LinkDTO;

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPanel.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPanel.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -20,7 +20,6 @@
 package org.ourproject.kune.workspace.client.i18n;
 
 import org.ourproject.kune.platf.client.services.Images;
-import org.ourproject.kune.platf.client.services.SearcherConstants;
 import org.ourproject.kune.platf.client.ui.AbstractSearcherPanel;
 import org.ourproject.kune.platf.client.ui.dialogs.BasicDialog;
 import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
@@ -28,6 +27,7 @@
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
 
 import cc.kune.common.client.utils.TextUtils;
+import cc.kune.core.shared.SearcherConstants;
 import cc.kune.core.shared.dto.I18nLanguageDTO;
 import cc.kune.core.shared.i18n.I18nTranslationService;
 

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/AbstractLiveSearcherField.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/AbstractLiveSearcherField.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/AbstractLiveSearcherField.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -19,8 +19,8 @@
  */
 package org.ourproject.kune.workspace.client.search;
 
-import org.ourproject.kune.platf.client.services.SearcherConstants;
 
+import cc.kune.core.shared.SearcherConstants;
 import cc.kune.core.shared.dto.LinkDTO;
 import cc.kune.core.shared.i18n.I18nTranslationService;
 

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPanel.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPanel.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -19,10 +19,10 @@
  */
 package org.ourproject.kune.workspace.client.search;
 
-import org.ourproject.kune.platf.client.services.SearcherConstants;
 import org.ourproject.kune.platf.client.ui.dialogs.BasicDialog;
 
 import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.shared.SearcherConstants;
 import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.core.shared.dto.LinkDTO;
 import cc.kune.core.shared.i18n.I18nTranslationService;

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPanel.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPanel.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -19,12 +19,12 @@
  */
 package org.ourproject.kune.workspace.client.search;
 
-import org.ourproject.kune.platf.client.services.SearcherConstants;
 import org.ourproject.kune.platf.client.ui.AbstractSearcherPanel;
 import org.ourproject.kune.platf.client.ui.dialogs.BasicDialog;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
 
 import cc.kune.common.client.errors.UIException;
+import cc.kune.core.shared.SearcherConstants;
 import cc.kune.core.shared.i18n.I18nTranslationService;
 
 import com.allen_sauer.gwt.log.client.Log;

Modified: trunk/src/main/resources/dozerBeanMapping.xml
===================================================================
--- trunk/src/main/resources/dozerBeanMapping.xml	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/resources/dozerBeanMapping.xml	2011-03-25 20:21:30 UTC (rev 1294)
@@ -9,7 +9,7 @@
   </configuration>
   <mapping>
     <class-a> cc.kune.core.shared.dto.InitDataDTO </class-a>
-    <class-b>org.ourproject.kune.platf.server.InitData</class-b>
+    <class-b>cc.kune.core.server.InitData</class-b>
     <field>
       <a>licenses</a>
       <b>licenses</b>
@@ -47,7 +47,7 @@
       <b-hint> cc.kune.domain.Group </b-hint>
     </field>
     <field
-      custom-converter="org.ourproject.kune.platf.server.mapper.GroupListModeConverter">
+      custom-converter="cc.kune.core.server.mapper.GroupListModeConverter">
       <a>mode</a>
       <b>mode</b>
     </field>
@@ -76,7 +76,7 @@
   </mapping>
   <mapping>
     <class-a>cc.kune.core.shared.dto.StateContentDTO</class-a>
-    <class-b>org.ourproject.kune.platf.server.state.StateContent</class-b>
+    <class-b>cc.kune.core.server.state.StateContent</class-b>
     <field>
       <a>authors</a>
       <b>authors</b>
@@ -86,11 +86,11 @@
   </mapping>
   <mapping>
     <class-a>cc.kune.core.shared.dto.StateContainerDTO</class-a>
-    <class-b>org.ourproject.kune.platf.server.state.StateContainer</class-b>
+    <class-b>cc.kune.core.server.state.StateContainer</class-b>
   </mapping>
   <mapping>
     <class-a>cc.kune.core.shared.dto.StateAbstractDTO</class-a>
-    <class-b>org.ourproject.kune.platf.server.state.StateAbstract</class-b>
+    <class-b>cc.kune.core.server.state.StateAbstract</class-b>
   </mapping>
 <!--  <mapping>-->
 <!--    <class-a> cc.kune.core.shared.dto.StateToken </class-a>-->
@@ -172,7 +172,7 @@
   </mapping>
   <mapping>
     <class-a> cc.kune.core.shared.dto.UserInfoDTO </class-a>
-    <class-b> org.ourproject.kune.platf.server.users.UserInfo </class-b>
+    <class-b> cc.kune.core.server.users.UserInfo </class-b>
     <field>
       <a>user</a>
       <b>user</b>
@@ -250,7 +250,7 @@
   </mapping>
   <mapping>
     <class-a> cc.kune.core.shared.dto.ToolSimpleDTO </class-a>
-    <class-b> org.ourproject.kune.platf.server.tool.ToolSimple </class-b>
+    <class-b> cc.kune.core.server.tool.ToolSimple </class-b>
   </mapping>
   <mapping>
     <class-a> cc.kune.core.shared.dto.UserBuddiesDataDTO </class-a>

Modified: trunk/src/main/resources/log4j.dev.properties
===================================================================
--- trunk/src/main/resources/log4j.dev.properties	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/resources/log4j.dev.properties	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,5 +1,7 @@
 log4j.rootLogger=ERROR, stdout
 log4j.logger.org.ourproject=DEBUG
+log4j.logger.cc.kune=DEBUG;
+log4j.logger.org.waveprotocol=INFO;
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 #log4j.appender.stdout.layout=org.apache.log4j.TTCCLayout
 #log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout

Modified: trunk/src/main/resources/log4j.properties
===================================================================
--- trunk/src/main/resources/log4j.properties	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/resources/log4j.properties	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,5 +1,7 @@
 log4j.rootLogger=error, stdout
 log4j.logger.org.ourproject=DEBUG;
+log4j.logger.cc.kune=DEBUG;
+log4j.logger.org.waveprotocol=INFO;
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 

Modified: trunk/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/src/main/webapp/WEB-INF/web.xml	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/main/webapp/WEB-INF/web.xml	2011-03-25 20:21:30 UTC (rev 1294)
@@ -141,12 +141,10 @@
   <!-- Kune normal guice configuration ======================================================================== -->
   <filter>
     <filter-name>rack</filter-name>
-    <filter-class>org.ourproject.kune.rack.RackServletFilter</filter-class>
+    <filter-class>cc.kune.core.server.rack.RackServletFilter</filter-class>
     <init-param>
-      <param-name>org.ourproject.kune.rack.RackModule</param-name>
-      <param-value>
-        org.ourproject.kune.app.server.KuneRackModule
-      </param-value>
+      <param-name>cc.kune.core.server.rack.RackModule</param-name>
+      <param-value>cc.kune.core.server.KuneRackModule</param-value>
     </init-param>
   </filter>
   <filter-mapping>

Copied: trunk/src/test/java/cc/kune/core/server/PersistencePreLoadedDataTest.java (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/PersistencePreLoadedDataTest.java)
===================================================================
--- trunk/src/test/java/cc/kune/core/server/PersistencePreLoadedDataTest.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/core/server/PersistencePreLoadedDataTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,122 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.TimeZone;
+
+import org.junit.After;
+import org.junit.Before;
+import org.ourproject.kune.docs.server.DocumentServerTool;
+
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.manager.I18nCountryManager;
+import cc.kune.core.server.manager.I18nLanguageManager;
+import cc.kune.core.server.manager.LicenseManager;
+import cc.kune.core.server.manager.UserManager;
+import cc.kune.domain.Container;
+import cc.kune.domain.Content;
+import cc.kune.domain.I18nCountry;
+import cc.kune.domain.I18nLanguage;
+import cc.kune.domain.License;
+import cc.kune.domain.User;
+import cc.kune.domain.finders.GroupFinder;
+import cc.kune.domain.finders.LicenseFinder;
+import cc.kune.domain.finders.UserFinder;
+
+import com.google.inject.Inject;
+
+public abstract class PersistencePreLoadedDataTest extends PersistenceTest {
+    protected static final String USER_EMAIL = "useremail at example.com";
+    protected static final String USER_LONG_NAME = "the user long name";
+    protected static final String USER_PASSWORD = "userPassword";
+    protected static final String USER_SHORT_NAME = "usershortname";
+
+    protected Container container;
+    @Inject
+    protected ContainerManager containerManager;
+    protected Content content;
+    @Inject
+    protected ContentManager contentManager;
+    @Inject
+    protected I18nCountryManager countryManager;
+    protected License defLicense;
+    protected I18nLanguage english;
+    protected I18nCountry gb;
+    @Inject
+    protected GroupFinder groupFinder;
+    @Inject
+    protected GroupManager groupManager;
+    @Inject
+    protected I18nLanguageManager languageManager;
+
+    @Inject
+    protected LicenseFinder licenseFinder;
+    @Inject
+    protected LicenseManager licenseManager;
+    // @Inject
+    // protected PropertyGroupManager propGroupManager;
+    protected User user;
+    @Inject
+    protected UserFinder userFinder;
+    @Inject
+    protected UserManager userManager;
+
+    public PersistencePreLoadedDataTest() {
+    }
+
+    @After
+    public void close() {
+        if (getTransaction().isActive()) {
+            getTransaction().rollback();
+        }
+    }
+
+    @Before
+    public void preLoadData() throws Exception {
+        openTransaction();
+        assertEquals(0, userFinder.getAll().size());
+        assertEquals(0, groupFinder.getAll().size());
+        assertEquals(0, licenseFinder.getAll().size());
+        // final PropertyGroup groupProps = new PropertyGroup(Group.PROPS_ID);
+        // final PropertyGroup userProps = new PropertyGroup(User.PROPS_ID);
+        // propGroupManager.persist(userProps);
+        // propGroupManager.persist(groupProps);
+        english = new I18nLanguage(Long.valueOf(1819), "English", "English", "en");
+        languageManager.persist(english);
+        gb = new I18nCountry(Long.valueOf(75), "GB", "GBP", ".", "£%n", "", ".", "United Kingdom", "western", ",");
+        countryManager.persist(gb);
+        user = userManager.createUser(USER_SHORT_NAME, USER_LONG_NAME, USER_EMAIL, USER_PASSWORD, "en", "GB",
+                TimeZone.getDefault().getID());
+        defLicense = new License("by-sa-v3.0", "Creative Commons Attribution-ShareAlike", "",
+                "http://creativecommons.org/licenses/by-sa/3.0/", true, true, false, "", "");
+        licenseManager.persist(defLicense);
+        groupManager.createUserGroup(user, true);
+        content = new Content();
+        content.setLanguage(english);
+        contentManager.persist(content);
+        container = new Container();
+        container.setTypeId(DocumentServerTool.TYPE_FOLDER);
+        containerManager.persist(container);
+    }
+}

Copied: trunk/src/test/java/cc/kune/core/server/PersistenceTest.java (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/PersistenceTest.java)
===================================================================
--- trunk/src/test/java/cc/kune/core/server/PersistenceTest.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/core/server/PersistenceTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,93 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityTransaction;
+
+import org.junit.Before;
+
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.Provider;
+import com.google.inject.persist.PersistService;
+import com.google.inject.persist.Transactional;
+
+public abstract class PersistenceTest {
+    private final String persistenceUnit;
+    private final String propetiesFileName;
+    @Inject
+    Provider<EntityManager> provider;
+
+    public PersistenceTest() {
+        // test: use memory
+        // test_db: use mysql
+        // Also configurable ein TestHelper
+        this(TestConstants.PERSISTENCE_UNIT, "kune.properties");
+    }
+
+    public PersistenceTest(final String persistenceUnit, final String propetiesFileName) {
+        this.persistenceUnit = persistenceUnit;
+        this.propetiesFileName = propetiesFileName;
+    }
+
+    public void closeTransaction() {
+        getManager().getTransaction().commit();
+    }
+
+    protected EntityManager getManager() {
+        return provider.get();
+    }
+
+    public EntityTransaction getTransaction() {
+        return getManager().getTransaction();
+    }
+
+    public EntityManager openTransaction() {
+        final EntityManager manager = getManager();
+        final EntityTransaction transaction = manager.getTransaction();
+        transaction.begin();
+        return manager;
+    }
+
+    public void persist(final Object... entities) {
+        for (final Object entity : entities) {
+            getManager().persist(entity);
+        }
+    }
+
+    @Transactional
+    @Before
+    public void prepare() {
+        final Injector injector = TestHelper.create(new PlatformServerModule(), persistenceUnit, propetiesFileName);
+        final PersistService persistence = injector.getInstance(PersistService.class);
+        // To Debug insert breakpoint here
+        persistence.start();
+        injector.injectMembers(this);
+    }
+
+    public void rollbackTransaction() {
+        final EntityTransaction transaction = getManager().getTransaction();
+        if (transaction.isActive()) {
+            transaction.rollback();
+        }
+    }
+
+}

Copied: trunk/src/test/java/cc/kune/core/server/TestConstants.java (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/TestConstants.java)
===================================================================
--- trunk/src/test/java/cc/kune/core/server/TestConstants.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/core/server/TestConstants.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,12 @@
+package cc.kune.core.server;
+
+public final class TestConstants {
+    // test: use memory
+    // test_db: use mysql
+    // public static final String PERSISTENCE_UNIT = "test_db";
+    public static final String PERSISTENCE_UNIT = "test";
+    public static final String WAVE_TEST_PROPFILE = "wave-server-testing.properties";
+
+    private TestConstants() {
+    }
+}


Property changes on: trunk/src/test/java/cc/kune/core/server/TestConstants.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: trunk/src/test/java/cc/kune/core/server/TestDomainHelper.java (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/TestDomainHelper.java)
===================================================================
--- trunk/src/test/java/cc/kune/core/server/TestDomainHelper.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/core/server/TestDomainHelper.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,259 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server;
+
+import java.util.TimeZone;
+
+import cc.kune.core.shared.domain.AdmissionType;
+import cc.kune.domain.AccessLists;
+import cc.kune.domain.Container;
+import cc.kune.domain.Content;
+import cc.kune.domain.Group;
+import cc.kune.domain.Revision;
+import cc.kune.domain.SocialNetwork;
+import cc.kune.domain.User;
+
+public abstract class TestDomainHelper {
+
+    public static AccessLists createAccessLists(final Group groupAdmin, final Group groupEditor, final Group groupViewer) {
+
+        final AccessLists lists = new AccessLists();
+        if (groupAdmin != null) {
+            lists.addAdmin(groupAdmin);
+        }
+        if (groupEditor != null) {
+            lists.addEditor(groupEditor);
+        }
+        if (groupViewer != null) {
+            lists.addViewer(groupViewer);
+        }
+        return lists;
+    }
+
+    public static String createBigText() {
+        final String text = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce leo felis, cursus eget, scelerisque adipiscing, fringilla vel, sem. Vestibulum semper tristique sem. Etiam quam neque, consectetuer at, fermentum id, vulputate non, leo. Ut condimentum, mauris et sollicitudin faucibus, lectus arcu facilisis mi, eu pretium arcu tortor quis sem. Pellentesque sit amet nulla ut tellus dapibus blandit. Donec eu dolor vitae mi scelerisque pretium. Donec sit amet nunc ut risus laoreet porta. Integer dictum mi at mauris. Vivamus vulputate, dolor quis pharetra interdum, augue nisi congue eros, a consectetuer libero mi ut quam. Fusce commodo sem blandit massa. Phasellus vehicula varius felis.\n"
+                + "\n"
+                + "Aenean tempus. Ut vel elit a nisl adipiscing commodo. Suspendisse nibh. Praesent pellentesque. Curabitur fringilla tempor justo. Suspendisse bibendum faucibus ipsum. Aenean porta elementum pede. Sed vel odio et metus egestas ultrices. Nulla facilisi. Sed blandit fermentum purus. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam adipiscing. Suspendisse dapibus, est porta vehicula auctor, diam orci scelerisque risus, eu condimentum enim pede ut turpis. Nullam turpis. Aliquam erat volutpat. Integer vitae magna. Mauris sit amet turpis.\n"
+                + "\n"
+                + "Suspendisse potenti. Proin ac felis nec justo bibendum tempus. Donec at nunc et leo aliquet vestibulum. Mauris a justo nec orci ultrices placerat. Etiam tempus commodo dolor. Proin at justo blandit mauris vestibulum hendrerit. Donec mollis pede nec orci. Donec mauris. Quisque adipiscing facilisis ante. Aliquam elit quam, vulputate sit amet, posuere a, suscipit nec, nunc. Etiam vehicula ullamcorper metus. Mauris nec diam a arcu porta lobortis.\n"
+                + "\n"
+                + "Cras dapibus justo sed lacus. Ut ultrices, massa malesuada vestibulum rhoncus, eros sem fringilla sem, vel ultricies eros arcu vel augue. Ut vehicula nibh at lacus. Integer interdum turpis vitae arcu tempus luctus. Praesent a ligula. Donec viverra vestibulum est. Donec ultricies blandit mi. Morbi eleifend, nisi quis tristique pretium, lacus enim luctus nisi, quis lacinia ligula quam a orci. Praesent vel lectus. Pellentesque molestie ante sed leo. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ultrices. Etiam augue. Morbi non purus. Nam libero ligula, lacinia at, rhoncus tincidunt, porttitor quis, leo.\n"
+                + "\n"
+                + "Nulla orci purus, laoreet vel, facilisis ac, rhoncus eu, dui. Phasellus sit amet urna quis dui tempor elementum. Curabitur at magna. In hac habitasse platea dictumst. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nullam in dui. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vestibulum lacinia lectus eleifend mauris. Proin pellentesque tellus sit amet eros. Nulla purus mi, aliquam ac, faucibus a, varius viverra, enim. Vestibulum porttitor, arcu in molestie tristique, tellus velit imperdiet risus, dignissim sollicitudin pede ante sed orci. Nunc in elit. Aliquam adipiscing turpis condimentum tortor. Quisque tellus dolor, tincidunt eu, vehicula rutrum, tristique a, ipsum. Fusce a nunc at ligula egestas sodales. Maecenas molestie, arcu ac ullamcorper ornare, sem nunc sollicitudin velit, id tempor est dui vel elit. Praesent quam quam, vehicula a, mollis et, tincidunt a, nisi. Aliquam justo nibh, faucibus porta, convallis eu, sagittis eget, leo. Praesent at nisi. Nullam scelerisque.\n"
+                + "\n"
+                + "Nunc felis. Vestibulum imperdiet sem. Proin posuere, mauris sit amet molestie pharetra, purus turpis vulputate purus, et blandit ante urna non est. Morbi ligula turpis, faucibus fermentum, auctor a, euismod sit amet, lectus. Cras lacinia, purus et rutrum suscipit, pede odio facilisis dolor, nonummy commodo nunc sapien eu lectus. Proin egestas. Nam sodales aliquam eros. Ut lorem est, porttitor vel, dapibus a, tristique nec, diam. Ut non nulla eu nisi rhoncus lacinia. Ut ornare, sem non molestie condimentum, nisi risus iaculis sem, ac aliquet dui sem vel augue. Nullam varius pellentesque sem. Nulla facilisi.\n"
+                + "\n"
+                + "Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fringilla erat at diam. Suspendisse tincidunt. Nullam pharetra, nibh eget varius tempus, arcu massa dignissim justo, et scelerisque nisi velit commodo orci. Morbi sed nisi eu mi ultrices interdum. Cras in urna a elit sollicitudin consequat. Maecenas vel diam vitae dolor aliquam faucibus. Maecenas mattis, sem a iaculis auctor, est felis sagittis sapien, ut imperdiet diam nisi a nisl. Vestibulum rutrum nisl eget ante. Nulla non urna. In tellus urna, dignissim a, auctor in, pharetra eget, massa. Nam a magna. Ut id elit sit amet risus auctor laoreet. Quisque et urna. Praesent vehicula, nibh ac euismod rhoncus, ligula diam pharetra eros, ac sollicitudin elit odio a nunc. Quisque augue. Nulla pellentesque rhoncus leo. Proin sagittis erat.\n"
+                + "\n"
+                + "Donec fringilla. Mauris ultricies gravida pede. Nullam non urna et quam dignissim egestas. Mauris in nulla. Duis ac ligula non nulla sodales hendrerit. Aliquam condimentum lectus ac turpis. Etiam venenatis lacus vel sem. Proin convallis scelerisque diam. Suspendisse sed lacus a felis pretium rhoncus. Mauris at tortor ac libero euismod porttitor. Maecenas euismod. Etiam id orci. Donec consectetuer gravida lacus. Vivamus bibendum nisi ut felis. Phasellus ac nisl. Praesent lorem sapien, ultricies eget, accumsan a, viverra ut, magna. Integer lobortis leo vitae nunc. Sed vulputate justo eu sem. Proin et augue.\n"
+                + "\n"
+                + "Suspendisse pellentesque suscipit lectus. Fusce ut odio a turpis eleifend viverra. Vestibulum nisl. Aliquam sed turpis at ante pulvinar cursus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec sodales odio sagittis lorem. Duis mattis gravida odio. Cras mattis iaculis risus. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed iaculis laoreet elit. Cras ut tortor. Suspendisse eget nisi. Suspendisse ligula tellus, scelerisque a, consectetuer quis, tristique vel, arcu. Morbi varius, ligula et hendrerit iaculis, lorem purus luctus ipsum, eu interdum urna lorem id pede. Mauris est. In posuere dolor ac ipsum. Curabitur dictum. Vestibulum imperdiet. Pellentesque imperdiet aliquet dolor. Sed vulputate, enim at pulvinar sodales, felis libero malesuada felis, in iaculis odio mauris id neque.\n"
+                + "\n"
+                + "Pellentesque adipiscing. Nam ac neque sagittis nunc posuere fermentum. Sed quis orci vel enim commodo scelerisque. Ut aliquam. Quisque vitae tortor. Morbi libero augue, interdum et, nonummy ac, mattis vel, nisl. Suspendisse elit. Curabitur suscipit leo dignissim tellus. Proin felis massa, ultricies nec, fermentum sit amet, sollicitudin dignissim, mi. Maecenas ipsum ligula, tincidunt vitae, varius a, consequat ac, ligula. Suspendisse et urna. Phasellus consequat luctus arcu. Morbi molestie. Vivamus ligula. Mauris mollis.\n"
+                + "\n"
+                + "In nonummy iaculis leo. Sed vitae metus. Morbi vel eros in dolor accumsan pellentesque. In ut velit. Duis in tortor non enim ultricies scelerisque. Pellentesque ultrices dui a magna. In cursus pede non lorem. Vivamus nisl. Morbi ut tortor eu justo cursus dictum. Integer condimentum. Vivamus nisl risus, euismod id, molestie ut, feugiat nec, magna. Vivamus viverra sodales purus. Ut nunc. Vivamus dignissim sollicitudin nunc. Nulla tempor, diam ut viverra tincidunt, nisl orci sollicitudin lectus, eu dignissim tellus justo eu erat. Phasellus lobortis risus id libero. Ut faucibus diam ac justo. Duis neque magna, auctor eu, suscipit sit amet, tempor faucibus, lacus. Nunc mauris velit, feugiat sit amet, venenatis id, euismod ac, risus. Sed nisl lorem, eleifend et, scelerisque vel, imperdiet vitae, quam.\n"
+                + "\n"
+                + "Integer egestas dolor a purus. Ut quam dolor, elementum at, tincidunt venenatis, dapibus sollicitudin, ligula. Morbi luctus diam eget neque. Duis iaculis. Aliquam vel tellus auctor ipsum elementum hendrerit. In euismod ante tincidunt risus. Maecenas ac lorem sed magna volutpat gravida. Aliquam et sapien sed pede tristique vehicula. Cras et tellus. Nunc massa sem, aliquet a, sollicitudin vitae, malesuada vel, dolor. Suspendisse dui. Mauris purus. Maecenas egestas orci ut quam. Sed semper. Nullam feugiat. Ut aliquet, tellus quis aliquam viverra, orci velit viverra odio, vel adipiscing odio ligula in lorem. Sed ac sem vitae nibh pretium dapibus. Donec ac diam. Integer ultrices massa ut diam. Duis pretium posuere arcu.\n"
+                + "\n"
+                + "Morbi lorem. Fusce luctus lorem in risus gravida gravida. Donec vulputate volutpat metus. Pellentesque ac massa vitae orci placerat pellentesque. In hac habitasse platea dictumst. Curabitur pretium, ipsum in consequat tempor, ligula est volutpat nibh, eget porta diam massa ac leo. Curabitur placerat massa vel nibh. Nam at quam. In sagittis augue ac leo. Fusce adipiscing, ligula in auctor molestie, libero felis mattis sem, sit amet faucibus mauris nunc ac metus. Vivamus neque ipsum, bibendum sit amet, fringilla sit amet, bibendum ut, massa. Maecenas bibendum. Vivamus nunc est, accumsan et, tempus vitae, sagittis in, erat. Fusce turpis nunc, pretium vitae, varius sit amet, dignissim et, tortor. Quisque egestas, libero in dapibus tincidunt, justo arcu feugiat massa, sed sollicitudin lectus tellus sit amet augue. Vestibulum tristique nibh eget lorem. Curabitur cursus purus tristique nulla.\n"
+                + "\n"
+                + "Etiam blandit, arcu eu aliquam ornare, velit libero faucibus felis, sit amet sollicitudin velit leo in elit. Sed turpis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec eu risus. Sed risus lorem, luctus mattis, scelerisque eget, tincidunt a, enim. Vivamus consequat mollis tellus. Cras urna lorem, facilisis eu, porttitor mollis, dignissim posuere, ligula. Ut nonummy sapien. Praesent cursus. Ut turpis. Nulla enim. Aliquam aliquet, enim a gravida aliquam, pede odio porttitor nisi, non vestibulum odio erat a tortor. Donec fringilla ligula id augue. Curabitur vel tellus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur ullamcorper est vitae quam.\n"
+                + "\n"
+                + "Sed posuere neque. Vivamus tortor. Ut at mauris. Nam felis tellus, nonummy eu, gravida id, bibendum id, magna. Pellentesque laoreet mi sed felis. Fusce at lectus quis erat auctor laoreet. In interdum velit ut pede. Ut malesuada tincidunt velit. Suspendisse eu felis in mauris scelerisque iaculis. Morbi ornare dapibus risus. Quisque rhoncus elementum ante. Cras euismod nisi et lectus. Donec ut velit. Etiam a mauris. Integer cursus iaculis tellus. Fusce facilisis, nunc at semper tincidunt, dui purus accumsan nisi, in auctor magna ligula vel pede. Suspendisse ut arcu molestie lorem posuere vestibulum. Quisque pulvinar rhoncus ligula.\n"
+                + "\n"
+                + "Morbi sed enim. Donec in erat. Curabitur suscipit euismod lectus. Etiam dui nisi, volutpat vitae, tincidunt eget, tristique eget, turpis. Vivamus feugiat, quam ut tincidunt placerat, risus magna iaculis quam, id semper nisi tortor quis nibh. Donec a nulla. Aliquam turpis felis, aliquam non, ultrices eget, lacinia vel, nibh. Quisque vel nisi et eros vulputate eleifend. Aliquam nisl. Proin semper turpis. Cras ipsum.\n"
+                + "\n"
+                + "Donec scelerisque nunc non nibh. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nullam nec elit congue ligula vulputate pellentesque. Nunc ipsum. In imperdiet blandit lectus. Nulla ornare elit. Nunc at nibh at nibh semper vulputate. Cras scelerisque hendrerit erat. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum et mi. Etiam ut nisi et augue congue tempor. Curabitur nec libero non lacus congue suscipit. Nunc et metus a justo condimentum tincidunt.\n"
+                + "\n"
+                + "Phasellus ultrices placerat dui. Phasellus luctus, sem eu sagittis ultricies, massa dui eleifend libero, eu mollis urna dolor in neque. Duis pellentesque rutrum ipsum. Phasellus iaculis arcu et enim. Morbi neque. Sed felis velit, mattis sed, mollis quis, tempor sed, mi. Curabitur consequat, ipsum vel volutpat molestie, turpis dui suscipit urna, nec blandit libero pede quis leo. Sed ullamcorper luctus enim. Etiam rutrum imperdiet orci. Pellentesque pede. Nullam sollicitudin blandit quam. Pellentesque non nisi at justo venenatis pharetra. Praesent a dolor at lectus fringilla lobortis.\n"
+                + "\n"
+                + "Morbi eget dolor at mi tempus commodo. Ut accumsan convallis odio. Nam ac velit ac ligula consectetuer lacinia. Ut nibh tortor, auctor et, placerat et, rhoncus ac, ante. Nulla dignissim rhoncus quam. Vestibulum ac est. Integer pharetra, diam sed iaculis porta, turpis orci rhoncus risus, vel aliquet metus eros quis velit. Pellentesque cursus scelerisque ante. Suspendisse tempor, metus a vehicula laoreet, orci mauris tincidunt ante, vitae molestie lectus velit vel nulla. Suspendisse potenti. Morbi quis massa ac felis semper facilisis. Vivamus convallis, magna sed sollicitudin dapibus, tellus tortor congue erat, ac luctus risus mi sit amet lorem.\n"
+                + "\n"
+                + "In pellentesque libero ut lorem. Aliquam a libero eget nulla iaculis vehicula. Nullam turpis tellus, accumsan sit amet, bibendum ac, tincidunt in, libero. Mauris ac neque. Aliquam ultrices lorem id eros cursus pretium. Vivamus at elit ac felis tempor viverra. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam eget nunc. Morbi iaculis luctus massa. In turpis sapien, molestie pretium, vulputate in, facilisis sit amet, lacus. Proin tincidunt faucibus diam. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec nibh tellus, laoreet sit amet, fringilla vitae, ornare a, sapien. Praesent feugiat lobortis tellus. Nullam euismod euismod arcu. Proin a eros. Vivamus in orci. Proin nisi lacus, viverra ut, cursus lacinia, pharetra vitae, metus.\n"
+                + "\n"
+                + "Suspendisse porta risus eget lacus. Suspendisse posuere tortor non erat. Fusce fermentum. Vestibulum pulvinar, elit quis semper porta, nunc mauris dictum quam, eu adipiscing felis pede imperdiet tellus. Nulla sed eros. Sed vestibulum massa vitae purus. Aenean eu felis. Vivamus erat purus, pretium non, congue vulputate, lacinia vel, magna. Donec aliquet, lacus sit amet rhoncus lacinia, nisi tortor mollis felis, id mollis magna quam eu arcu. Morbi quis leo ac orci nonummy malesuada. Fusce iaculis tincidunt elit. Aenean vestibulum. Fusce ut diam eget lectus mattis dapibus. Nam suscipit, tellus vitae lacinia fermentum, nisi leo dignissim erat, a ultrices metus eros et enim. Curabitur congue hendrerit dui. Nulla a sem. Nam tincidunt faucibus leo.\n"
+                + "\n"
+                + "Aliquam quis ante. Sed sit amet eros nec mi aliquet mollis. Nunc libero quam, egestas et, cursus vel, congue id, metus. Etiam et lacus. Phasellus feugiat, mi vel ultrices feugiat, est risus sagittis pede, ut fringilla sem velit quis elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur et neque a diam sollicitudin egestas. Fusce fringilla egestas arcu. Integer congue risus quis libero. Suspendisse aliquam erat non leo. Ut tellus leo, accumsan quis, varius in, dapibus venenatis, dui. Cras mollis tincidunt nisl. Phasellus dignissim iaculis est. Morbi elit. Proin at nulla. Sed id arcu sit amet quam luctus volutpat.\n"
+                + "\n"
+                + "Vestibulum a lorem. Sed condimentum iaculis magna. Phasellus rhoncus. Vivamus malesuada, est et aliquam lobortis, dui massa vestibulum nunc, sed pellentesque mi velit ac orci. Nulla facilisi. Nunc a diam eu est iaculis lobortis. In velit sem, iaculis ut, ornare eu, eleifend at, arcu. Nulla quis metus vel neque rhoncus ultrices. Duis non ligula. Donec vitae augue et pede consectetuer egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vestibulum eu lectus eget sem sagittis congue. Donec posuere lacus et turpis. Etiam sed dolor. Nam purus turpis, vehicula eu, suscipit a, vehicula vel, justo. Nunc eros neque, dignissim vel, consectetuer eu, malesuada sed, odio. Quisque consectetuer, risus vitae vulputate viverra, velit metus accumsan velit, vitae commodo sem sapien vitae lacus. Curabitur suscipit sem ut nisl. Aliquam nec metus. Donec vel pede a velit vestibulum luctus.\n"
+                + "\n"
+                + "Morbi neque turpis, tincidunt quis, dapibus et, sollicitudin sit amet, turpis. Praesent pretium pretium neque. Donec venenatis consequat nibh. Quisque eu nisi. Quisque ultricies vulputate turpis. Praesent non lacus et augue tempor dignissim. Praesent interdum, ipsum at viverra imperdiet, odio pede tincidunt augue, sit amet auctor metus arcu eget dui. Sed pellentesque vulputate nibh. Morbi eu lacus. Cras nonummy velit in nisl.\n"
+                + "\n"
+                + "Nullam mollis, dui id imperdiet semper, felis neque lacinia odio, id congue nisi mi a arcu. Maecenas quam. Vestibulum in sapien quis sapien pretium sodales. Maecenas laoreet mauris et turpis hendrerit gravida. Integer tristique, neque in accumsan auctor, dui purus laoreet enim, id laoreet arcu est elementum justo. Quisque adipiscing, metus id consequat elementum, dui magna bibendum ligula, et lacinia risus augue vitae ante. Nullam eget lacus. Vivamus viverra. Donec dolor nunc, nonummy vitae, consectetuer ac, pulvinar sit amet, urna. Pellentesque eget arcu non nulla malesuada condimentum. Morbi sapien felis, rhoncus vel, lobortis at, scelerisque sed, quam. Suspendisse a leo non velit volutpat rhoncus. Duis tempus magna ac nisl. Fusce augue. Sed volutpat posuere erat. Cras accumsan egestas nulla. Etiam mi massa, ultrices quis, facilisis ut, venenatis nec, odio. Integer felis. Morbi ut arcu non magna rutrum eleifend.\n"
+                + "\n"
+                + "Morbi rhoncus lorem sit amet nibh. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec suscipit aliquet tortor. Mauris vel erat. Sed commodo, nisl sed convallis scelerisque, metus turpis commodo nisl, ultricies blandit pede erat nec orci. Morbi turpis mauris, laoreet quis, iaculis vitae, faucibus et, sem. Praesent condimentum lorem in lorem. Aenean elit ipsum, congue in, pellentesque in, congue vel, odio. Fusce neque neque, auctor a, lobortis nec, tincidunt a, tortor. Sed ipsum purus, condimentum nec, dictum sit amet, adipiscing ac, neque. Pellentesque ligula. Maecenas nec mi. Integer iaculis tincidunt elit. Donec commodo orci ut risus. Nunc nonummy suscipit justo. Pellentesque augue urna, blandit sit amet, dapibus quis, mollis ac, pede. Suspendisse ornare velit et metus. Duis leo libero, euismod sed, mollis at, fringilla id, risus. Cras a justo vitae ante adipiscing molestie. Nam viverra.\n"
+                + "\n"
+                + "Nam semper pede id purus. Fusce ut nibh in enim fringilla placerat. Etiam sodales urna et eros. Nulla facilisi. Sed eleifend justo vel nibh. Praesent vestibulum feugiat neque. Nunc pretium. Etiam fringilla lorem eget sapien. Morbi id nisi. Etiam vehicula. Donec nisi risus, malesuada at, consequat pellentesque, iaculis in, turpis. Etiam iaculis risus nec odio. Fusce a risus. Curabitur dui lacus, ultricies quis, pretium eget, venenatis eget, tortor. Sed et urna. Duis enim ipsum, consequat sed, aliquet in, semper ornare, nibh. Aliquam consequat erat eget leo. Nulla facilisi. Vestibulum convallis. Fusce suscipit varius est.\n"
+                + "\n"
+                + "Duis magna. Nunc adipiscing euismod orci. Integer egestas, nisl non suscipit viverra, sapien mauris tempus quam, ac hendrerit ligula nulla quis nisi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nunc eget pede ultrices elit aliquam tincidunt. Praesent nonummy. Maecenas faucibus accumsan nibh. Morbi dapibus erat. Duis feugiat, nibh nec iaculis consequat, nunc eros placerat libero, a commodo enim odio sit amet magna. Vivamus ultricies tempor lectus. Proin eros elit, aliquam ac, pharetra eget, congue nec, lorem. Suspendisse nisl lectus, gravida at, lacinia a, consequat sit amet, dolor.\n"
+                + "\n"
+                + "Sed vitae est eget eros vehicula cursus. Sed interdum orci sed orci. Ut tempus tincidunt magna. Aliquam erat volutpat. Suspendisse sed diam non mi eleifend euismod. Donec sem nunc, gravida sed, condimentum eget, tristique ac, odio. Maecenas mollis tellus eu risus. Donec tristique magna ut purus. Fusce et felis mattis turpis condimentum dignissim. Mauris sapien massa, lacinia tincidunt, vehicula in, scelerisque eget, nisl. Aliquam sed turpis interdum ligula molestie vestibulum. Nunc dolor. Sed sed tellus ac arcu egestas dapibus. Nunc magna. Curabitur non mauris. Integer quis ligula.\n"
+                + "\n"
+                + "Nulla facilisi. Vivamus at lectus in ligula fringilla posuere. Sed et metus. Curabitur sollicitudin. Praesent mi. Donec eros mi, auctor eget, accumsan vel, volutpat porta, metus. Nam molestie, nisi quis bibendum auctor, nisi risus suscipit sem, sed suscipit dolor nibh quis ante. Morbi at eros. Suspendisse rhoncus tellus at nulla. Mauris mollis orci sit amet turpis. Pellentesque tempor purus. Phasellus ultricies dictum massa. Proin nisl. Quisque eleifend dolor sit amet metus. Nulla pellentesque erat at leo dignissim suscipit. Fusce facilisis viverra quam. Duis viverra. Morbi vel eros. Curabitur nunc. Praesent id eros.\n"
+                + "\n"
+                + "Etiam at arcu ac pede lacinia pellentesque. Nullam urna magna, feugiat at, commodo nec, sollicitudin ut, diam. Nunc in urna. Phasellus congue ultricies ante. Etiam vel leo id eros tempor euismod. Vivamus sed justo. Mauris magna nulla, pretium sed, rhoncus elementum, varius in, enim. Proin sagittis nibh non mauris. Duis non pede non est interdum sagittis. Sed nulla.\n"
+                + "\n"
+                + "Integer id quam. Suspendisse ornare tortor sed ligula. Proin ac magna. Etiam dapibus ornare dui. Nullam ac felis quis lectus fermentum aliquet. Nulla sed augue et velit sollicitudin porta. Integer porttitor quam sit amet lacus. In dictum quam in nulla. Fusce euismod purus et justo. Nam sit amet mi quis orci rutrum rhoncus. Curabitur eleifend malesuada ligula. Nunc luctus auctor tellus. Phasellus pretium bibendum libero.\n"
+                + "\n"
+                + "Duis cursus, nibh quis tincidunt egestas, massa pede bibendum metus, a molestie sapien magna ac elit. Donec nunc nunc, vulputate et, sagittis in, bibendum vel, magna. Maecenas eleifend. Maecenas augue nunc, dignissim at, rhoncus at, pulvinar ut, eros. Aliquam dictum rutrum nisi. In hac habitasse platea dictumst. Aliquam justo mauris, vestibulum sed, cursus ut, suscipit ut, metus. Fusce vitae erat nec nisl posuere ultrices. Vestibulum non orci. Cras nunc lectus, aliquet a, pellentesque id, dapibus ut, felis. Sed lacinia tellus ac nunc. Vivamus massa diam, malesuada nec, convallis eget, lobortis id, nulla. Morbi bibendum, diam eu lacinia aliquet, enim risus suscipit sapien, at aliquet ligula lorem quis metus. Vestibulum euismod, lectus ac egestas facilisis, tortor dui pharetra diam, a aliquet enim ante quis neque. Praesent rhoncus ipsum non sem scelerisque vestibulum. Nullam posuere vestibulum tortor. Nulla facilisi. Aenean at urna sed odio posuere imperdiet. In semper suscipit nisl.\n"
+                + "\n"
+                + "Aliquam quam. Nullam euismod scelerisque arcu. Sed ultricies diam vitae neque. Nunc dictum. Curabitur eget tellus. Sed posuere venenatis nisl. Nulla condimentum, erat quis volutpat rutrum, pede sem mattis nisl, sit amet lacinia orci felis non nisi. Ut et turpis. Duis condimentum, eros ac rutrum pellentesque, enim tortor posuere felis, eget tempus sapien sapien id leo. Sed cursus, est sed tempus dapibus, turpis sapien tempor purus, eget rhoncus arcu diam non neque. Cras lorem. Donec posuere posuere orci. Sed nec metus id orci fringilla dictum. Curabitur ultrices viverra libero.\n"
+                + "\n"
+                + "Mauris tincidunt risus a libero. Suspendisse in nisl. Mauris id mauris. Mauris justo neque, varius tincidunt, hendrerit porttitor, ornare et, leo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque adipiscing sapien ac sem. Fusce leo. Curabitur sit amet mauris. Suspendisse justo augue, vehicula sit amet, tincidunt id, semper vel, nisi. Curabitur tristique. Nulla facilisis. Fusce posuere, ante a vestibulum mattis, metus lectus pharetra tortor, rutrum egestas pede dui ut ligula. Aliquam lacus ligula, blandit id, aliquam at, elementum sed, felis. Nam laoreet. Vivamus a sapien. Cras quis neque. Sed est.\n"
+                + "\n"
+                + "Vestibulum id diam sit amet eros nonummy fringilla. Nullam cursus lobortis velit. In pharetra diam non augue. Duis convallis risus interdum mauris. Etiam rhoncus metus eget pede. Sed velit enim, rutrum in, tincidunt vel, pellentesque ac, elit. Vestibulum pretium mauris at magna. Suspendisse volutpat. Maecenas sit amet arcu. Fusce blandit. Mauris eget neque. Nunc semper nunc a libero. Donec enim dolor, vulputate ac, tempor sit amet, tincidunt eu, enim. Cras sagittis.\n"
+                + "\n"
+                + "Nullam commodo libero ut nunc tincidunt aliquet. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Etiam id tortor quis ipsum pretium blandit. Ut hendrerit orci ac arcu. In id leo. Suspendisse sit amet leo ut ipsum tristique venenatis. Sed in justo. Quisque feugiat. Morbi gravida arcu a orci. Maecenas in justo. Donec sodales, tortor id luctus interdum, ante lorem pretium ante, ac porttitor odio pede vitae purus. Sed iaculis pellentesque purus. Curabitur sit amet libero. Nam a metus ut tortor commodo rhoncus. Nulla suscipit. Mauris ac nibh. Suspendisse ante. Sed nonummy pede at eros. Aenean augue dui, nonummy id, ullamcorper non, dignissim non, diam. Pellentesque diam nisi, pulvinar et, mollis vel, egestas non, nibh.\n"
+                + "\n"
+                + "Phasellus tincidunt. Aliquam molestie. In tristique viverra magna. Integer consequat tempus urna. Aenean turpis orci, aliquet sit amet, mattis vitae, hendrerit eu, justo. Duis pharetra ultricies enim. Nulla facilisi. Nullam sodales, justo vel consectetuer tempor, risus est accumsan orci, non feugiat est dolor ut risus. In pharetra nunc nec urna. Donec diam sem, gravida et, pulvinar id, elementum eu, enim. Morbi porttitor. Integer quis nibh. Nulla ac nulla. Morbi massa orci, tincidunt in, porttitor a, rutrum id, magna. Phasellus vel quam. Curabitur pharetra rutrum quam. Praesent vestibulum, orci in pulvinar congue, diam justo iaculis eros, imperdiet tincidunt lorem urna quis eros. Praesent in eros at velit porttitor pretium.\n"
+                + "\n"
+                + "Fusce consectetuer mattis est. Sed non nulla. Ut auctor nisl. Pellentesque ac massa sit amet augue volutpat molestie. Aliquam in purus. Etiam vitae libero. Nunc sapien lacus, mollis ac, auctor eu, fermentum eu, ligula. Suspendisse potenti. Duis molestie pulvinar elit. Vestibulum tellus libero, ultrices vitae, blandit eget, porttitor ac, odio.\n"
+                + "\n"
+                + "Vivamus malesuada sapien sed ipsum. Aenean quis nisl quis orci suscipit placerat. Pellentesque porttitor commodo nulla. Proin quis libero. Donec congue porttitor sapien. Phasellus sed est vel ligula vulputate facilisis. Mauris sit amet diam. In quis neque id orci tempus vehicula. Suspendisse egestas feugiat neque. Ut metus leo, placerat eget, pellentesque sed, porta at, nisi. Suspendisse potenti. Phasellus ultricies justo sit amet sem. Aenean porttitor enim nec nibh. Integer sed orci.\n"
+                + "\n"
+                + "Sed dignissim, nisi eu convallis luctus, enim justo posuere mauris, quis cursus leo tortor vitae metus. Nullam nec enim a nisl aliquet aliquam. Morbi nunc nisl, sodales et, condimentum in, sagittis vel, pede. Vivamus a sem. Praesent imperdiet luctus elit. Nulla facilisi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed ac mauris non sapien pretium consequat. Fusce ut purus. Praesent sem. Proin placerat posuere lorem. Donec vel libero. Morbi tincidunt sapien at nisl. Sed porta felis eu pede. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam scelerisque. Aenean sit amet metus. Morbi accumsan diam et neque mattis vestibulum. Suspendisse sollicitudin odio et odio. Pellentesque auctor ante non elit.\n"
+                + "\n"
+                + "Morbi eget quam eu orci lobortis blandit. Duis consequat nisi ut magna. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nam posuere, diam at pretium auctor, tortor orci mattis mi, quis bibendum leo diam sed tellus. Vestibulum rutrum nunc. Donec sapien mauris, vehicula ac, commodo ac, hendrerit ut, risus. Quisque non magna at sapien vulputate nonummy. Proin pede enim, tempus sit amet, porttitor commodo, adipiscing non, est. Nulla facilisi. Aenean condimentum ante vitae pede. Donec id tortor quis tellus dictum dictum. Sed pretium ipsum nec pede. Nunc porttitor. In auctor quam at justo. Nunc ligula arcu, bibendum ac, volutpat sed, hendrerit eu, augue. Integer molestie pede eget ipsum.\n"
+                + "\n"
+                + "Nulla faucibus urna quis purus. Sed lacinia. Phasellus sollicitudin augue quis eros. Aenean vel mauris non ipsum molestie scelerisque. Cras pharetra, ligula vel adipiscing fringilla, nunc odio nonummy sapien, nec imperdiet sem pede nec mi. Ut vehicula enim a nunc. Donec suscipit. Curabitur dapibus nisi. Aenean nunc sapien, tristique dapibus, placerat sed, venenatis sed, enim. Etiam bibendum laoreet ligula. Aliquam mauris tortor, feugiat non, consectetuer sit amet, accumsan nec, quam. Nunc quis dui. Nulla facilisi. Cras at nisl. Fusce orci. In turpis. Aliquam nisi est, pellentesque nec, rutrum vitae, commodo at, nisi.\n"
+                + "\n"
+                + "Pellentesque ligula massa, faucibus at, porta ac, cursus vitae, turpis. Nam nibh nisi, viverra sit amet, porttitor vel, molestie quis, arcu. Nullam consectetuer egestas lacus. Suspendisse potenti. Nam scelerisque eleifend nunc. Suspendisse potenti. Maecenas turpis. Nam eleifend semper augue. Praesent ante nisl, sagittis sed, rhoncus eget, scelerisque eu, felis. Nullam non urna. Vestibulum eget ante. Sed id quam. Morbi ut lacus venenatis dolor lacinia commodo. Sed tincidunt libero at elit. Vivamus vitae tortor. Suspendisse eget nisl.\n"
+                + "\n"
+                + "Suspendisse dignissim luctus nisi. Pellentesque varius. Sed gravida aliquet lorem. Phasellus ligula mi, rhoncus id, cursus et, consequat quis, ante. Etiam placerat posuere enim. Donec sed tortor eget pede gravida tristique. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas libero. Nunc a metus nec urna mollis dignissim. Cras sodales sapien ac leo. Mauris suscipit. Mauris at nisl sit amet turpis porta semper. Nullam non elit. Fusce pharetra vestibulum odio. Sed a eros id neque accumsan congue. Fusce turpis mi, volutpat a, convallis non, auctor luctus, tortor. Sed blandit, dui at egestas lobortis, ante sapien dictum quam, vel semper arcu nisi id est.\n"
+                + "\n"
+                + "Suspendisse posuere. Etiam gravida scelerisque enim. Praesent placerat. Nam ligula nunc, faucibus quis, porttitor in, molestie id, velit. Cras sed purus. Nullam in erat. Suspendisse nonummy aliquam mi. Etiam eu lorem. Fusce rhoncus mi ac lectus. Proin sed augue. Donec eu libero. Vestibulum iaculis ultrices diam. Nam tincidunt tincidunt risus. Suspendisse non ipsum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam congue erat ac nunc. Nulla interdum nisi vestibulum quam. Curabitur turpis. Praesent varius, nunc ac lacinia egestas, ante elit dictum pede, eu consequat risus ligula id lacus. Donec vel arcu ac augue feugiat posuere.\n"
+                + "\n"
+                + "Etiam tincidunt pulvinar ipsum. In sit amet nunc volutpat lorem luctus feugiat. Proin augue purus, dictum eu, posuere non, vestibulum vitae, libero. Vivamus fermentum. Sed lorem. Aliquam egestas dapibus eros. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vestibulum nec turpis non lacus feugiat auctor. Sed rhoncus libero eu eros pretium dictum. Duis sed quam. Etiam nec nulla. Morbi elit metus, pulvinar quis, condimentum tristique, egestas eu, lorem. Nam turpis. Sed tincidunt, justo varius nonummy vestibulum, ante odio ultricies diam, sed ullamcorper pede turpis eu elit. Integer sit amet arcu. Sed lorem. Quisque vehicula erat vitae sem. Nunc consectetuer tellus sed neque. Nullam fringilla.\n"
+                + "\n"
+                + "Etiam tempus bibendum sem. Morbi nunc orci, molestie at, pretium non, blandit vitae, justo. Suspendisse potenti. Nulla mollis, metus id interdum malesuada, dolor nulla iaculis ligula, nec lacinia nibh odio volutpat arcu. In hac habitasse platea dictumst. Nullam lorem turpis, mollis a, placerat sit amet, lobortis varius, lectus. Nunc viverra vulputate arcu. Donec nec urna. Vestibulum dapibus, metus ut molestie mollis, elit diam tempor est, eu dictum lectus est in velit. Vivamus faucibus, elit id pellentesque malesuada, purus libero porttitor turpis, vel gravida nunc ligula tempor mauris. Vestibulum suscipit lobortis libero. Vestibulum interdum, sem eget eleifend adipiscing, libero lectus aliquam odio, sed bibendum ante dui ut mi. Pellentesque scelerisque, lorem sed pulvinar eleifend, augue velit lacinia dui, nec semper nibh erat sit amet eros. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent fermentum arcu eget leo. Curabitur in felis. Curabitur sit amet massa in est cursus ultricies. Sed neque dolor, mollis vel, pulvinar ac, fermentum eget, mi.\n"
+                + "\n"
+                + "Nulla facilisi. Maecenas eros arcu, gravida vitae, commodo ac, commodo vel, mi. Suspendisse non metus. Aenean aliquet condimentum dui. Donec augue turpis, adipiscing sed, ultricies in, condimentum nec, metus. Nam sit amet pede. Morbi fringilla. Sed sollicitudin massa nec nisi. Nam ut libero. Morbi malesuada, lacus at bibendum luctus, ante diam tincidunt erat, id consectetuer eros felis ut nisi. Suspendisse ullamcorper rutrum tellus. Aenean in metus sit amet magna tempus pellentesque.\n"
+                + "\n"
+                + "Nullam venenatis tellus id pede. Nunc ac nulla a turpis bibendum laoreet. Quisque eget diam eget arcu scelerisque ultricies. Nullam faucibus accumsan ipsum. Quisque diam nisi, euismod nec, cursus at, lobortis sit amet, nunc. Quisque fermentum sapien eget nibh. Curabitur scelerisque. In hac habitasse platea dictumst. Aliquam diam dui, pharetra quis, ultrices ac, rutrum ut, mi. Praesent egestas. Cras convallis sem ac mauris. Curabitur ultrices odio pretium mi. Nam mi metus, adipiscing id, laoreet id, mattis nec, tortor. Ut sed turpis varius purus vehicula rutrum. Duis suscipit erat eget lectus. Donec feugiat varius risus. Donec facilisis dolor ut justo.\n"
+                + "\n"
+                + "Curabitur lectus nibh, congue ac, laoreet sed, vulputate ac, ipsum. Donec convallis nisl placerat augue. Proin nec felis in arcu tincidunt facilisis. Duis congue tincidunt sapien. Vivamus lobortis purus eget risus. Aenean aliquet, ipsum quis bibendum eleifend, justo dolor pellentesque justo, in elementum orci enim congue nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sem enim, lobortis nec, interdum vitae, sollicitudin non, dolor. Sed commodo euismod orci. Maecenas vel arcu et nunc dignissim volutpat. Morbi molestie aliquam mi. Sed id neque rutrum nunc sagittis ultricies. Mauris diam magna, ullamcorper nec, tincidunt id, laoreet nec, dolor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Aliquam feugiat nisl non arcu. Nulla facilisi. In hac habitasse platea dictumst. Quisque metus.\n"
+                + "\n"
+                + "Suspendisse potenti. Cras malesuada pulvinar est. Ut nisi. Curabitur hendrerit, mauris vel laoreet dictum, quam dolor elementum orci, venenatis gravida sem erat malesuada ante. Aliquam condimentum. Suspendisse orci quam, varius in, egestas ut, mollis quis, arcu. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus sed mauris at massa interdum vulputate. Morbi rutrum ligula. Vivamus nec libero. Curabitur lacinia, lorem eget feugiat pretium, purus urna consequat leo, non bibendum dolor augue vitae quam. Proin mi nunc, feugiat nec, convallis ac, feugiat ac, mi. Praesent pulvinar. Cras cursus nisi id nulla. Integer vel magna. Cras felis. Nam id tellus ac velit interdum convallis. Cras dignissim tortor sed mi.\n"
+                + "\n"
+                + "Nunc vestibulum, tortor eu commodo facilisis, leo mi vehicula sapien, eget hendrerit ipsum odio vitae sem. Aliquam consequat augue eu ligula. Vivamus et neque. Sed sed arcu at justo placerat placerat. Donec posuere. Phasellus lacus ligula, pulvinar at, porta et, tincidunt quis, quam. Curabitur pede mauris, interdum laoreet, feugiat condimentum, mollis ut, lectus. Curabitur laoreet, quam a malesuada suscipit, tellus lorem aliquet diam, a feugiat lorem neque hendrerit risus. Etiam viverra orci vitae mauris. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque tellus augue, aliquam non, porttitor non, ornare eu, mi. Nullam blandit sagittis ante. Aliquam tincidunt, lorem ac imperdiet sodales, elit felis cursus dolor, vel interdum leo purus at tellus. Nunc viverra, dui non sagittis dapibus, justo eros accumsan massa, eu hendrerit lorem nulla ac magna. In hac habitasse platea dictumst.\n"
+                + "\n"
+                + "Ut velit risus, malesuada eget, vestibulum nec, ornare ac, ipsum. Morbi volutpat aliquet turpis. Nam enim. Nulla semper est vitae neque. Phasellus non dui. In hac habitasse platea dictumst. Morbi auctor porttitor est. Nullam non nulla quis elit eleifend porttitor. Aliquam erat volutpat. Duis erat. Cras lobortis nisl in elit. Vivamus leo. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean ac neque. Nam sem nulla, ornare quis, dictum eget, fermentum quis, lorem. In blandit lacus. Aenean in enim.\n"
+                + "\n"
+                + "Donec sit amet orci id quam rhoncus egestas. Integer metus. Vestibulum risus lorem, posuere ac, aliquam in, mollis at, lorem. Integer metus. Aliquam blandit scelerisque orci. Nulla eu ligula. Nulla nec nisi et libero cursus bibendum. Suspendisse potenti. Maecenas in massa eget tortor consectetuer scelerisque. Morbi tincidunt velit. Nam lectus purus, malesuada ac, gravida nec, sodales sed, sem. Vestibulum feugiat. Cras viverra vestibulum massa. Mauris scelerisque. Fusce ut ante ut ante molestie molestie. Praesent non arcu. Fusce auctor blandit ipsum. Nullam est.\n"
+                + "\n"
+                + "In pulvinar arcu quis ligula. Duis volutpat metus at lorem. Aenean eu urna vitae velit tempus sollicitudin. Duis erat lectus, dignissim sit amet, fermentum at, mattis at, nisi. Nunc vel libero. Nulla eget risus et dui facilisis sagittis. Donec vel est. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Sed adipiscing massa nec dolor. Morbi a ligula a ante vulputate tempor. Nullam lorem lacus, sodales gravida, scelerisque in, laoreet eu, nulla. Nam in tortor non nunc consectetuer porta. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi ut diam. Proin nonummy. Pellentesque erat justo, egestas ac, sagittis id, suscipit vitae, diam. Aenean tincidunt urna sit amet urna. Donec turpis. Mauris cursus dolor a massa.\n"
+                + "\n"
+                + "Phasellus sem arcu, semper vel, eleifend eu, viverra eu, nulla. Fusce felis elit, semper cursus, ornare et, eleifend vel, pede. In est tellus, vulputate sit amet, tristique sed, imperdiet vel, lacus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam justo. Proin volutpat. Nullam vitae dui nec urna convallis euismod. Nulla facilisi. Phasellus porttitor. Aenean scelerisque dolor sed justo. In vel nisi gravida mi mollis tempus. Curabitur ante lorem, fringilla eu, laoreet vitae, ultricies id, nisi. Sed id ante. Morbi tristique, est id porta tempus, turpis ipsum porta elit, at gravida leo odio in ante. Fusce euismod.\n"
+                + "\n"
+                + "Maecenas urna quam, fringilla eu, porta eu, semper quis, dui. Nunc congue est eu ante. Donec suscipit viverra leo. Nullam tempus porttitor est. Cras eu elit eget erat consectetuer convallis. Nam tellus ligula, eleifend ultrices, consequat et, malesuada non, velit. Quisque vitae enim in elit accumsan ullamcorper. Pellentesque eget enim. Sed nonummy, orci pretium malesuada adipiscing, dolor velit bibendum pede, non tincidunt diam sapien ac nunc. Maecenas porta leo at augue.\n"
+                + "\n"
+                + "Aliquam erat volutpat. Curabitur eu arcu faucibus tellus hendrerit bibendum. Praesent orci pede, lacinia vitae, tristique vitae, suscipit non, turpis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse tincidunt laoreet sapien. Vestibulum varius neque in odio. Donec sem ipsum, egestas id, molestie sit amet, luctus eu, est. Integer leo eros, laoreet non, lacinia in, cursus nec, mi. Donec ornare velit non massa. Curabitur turpis ligula, pharetra lacinia, euismod eu, tincidunt ut, velit. Cras nec ipsum eget augue sagittis vestibulum. Cras mattis dapibus tortor. Pellentesque sit amet arcu eu quam pretium malesuada. Phasellus turpis nisi, mattis ac, gravida et, aliquam eget, tellus. Aenean quis justo eget erat congue tincidunt.\n"
+                + "\n"
+                + "Aenean non tortor ut sem facilisis blandit. Sed ante lectus, bibendum id, fermentum ac, vestibulum et, ipsum. Sed tincidunt. Ut tincidunt. In sit amet odio. Sed massa. Nullam auctor. Nam lacinia sem eu lorem. Nunc neque tortor, euismod ut, dictum vel, commodo vehicula, lorem. Nullam metus urna, interdum non, semper eget, sodales in, eros. Sed eget magna vel dui tincidunt iaculis. Nam faucibus justo eget nunc. Suspendisse potenti. Proin fermentum erat in orci. Suspendisse semper lorem. Fusce rhoncus nulla a sapien. Mauris turpis turpis, bibendum euismod, porttitor pretium, semper id, ante. Ut eget est vel elit tempus auctor. Morbi interdum quam. In hac habitasse platea dictumst.\n"
+                + "\n"
+                + "Praesent vel ante ac mi consectetuer accumsan. Quisque quis ipsum. Suspendisse vitae magna vitae metus congue tempus. Aenean sagittis, ante nec vehicula molestie, ligula nisl tristique justo, quis suscipit nulla urna in sapien. Pellentesque eget felis pellentesque orci dignissim interdum. Sed metus lorem, egestas quis, iaculis at, venenatis eleifend, dui. Praesent elementum porttitor lacus. Sed suscipit dui vel dolor. Sed sit amet nunc et nunc rutrum eleifend. Curabitur et ligula. Phasellus consectetuer mi ut pede. In a libero in urna blandit varius. Sed pellentesque ligula aliquet risus. Ut laoreet, eros volutpat rhoncus congue, erat felis porttitor augue, vel laoreet eros est vitae pede. Suspendisse sit amet elit. Quisque quis dui. Vivamus massa. Suspendisse quis felis. Aliquam diam enim, volutpat in, commodo pellentesque, consectetuer ut, nibh.\n"
+                + "\n"
+                + "Donec mattis. Quisque purus purus, mattis sit amet, sollicitudin at, faucibus quis, diam. Sed ut urna a arcu posuere porta. Duis feugiat massa ut pede. In hac habitasse platea dictumst. Donec lectus nisl, elementum vel, pulvinar a, bibendum at, lorem. Vestibulum non lacus. Praesent arcu. Maecenas justo. Proin vel ipsum. Etiam egestas arcu vitae nibh. Aenean vel lacus id lacus tempus hendrerit. Ut lobortis ornare nibh.\n"
+                + "\n"
+                + "Donec nonummy, massa a accumsan tristique, purus diam iaculis nibh, ut dictum lorem metus sit amet nibh. Aliquam id eros et diam congue condimentum. Vestibulum porttitor massa a purus dignissim fringilla. Curabitur lectus. Phasellus auctor tortor vitae orci. Duis ante est, hendrerit ut, commodo sit amet, scelerisque eget, arcu. Cras luctus, risus eu volutpat sagittis, sem nulla accumsan libero, nec volutpat eros dui sit amet ante. Nunc convallis purus sed nisl. Nulla rutrum. Etiam viverra, orci at facilisis pretium, odio libero sollicitudin eros, ac pharetra est diam eu orci. Cras dolor risus, porttitor eu, convallis sit amet, tincidunt a, nulla. Nunc porttitor luctus diam. Mauris erat magna, pharetra ac, pretium consequat, viverra ut, nisl. Donec blandit mollis metus. Praesent dui pede, ultricies non, pellentesque et, molestie eu, nulla.\n"
+                + "\n"
+                + "Vivamus eleifend, leo sit amet tristique elementum, urna urna sollicitudin dolor, eu egestas est enim et tellus. Maecenas congue feugiat dolor. Nullam semper. Aliquam ipsum justo, fringilla et, consequat in, malesuada id, arcu. Ut orci. Aliquam sagittis consequat urna. Nam elementum diam quis lacus. Morbi elementum adipiscing orci. Mauris eros neque, vehicula quis, egestas sit amet, imperdiet id, mi. Cras convallis nisi vitae nulla. Vestibulum at purus.\n"
+                + "\n"
+                + "Etiam quis nisi vel sapien commodo ultrices. Etiam lacus. Etiam venenatis elit nec purus. Fusce id est. Vivamus justo tellus, facilisis quis, bibendum non, lacinia eget, ante. Mauris aliquet. Suspendisse iaculis placerat purus. Aliquam erat volutpat. Quisque vel sem. Donec pulvinar, lorem id malesuada blandit, nibh diam lobortis mi, in elementum velit mi a felis. In egestas. Suspendisse pede.\n"
+                + "\n"
+                + "Curabitur eu urna eget pede placerat adipiscing. Sed adipiscing bibendum tortor. Integer justo. Fusce risus enim, hendrerit ac, pellentesque sed, egestas sed, orci. Nunc orci erat, rutrum eu, euismod quis, condimentum eget, metus. Cras tincidunt. Phasellus scelerisque. Nunc sed nulla. Aliquam et sapien ac purus faucibus tincidunt. Ut id ligula egestas enim gravida vulputate. Maecenas consequat. Etiam varius sapien id pede. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Integer cursus libero eget pede. In faucibus ultricies felis. Praesent nulla. Donec tortor.\n"
+                + "\n"
+                + "Nulla quam felis, semper pellentesque, imperdiet a, egestas ut, purus. Fusce vitae elit quis dolor hendrerit gravida. Donec vestibulum. Aenean fermentum semper libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla facilisi. Donec eleifend leo at sem. Vivamus consectetuer, magna et iaculis elementum, erat sapien viverra lacus, consectetuer consectetuer justo leo id nulla. Phasellus id nisl. Aliquam molestie pede sit amet nisl. Duis iaculis vehicula tellus.\n"
+                + "\n"
+                + "Donec quis ipsum eget lacus vehicula fringilla. Vivamus dui est, interdum sed, scelerisque at, rhoncus at, massa. Proin placerat sodales elit. Mauris sagittis urna et enim. Vestibulum aliquet convallis nisi. Donec auctor ullamcorper lectus. Nullam vitae purus facilisis justo condimentum malesuada. Donec dui lectus, iaculis quis, lobortis aliquam, auctor nec, lectus. Aenean vel mi. Pellentesque et arcu faucibus orci convallis ullamcorper. In consequat. Praesent lobortis faucibus leo. Duis ut justo. Morbi viverra aliquam dui. Fusce laoreet dolor porta quam. Duis molestie porttitor dui. Quisque libero sem, tempor vitae, rhoncus sed, suscipit non, ante.\n"
+                + "\n"
+                + "In accumsan. Ut metus turpis, tincidunt in, rutrum quis, ultrices feugiat, tellus. Vivamus pellentesque urna sit amet elit. Mauris iaculis dui nec massa. Duis ac sem. Suspendisse sed lorem. Etiam eget sapien. Duis adipiscing porttitor neque. Nullam nisl elit, imperdiet et, pretium et, pretium ac, velit. Aenean eu lectus. Nam suscipit blandit purus. Vestibulum vel pede sodales nisi pulvinar porta. Integer ut urna ac arcu imperdiet tempus. Etiam rutrum, quam id euismod mattis, ligula tortor imperdiet orci, nec fringilla tortor libero eu est. Nulla pretium ligula. Sed eu nisi. Proin neque lorem, suscipit euismod, vestibulum eu, pretium volutpat, elit. Aenean mauris lacus, dictum nec, vulputate et, aliquam et, mi. Praesent aliquam purus ac neque.\n"
+                + "\n"
+                + "Maecenas mollis risus eget turpis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur lacus urna, auctor in, commodo ut, blandit vitae, tellus. Nunc vitae elit. Mauris elementum arcu. Nulla facilisi. Nunc diam tellus, porttitor non, dictum id, fermentum eget, nulla. Nulla facilisis enim nec felis. Phasellus interdum, erat a fermentum mattis, urna nisl iaculis ipsum, sit amet venenatis ante massa sit amet enim. Quisque facilisis nibh. Donec sit amet mauris et nisi eleifend egestas. Suspendisse pellentesque malesuada dui. Ut vestibulum, tortor sit amet pellentesque venenatis, sem turpis scelerisque massa, ut facilisis est ipsum ut arcu. Suspendisse feugiat, enim sit amet vehicula varius, tortor justo dapibus odio, et semper magna turpis ac ligula.\n"
+                + "\n"
+                + "Pellentesque non diam. Donec vel neque vel turpis vulputate ornare. Sed porttitor mi id augue. Etiam sapien mi, lobortis sed, dapibus nec, congue at, augue. Vestibulum condimentum, leo in cursus porta, quam nisl eleifend lectus, quis mattis sapien nisl sed lacus. Morbi pellentesque viverra massa. Aenean volutpat nibh lobortis tortor. Aliquam id diam. Nulla facilisi. Etiam ipsum elit, vestibulum vitae, accumsan vitae, aliquam sit amet, odio. Donec condimentum. Phasellus sodales, nunc et ullamcorper laoreet, turpis arcu egestas pede, id pharetra ante tortor vel est. Maecenas sem. Nulla lorem massa, mollis id, malesuada eu, faucibus a, est.\n"
+                + "\n"
+                + "Curabitur molestie, nunc at aliquet tempor, risus metus adipiscing felis, vitae euismod justo felis id eros. Aenean tincidunt nunc sed eros. Nulla ac tellus. Aliquam erat volutpat. Nulla vitae felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In consectetuer posuere purus. Phasellus interdum. Ut laoreet semper nunc. Duis blandit quam a velit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Curabitur aliquam dolor et tortor. Pellentesque vulputate. Pellentesque diam purus, facilisis nec, fermentum a, consequat quis, ipsum. Ut euismod dui ut massa. Proin nonummy nisi ut pede. Pellentesque sollicitudin lectus a purus.\n"
+                + "\n"
+                + "Cras vulputate. Praesent tempus fringilla diam. Suspendisse at elit. Cras ut nulla eget mi dapibus pretium. Etiam hendrerit tortor sed lectus. Cras mauris. Nam ligula. Mauris semper, arcu ut facilisis molestie, lorem sapien iaculis quam, at dignissim sapien mauris id pede. In metus ante, porttitor id, fringilla a, adipiscing eget, nisi. Ut ornare sapien nec velit. Aenean tortor metus, pellentesque vitae, iaculis eget, imperdiet nec, turpis. Vestibulum sit amet erat ac urna auctor imperdiet. Nulla facilisi. Quisque facilisis pede vel mi consequat dignissim. Vivamus sapien.\n";
+        return text;
+    }
+
+    public static Content createDescriptor(final long id, final String title, final String content) {
+        final Content descriptor = new Content();
+        descriptor.setId(id);
+        final Revision rev = new Revision(descriptor);
+        descriptor.addRevision(rev);
+        rev.setTitle(title);
+        rev.setBody(content);
+        return descriptor;
+    }
+
+    public static Container createFolderWithId(final long id) {
+        final Container container = new Container();
+        container.setId(id);
+        return container;
+    }
+
+    public static Container createFolderWithIdAndGroupAndTool(final int i, final String groupShortName,
+            final String toolName) {
+        final Container container = createFolderWithIdAndToolName(i, toolName);
+        final Group owner = new Group();
+        owner.setShortName(groupShortName);
+        container.setOwner(owner);
+        return container;
+
+    }
+
+    public static Container createFolderWithIdAndToolName(final int i, final String toolName) {
+        final Container container = createFolderWithId(i);
+        container.setToolName(toolName);
+        return container;
+    }
+
+    public static Group createGroup(final int number) {
+        final Group group = new Group("ysei" + number, "Yellow Submarine Environmental Initiative" + number);
+        group.setId(Long.valueOf(number));
+        return group;
+    }
+
+    public static SocialNetwork createSocialNetwork(final Group groupInAdmins, final Group groupInCollab,
+            final Group groupInViewer, final Group groupInPendings) {
+
+        final SocialNetwork socialNetwork = new SocialNetwork();
+        socialNetwork.addAdmin(groupInAdmins);
+        socialNetwork.addCollaborator(groupInCollab);
+        socialNetwork.addViewer(groupInViewer);
+        socialNetwork.addPendingCollaborator(groupInPendings);
+        return socialNetwork;
+    }
+
+    public static User createUser(final int number) {
+        final String shortName = "shortname" + number;
+        final String longName = "name" + number;
+        final User user = new User(shortName, longName, "email at domain" + number, ("password" + number),
+                "diggest".getBytes(), "salt".getBytes(), null, null, TimeZone.getDefault());
+        final Group userGroup = new Group(shortName, longName);
+        userGroup.setAdmissionType(AdmissionType.Closed);
+        userGroup.setSocialNetwork(createSocialNetwork(userGroup, userGroup, userGroup, null));
+        user.setUserGroup(userGroup);
+        return user;
+    }
+}

Copied: trunk/src/test/java/cc/kune/core/server/TestHelper.java (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java)
===================================================================
--- trunk/src/test/java/cc/kune/core/server/TestHelper.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/core/server/TestHelper.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,88 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.configuration.ConfigurationException;
+import org.ourproject.kune.platf.integration.HttpServletRequestMocked;
+import org.waveprotocol.box.server.CoreSettings;
+import org.waveprotocol.box.server.ServerModule;
+import org.waveprotocol.box.server.authentication.AccountStoreHolder;
+import org.waveprotocol.box.server.persistence.AccountStore;
+import org.waveprotocol.box.server.persistence.PersistenceException;
+import org.waveprotocol.box.server.persistence.PersistenceModule;
+import org.waveprotocol.wave.federation.noop.NoOpFederationModule;
+
+import cc.kune.core.server.init.FinderRegistry;
+import cc.kune.core.server.properties.PropertiesFileName;
+import cc.kune.wave.server.CustomSettingsBinder;
+
+import com.google.inject.Binder;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Key;
+import com.google.inject.Module;
+import com.google.inject.Scopes;
+import com.google.inject.name.Names;
+import com.google.inject.persist.jpa.JpaPersistModule;
+import com.google.inject.servlet.RequestScoped;
+import com.google.inject.servlet.SessionScoped;
+
+public abstract class TestHelper {
+    public static Injector create(final Module module, final String persistenceUnit, final String propetiesFileName) {
+        try {
+            final Injector injector = Guice.createInjector(CustomSettingsBinder.bindSettings(
+                    TestConstants.WAVE_TEST_PROPFILE, CoreSettings.class));
+            final PersistenceModule wavePersistModule = injector.getInstance(PersistenceModule.class);
+            final NoOpFederationModule federationModule = injector.getInstance(NoOpFederationModule.class);
+            final Injector childInjector = injector.createChildInjector(wavePersistModule, new ServerModule(false),
+                    federationModule, FinderRegistry.init(new JpaPersistModule(persistenceUnit)), module, new Module() {
+                        @Override
+                        public void configure(final Binder binder) {
+                            binder.bindScope(SessionScoped.class, Scopes.SINGLETON);
+                            binder.bindScope(RequestScoped.class, Scopes.SINGLETON);
+                            binder.bindConstant().annotatedWith(PropertiesFileName.class).to(propetiesFileName);
+                            binder.bind(HttpServletRequest.class).to(HttpServletRequestMocked.class);
+                        }
+                    });
+            final AccountStore accountStore = childInjector.getInstance(AccountStore.class);
+            accountStore.initializeAccountStore();
+            AccountStoreHolder.resetForTesting();
+            AccountStoreHolder.init(accountStore,
+                    childInjector.getInstance(Key.get(String.class, Names.named(CoreSettings.WAVE_SERVER_DOMAIN))));
+            return childInjector;
+        } catch (final ConfigurationException e) {
+            e.printStackTrace();
+        } catch (final PersistenceException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    public static void inject(final Object target) {
+        // test: use memory
+        // test_db: use mysql
+        // Also configurable ein PersistenceTest
+        TestHelper.create(new PlatformServerModule(), TestConstants.PERSISTENCE_UNIT, "kune.properties").injectMembers(
+                target);
+    }
+
+}

Copied: trunk/src/test/java/cc/kune/core/server/access (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/access)

Modified: trunk/src/test/java/cc/kune/core/server/access/AccessRightsServiceTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/access/AccessRightsServiceTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/access/AccessRightsServiceTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,16 +17,17 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.access;
+package cc.kune.core.server.access;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import org.junit.Before;
 import org.junit.Test;
-import org.ourproject.kune.platf.server.TestDomainHelper;
 import org.ourproject.kune.testhelper.ctx.DomainContext;
 
+import cc.kune.core.server.TestDomainHelper;
+import cc.kune.core.server.access.AccessRightsServiceDefault;
 import cc.kune.core.shared.domain.utils.AccessRights;
 import cc.kune.domain.AccessLists;
 import cc.kune.domain.Group;

Modified: trunk/src/test/java/cc/kune/core/server/access/FinderTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/access/FinderTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/access/FinderTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.access;
+package cc.kune.core.server.access;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
@@ -25,14 +25,15 @@
 import org.junit.Before;
 import org.junit.Test;
 import org.mockito.Mockito;
-import org.ourproject.kune.platf.server.TestDomainHelper;
-import org.ourproject.kune.platf.server.content.CommentManager;
-import org.ourproject.kune.platf.server.content.ContainerManager;
-import org.ourproject.kune.platf.server.content.ContentManager;
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.manager.RateManager;
 
 import cc.kune.core.client.errors.ContentNotFoundException;
+import cc.kune.core.server.TestDomainHelper;
+import cc.kune.core.server.access.FinderServiceDefault;
+import cc.kune.core.server.content.CommentManager;
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.manager.RateManager;
 import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.domain.Container;
 import cc.kune.domain.Content;

Copied: trunk/src/test/java/cc/kune/core/server/auth (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/auth)

Modified: trunk/src/test/java/cc/kune/core/server/auth/AuthenticatedMethodInterceptorTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/auth/AuthenticatedMethodInterceptorTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/auth/AuthenticatedMethodInterceptorTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.auth;
+package cc.kune.core.server.auth;
 
 import java.lang.reflect.AccessibleObject;
 
@@ -30,6 +30,8 @@
 
 import cc.kune.core.client.errors.SessionExpiredException;
 import cc.kune.core.client.errors.UserMustBeLoggedException;
+import cc.kune.core.server.auth.Authenticated;
+import cc.kune.core.server.auth.AuthenticatedMethodInterceptor;
 
 public class AuthenticatedMethodInterceptorTest extends IntegrationTest {
 

Modified: trunk/src/test/java/cc/kune/core/server/auth/AuthorizatedMethodInterceptorTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/auth/AuthorizatedMethodInterceptorTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/auth/AuthorizatedMethodInterceptorTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.auth;
+package cc.kune.core.server.auth;
 
 import java.lang.reflect.AccessibleObject;
 
@@ -30,6 +30,9 @@
 
 import cc.kune.core.client.errors.AccessViolationException;
 import cc.kune.core.client.errors.ContentNotFoundException;
+import cc.kune.core.server.auth.ActionLevel;
+import cc.kune.core.server.auth.Authorizated;
+import cc.kune.core.server.auth.AuthorizatedMethodInterceptor;
 import cc.kune.core.shared.domain.AccessRol;
 import cc.kune.core.shared.domain.utils.StateToken;
 

Copied: trunk/src/test/java/cc/kune/core/server/domain (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/domain)

Modified: trunk/src/test/java/cc/kune/core/server/domain/GroupListTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/domain/GroupListTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/domain/GroupListTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.domain;
+package cc.kune.core.server.domain;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;

Copied: trunk/src/test/java/cc/kune/core/server/finders (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/finders)

Modified: trunk/src/test/java/cc/kune/core/server/finders/GroupFinderTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/finders/GroupFinderTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/finders/GroupFinderTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,15 +17,15 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.finders;
+package cc.kune.core.server.finders;
 
 import static org.junit.Assert.assertEquals;
 
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.ourproject.kune.platf.server.PersistenceTest;
 
+import cc.kune.core.server.PersistenceTest;
 import cc.kune.domain.Group;
 import cc.kune.domain.finders.GroupFinder;
 

Modified: trunk/src/test/java/cc/kune/core/server/finders/LicenseFinderTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/finders/LicenseFinderTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/finders/LicenseFinderTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.finders;
+package cc.kune.core.server.finders;
 
 import static junit.framework.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -27,9 +27,9 @@
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.ourproject.kune.platf.server.PersistenceTest;
-import org.ourproject.kune.platf.server.properties.DatabaseProperties;
 
+import cc.kune.core.server.PersistenceTest;
+import cc.kune.core.server.properties.DatabaseProperties;
 import cc.kune.domain.License;
 import cc.kune.domain.finders.LicenseFinder;
 

Modified: trunk/src/test/java/cc/kune/core/server/finders/RateFinderTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/finders/RateFinderTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/finders/RateFinderTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.finders;
+package cc.kune.core.server.finders;
 
 import static org.junit.Assert.assertEquals;
 
@@ -27,9 +27,9 @@
 
 import org.junit.Before;
 import org.junit.Test;
-import org.ourproject.kune.platf.server.PersistencePreLoadedDataTest;
-import org.ourproject.kune.platf.server.TestDomainHelper;
 
+import cc.kune.core.server.PersistencePreLoadedDataTest;
+import cc.kune.core.server.TestDomainHelper;
 import cc.kune.domain.Content;
 import cc.kune.domain.Rate;
 import cc.kune.domain.User;

Modified: trunk/src/test/java/cc/kune/core/server/finders/UserFinderTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/finders/UserFinderTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/finders/UserFinderTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.finders;
+package cc.kune.core.server.finders;
 
 import static junit.framework.Assert.assertEquals;
 import static junit.framework.Assert.assertNotNull;
@@ -27,8 +27,8 @@
 
 import org.junit.Before;
 import org.junit.Test;
-import org.ourproject.kune.platf.server.PersistencePreLoadedDataTest;
 
+import cc.kune.core.server.PersistencePreLoadedDataTest;
 import cc.kune.domain.User;
 import cc.kune.domain.finders.UserFinder;
 

Copied: trunk/src/test/java/cc/kune/core/server/manager/ContentManagerTest.java (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/manager/ContentManagerTest.java)
===================================================================
--- trunk/src/test/java/cc/kune/core/server/manager/ContentManagerTest.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/core/server/manager/ContentManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,121 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Ignore;
+import org.junit.Test;
+import org.ourproject.kune.docs.server.DocumentServerTool;
+
+import cc.kune.core.server.PersistencePreLoadedDataTest;
+import cc.kune.core.server.manager.impl.SearchResult;
+import cc.kune.domain.BasicMimeType;
+import cc.kune.domain.Content;
+
+public class ContentManagerTest extends PersistencePreLoadedDataTest {
+
+    private static final String BODY = "body";
+    private static final String MIMETYPE = "image";
+    private static final String TITLE = "title";
+
+    private void createContent() {
+        final Content cnt = contentManager.createContent(TITLE, BODY, user, container,
+                DocumentServerTool.TYPE_UPLOADEDFILE);
+        persist(cnt);
+    }
+
+    private void createContentWithMimeAndCheck(final String mimetype) {
+        final Content cnt = contentManager.createContent(TITLE, BODY, user, container,
+                DocumentServerTool.TYPE_UPLOADEDFILE);
+        cnt.setMimeType(new BasicMimeType(mimetype));
+        persist(cnt);
+        final Content newCnt = contentManager.find(cnt.getId());
+        assertEquals(mimetype, newCnt.getMimeType().toString());
+    }
+
+    @Ignore
+    @Test
+    public void testBasicBodySearch() {
+        createContent();
+        final SearchResult<Content> search = contentManager.search(BODY);
+        contentManager.reIndex();
+        assertEquals(1, search.getSize());
+    }
+
+    @Test
+    public void testBasicMimePersist() {
+        final String mimetype = "application/pdf";
+        createContentWithMimeAndCheck(mimetype);
+    }
+
+    @Test
+    public void testBasicMimePersistWithoutSubtype() {
+        final String mimetype = "application";
+        createContentWithMimeAndCheck(mimetype);
+    }
+
+    @Test
+    public void testBasicMimeSearchWithQueriesAndFields() {
+        createContentWithMimeAndCheck(MIMETYPE + "/png");
+        contentManager.reIndex();
+        final SearchResult<Content> search = contentManager.search(new String[] { MIMETYPE },
+                new String[] { "mimeType.mimetype" }, 0, 10);
+        assertEquals(1, search.getSize());
+    }
+
+    @Test
+    public void testBasicSearchWithQueriesAndFields() {
+        createContentWithMimeAndCheck(MIMETYPE);
+        final SearchResult<Content> search = contentManager.search(new String[] { BODY },
+                new String[] { "lastRevision.body" }, 0, 10);
+        contentManager.reIndex();
+        assertEquals(1, search.getSize());
+    }
+
+    @Test
+    public void testBasicTitleSearch() {
+        createContent();
+        final SearchResult<Content> search = contentManager.search(TITLE);
+        contentManager.reIndex();
+        assertEquals(1, search.getSize());
+    }
+
+    @Ignore
+    @Test
+    public void testtMimeSearch() {
+        createContentWithMimeAndCheck(MIMETYPE + "/png");
+        contentManager.reIndex();
+        final SearchResult<Content> search = contentManager.searchMime(BODY, 0, 10, "asb", MIMETYPE);
+        assertEquals(1, search.getSize());
+    }
+
+    /**
+     * This normally fails with mysql (not configured for utf-8), see the
+     * INSTALL mysql section
+     */
+    @Test
+    public void testUTF8Persist() {
+        final Content cnt = contentManager.createContent("汉语/漢語", "汉语/漢語", user, container,
+                DocumentServerTool.TYPE_DOCUMENT);
+        final Content newCnt = contentManager.find(cnt.getId());
+        assertEquals("汉语/漢語", newCnt.getTitle());
+    }
+}

Copied: trunk/src/test/java/cc/kune/core/server/manager/FileManagerDefaultTest.java (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/manager/FileManagerDefaultTest.java)
===================================================================
--- trunk/src/test/java/cc/kune/core/server/manager/FileManagerDefaultTest.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/core/server/manager/FileManagerDefaultTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,39 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import org.junit.Before;
+
+import cc.kune.core.server.PersistenceTest;
+import cc.kune.core.server.manager.FileManager;
+
+import com.google.inject.Inject;
+
+public class FileManagerDefaultTest extends PersistenceTest {
+
+    @Inject
+    FileManager fileManager;
+
+    @Before
+    public void start() {
+
+    }
+
+}

Copied: trunk/src/test/java/cc/kune/core/server/manager/GroupManagerTest.java (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/manager/GroupManagerTest.java)
===================================================================
--- trunk/src/test/java/cc/kune/core/server/manager/GroupManagerTest.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/core/server/manager/GroupManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,201 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.TimeZone;
+
+import org.apache.lucene.queryParser.ParseException;
+import org.hibernate.validator.InvalidStateException;
+import org.junit.Test;
+
+import cc.kune.core.client.errors.EmailAddressInUseException;
+import cc.kune.core.client.errors.GroupNameInUseException;
+import cc.kune.core.client.errors.I18nNotFoundException;
+import cc.kune.core.client.errors.UserRegistrationException;
+import cc.kune.core.server.PersistencePreLoadedDataTest;
+import cc.kune.core.server.manager.impl.SearchResult;
+import cc.kune.core.shared.dto.GroupType;
+import cc.kune.domain.AccessLists;
+import cc.kune.domain.Group;
+import cc.kune.domain.SocialNetwork;
+import cc.kune.domain.User;
+
+public class GroupManagerTest extends PersistencePreLoadedDataTest {
+
+    @Test
+    public void createdGroupShoudHaveValidSocialNetwork() throws Exception {
+        final Group group = new Group("short", "longName", defLicense, GroupType.PROJECT);
+        groupManager.createGroup(group, user);
+        final SocialNetwork socialNetwork = group.getSocialNetwork();
+        final AccessLists lists = socialNetwork.getAccessLists();
+        assertTrue(lists.getAdmins().includes(user.getUserGroup()));
+        assertTrue(lists.getEditors().isEmpty());
+        assertTrue(lists.getViewers().isEmpty());
+        closeTransaction();
+    }
+
+    @Test
+    public void createGroup() throws Exception {
+        final Group group = new Group("ysei", "Yellow Submarine Environmental Initiative", defLicense,
+                GroupType.PROJECT);
+        groupManager.createGroup(group, user);
+        final Group otherGroup = groupManager.findByShortName("ysei");
+
+        assertEquals(group.getLongName(), otherGroup.getLongName());
+        assertEquals(group.getShortName(), otherGroup.getShortName());
+        closeTransaction();
+    }
+
+    @Test
+    public void createGroupAndSearch() throws Exception, ParseException {
+        final Group group = new Group("ysei", "Yellow Submarine Environmental Initiative", defLicense,
+                GroupType.PROJECT);
+        groupManager.createGroup(group, user);
+        groupManager.reIndex();
+        final SearchResult<Group> result = groupManager.search("ysei");
+        assertEquals(1, result.getSize());
+        assertEquals("ysei", result.getList().get(0).getShortName());
+        rollbackTransaction();
+    }
+
+    @Test(expected = GroupNameInUseException.class)
+    public void createGroupWithExistingLongName() throws Exception {
+        final Group group = new Group("ysei", "Yellow Submarine Environmental Initiative", defLicense,
+                GroupType.PROJECT);
+        groupManager.createGroup(group, user);
+
+        final Group group2 = new Group("ysei2", "Yellow Submarine Environmental Initiative", defLicense,
+                GroupType.PROJECT);
+        group2.setDefaultLicense(defLicense);
+        groupManager.createGroup(group2, user);
+
+        rollbackTransaction();
+    }
+
+    @Test(expected = GroupNameInUseException.class)
+    public void createGroupWithExistingShortName() throws Exception {
+        final Group group = new Group("ysei", "Yellow Submarine Environmental Initiative", defLicense,
+                GroupType.PROJECT);
+        groupManager.createGroup(group, user);
+
+        final Group group2 = new Group("ysei", "Yellow Submarine Environmental Initiative 2", defLicense,
+                GroupType.PROJECT);
+        groupManager.createGroup(group2, user);
+
+        rollbackTransaction();
+    }
+
+    private void createTestGroup(final int number) throws Exception {
+        final Group g = new Group("ysei" + number, "Yellow Submarine Environmental Initiative " + number, defLicense,
+                GroupType.PROJECT);
+        groupManager.createGroup(g, user);
+    }
+
+    @Test(expected = EmailAddressInUseException.class)
+    public void createUserExistingEmail() throws I18nNotFoundException, GroupNameInUseException,
+            EmailAddressInUseException {
+        final User user1 = userManager.createUser("test", "test 1 name", "test1 at example.com", "some password", "en",
+                "GB", "GMT");
+        groupManager.createUserGroup(user1);
+        final User user2 = userManager.createUser("test2", "test 2 name", "test1 at example.com", "some password", "en",
+                "GB", "GMT");
+        groupManager.createUserGroup(user2);
+    }
+
+    @Test(expected = GroupNameInUseException.class)
+    public void createUserExistingLongName() throws I18nNotFoundException, GroupNameInUseException,
+            EmailAddressInUseException {
+        final User user1 = userManager.createUser("test", "test 1 name", "test1 at example.com", "some password", "en",
+                "GB", "GMT");
+        groupManager.createUserGroup(user1);
+        final User user2 = userManager.createUser("test2", "test 1 name", "test2 at example.com", "some password", "en",
+                "GB", "GMT");
+        groupManager.createUserGroup(user2);
+    }
+
+    @Test(expected = GroupNameInUseException.class)
+    public void createUserExistingShortName() throws I18nNotFoundException, GroupNameInUseException,
+            EmailAddressInUseException {
+        final User user1 = userManager.createUser("test", "test 1 name", "test1 at example.com", "some password", "en",
+                "GB", "GMT");
+        groupManager.createUserGroup(user1);
+        final User user2 = userManager.createUser("test", "test 2 name", "test2 at example.com", "some password", "en",
+                "GB", "GMT");
+        groupManager.createUserGroup(user2);
+    }
+
+    @Test(expected = EmailAddressInUseException.class)
+    public void createUserWithExistingEmail() throws Exception {
+        final User user2 = userManager.createUser("username2", "the user name 2", USER_EMAIL, "userPassword", "en",
+                "GB", TimeZone.getDefault().getID());
+        groupManager.createUserGroup(user2);
+        rollbackTransaction();
+    }
+
+    @Test(expected = GroupNameInUseException.class)
+    public void createUserWithExistingLongName() throws Exception {
+        final User user2 = userManager.createUser("username2", USER_LONG_NAME, "email2 at example.com", "userPassword",
+                "en", "GB", TimeZone.getDefault().getID());
+        groupManager.createUserGroup(user2);
+        rollbackTransaction();
+    }
+
+    @Test(expected = GroupNameInUseException.class)
+    public void createUserWithExistingShortName() throws Exception {
+        final User user2 = userManager.createUser(USER_SHORT_NAME, "the user name 2", "email2 at example.com",
+                "userPassword", "en", "GB", TimeZone.getDefault().getID());
+        groupManager.createUserGroup(user2);
+        rollbackTransaction();
+    }
+
+    @Test(expected = UserRegistrationException.class)
+    public void createUserWithIncorrectShortName() throws Exception {
+        final User user2 = userManager.createUser("u s", "the user name 2", "email2 at example.com", "userPassword", "en",
+                "GB", TimeZone.getDefault().getID());
+        groupManager.createUserGroup(user2);
+        rollbackTransaction();
+    }
+
+    @Test(expected = InvalidStateException.class)
+    public void createUserWithVeryShortName() throws Exception {
+        final User user2 = userManager.createUser("us", "the user name 2", "email2 at example.com", "userPassword", "en",
+                "GB", TimeZone.getDefault().getID());
+        groupManager.createUserGroup(user2);
+        rollbackTransaction();
+    }
+
+    @Test
+    public void groupSearchPagination() throws Exception, ParseException {
+        for (int i = 1; i < 10; i++) {
+            createTestGroup(i);
+        }
+        groupManager.reIndex();
+        final SearchResult<Group> result = groupManager.search("Yellow", 0, 5);
+        assertEquals(9, result.getSize());
+        assertEquals(5, result.getList().size());
+        final SearchResult<Group> result2 = groupManager.search("Yellow", 5, 5);
+        assertEquals(9, result2.getSize());
+        assertEquals(4, result2.getList().size());
+        rollbackTransaction();
+    }
+}

Copied: trunk/src/test/java/cc/kune/core/server/manager/I18nManagerTest.java (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/manager/I18nManagerTest.java)
===================================================================
--- trunk/src/test/java/cc/kune/core/server/manager/I18nManagerTest.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/core/server/manager/I18nManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,179 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.HashMap;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import cc.kune.core.server.PersistenceTest;
+import cc.kune.core.server.manager.I18nCountryManager;
+import cc.kune.core.server.manager.I18nLanguageManager;
+import cc.kune.core.server.manager.I18nTranslationManager;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.domain.I18nCountry;
+import cc.kune.domain.I18nLanguage;
+import cc.kune.domain.I18nTranslation;
+
+import com.google.inject.Inject;
+
+public class I18nManagerTest extends PersistenceTest {
+    @Inject
+    I18nTranslationManager translationManager;
+    @Inject
+    I18nCountryManager countryManager;
+    @Inject
+    I18nLanguageManager languageManager;
+    @Inject
+    I18nTranslationService translationService;
+
+    @Test
+    public void byDefaultUseEnglish() {
+        HashMap<String, String> map = translationManager.getLexicon("en");
+        HashMap<String, String> map2 = translationManager.getLexicon("af");
+        assertEquals(map.size(), map2.size());
+    }
+
+    @After
+    public void close() {
+        if (getTransaction().isActive()) {
+            getTransaction().rollback();
+        }
+    }
+
+    @Test
+    public void getNonExistentTranslationInAnyLangReturnsKey() {
+        HashMap<String, String> map = translationManager.getLexicon("en");
+        HashMap<String, String> map2 = translationManager.getLexicon("aa");
+        int initialSize = map.size();
+        int initialSize2 = map2.size();
+
+        String translation = translationManager.getTranslation("es", "Foo foo foo");
+        String translation2 = translationManager.getTranslation("aa", "Foo foo foo");
+
+        assertEquals(I18nTranslation.UNTRANSLATED_VALUE, translation);
+        assertEquals(I18nTranslation.UNTRANSLATED_VALUE, translation2);
+
+        map = translationManager.getLexicon("en");
+        map2 = translationManager.getLexicon("aa");
+        int newSize = map.size();
+        int newSize2 = map2.size();
+
+        assertEquals(initialSize + 1, newSize);
+        assertEquals(initialSize2 + 1, newSize2);
+    }
+
+    @Test
+    public void getNonExistentTranslationReturnsDefaultLanguage() {
+        String translation = translationManager.getTranslation("af", "January [month]");
+        assertEquals("January", translation);
+    }
+
+    @Test
+    public void getTranslation() {
+        String translation = translationManager.getTranslation("af", "Sunday [weekday]");
+        assertEquals("Sondag", translation);
+    }
+
+    @Test
+    public void getTranslationUTF8() {
+        String translation = translationManager.getTranslation("el", "January [month]");
+        assertEquals("Ιανουάριος", translation);
+    }
+
+    @Test
+    public void getTranslationWithIntArg() {
+        String translation = translationManager.getTranslation("en", "[%d] users", 20);
+        assertEquals("20 users", translation);
+    }
+
+    @Test
+    public void getTranslationWithIntArgFromService() {
+        String translation = translationService.t("[%d] users", 20);
+        assertEquals("20 users", translation);
+    }
+
+    @Test
+    public void getTranslationWithIntArgFromWithNtService() {
+        String translation = translationService.tWithNT("[%d] users", "foo foo", 20);
+        assertEquals("20 users", translation);
+    }
+
+    @Test
+    public void getTranslationWithStringArg() {
+        String translation = translationManager.getTranslation("en", "[%s] users", "Twenty");
+        assertEquals("Twenty users", translation);
+    }
+
+    @Test
+    public void getTranslationWithStringArgFromService() {
+        String translation = translationService.t("[%s] users", "Twenty");
+        assertEquals("Twenty users", translation);
+    }
+
+    @Test
+    public void getTranslationWithStringArgWithNtFromService() {
+        String translation = translationService.tWithNT("[%s] users", "foo foo", "Twenty");
+        assertEquals("Twenty users", translation);
+    }
+
+    @Before
+    public void insertData() {
+        openTransaction();
+        I18nLanguage english = new I18nLanguage(Long.valueOf(1819), "English", "English", "en");
+        I18nLanguage spanish = new I18nLanguage(Long.valueOf(5889), "Spanish", "Español", "es");
+        I18nLanguage afrikaans = new I18nLanguage(Long.valueOf(114), "Afrikaans", "Afrikaans", "af");
+        I18nLanguage greek = new I18nLanguage(Long.valueOf(1793), "Greek", "Ελληνικά", "el");
+        languageManager.persist(english);
+        languageManager.persist(spanish);
+        languageManager.persist(afrikaans);
+        languageManager.persist(greek);
+        translationManager.persist(new I18nTranslation("Sunday [weekday]", english, "Sunday"));
+        translationManager.persist(new I18nTranslation("January [month]", english, "January"));
+        translationManager.persist(new I18nTranslation("Sunday [weekday]", afrikaans, "Sondag"));
+        translationManager.persist(new I18nTranslation("January [month]", greek, "Ιανουάριος"));
+        translationManager.persist(new I18nTranslation(StringEscapeUtils.escapeHtml("[%s] users"), english,
+                StringEscapeUtils.escapeHtml("[%s] users")));
+        translationManager.persist(new I18nTranslation(StringEscapeUtils.escapeHtml("[%d] users"), english,
+                StringEscapeUtils.escapeHtml("[%d] users")));
+        I18nCountry gb = new I18nCountry(Long.valueOf(75), "GB", "GBP", ".", "£%n", "", ".", "United Kingdom",
+                "western", ",");
+        countryManager.persist(gb);
+    }
+
+    @Test
+    public void setTranslation() {
+        translationManager.setTranslation("en", "Foo foo foo", "Foo foo foo translation");
+        String translation = translationManager.getTranslation("en", "Foo foo foo");
+        assertEquals("Foo foo foo translation", translation);
+    }
+
+    @Test
+    public void testGetLexicon() {
+        HashMap<String, String> map = translationManager.getLexicon("af");
+        assertTrue(map.size() > 0);
+    }
+}

Copied: trunk/src/test/java/cc/kune/core/server/manager/LicenseManagerTest.java (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/manager/LicenseManagerTest.java)
===================================================================
--- trunk/src/test/java/cc/kune/core/server/manager/LicenseManagerTest.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/core/server/manager/LicenseManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,64 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import cc.kune.core.server.PersistenceTest;
+import cc.kune.core.server.manager.LicenseManager;
+import cc.kune.domain.License;
+import cc.kune.domain.finders.LicenseFinder;
+
+import com.google.inject.Inject;
+
+public class LicenseManagerTest extends PersistenceTest {
+    private License license;
+    @Inject
+    LicenseFinder licenseFinder;
+    @Inject
+    LicenseManager licenseManager;
+
+    @After
+    public void close() {
+        if (getTransaction().isActive()) {
+            getTransaction().rollback();
+        }
+    }
+
+    @Before
+    public void insertData() {
+        openTransaction();
+        assertEquals(0, licenseFinder.getAll().size());
+        license = new License("by", "Creative Commons Attribution", "", "http://creativecommons.org/licenses/by/3.0/",
+                true, false, false, "", "");
+        licenseManager.persist(license);
+    }
+
+    @Test
+    public void testLicenseCreation() {
+        assertNotNull(license.getId());
+        assertEquals(1, licenseFinder.getAll().size());
+    }
+}

Copied: trunk/src/test/java/cc/kune/core/server/manager/TagManagerTest.java (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagManagerTest.java)
===================================================================
--- trunk/src/test/java/cc/kune/core/server/manager/TagManagerTest.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/core/server/manager/TagManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,64 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import cc.kune.core.server.PersistenceTest;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.manager.TagManager;
+import cc.kune.domain.Tag;
+import cc.kune.domain.finders.TagFinder;
+
+import com.google.inject.Inject;
+
+public class TagManagerTest extends PersistenceTest {
+    @Inject
+    ContentManager contentManager;
+    private Tag tag;
+    @Inject
+    TagFinder tagFinder;
+    @Inject
+    TagManager tagManager;
+
+    @After
+    public void close() {
+        if (getTransaction().isActive()) {
+            getTransaction().rollback();
+        }
+    }
+
+    @Before
+    public void insertData() {
+        openTransaction();
+        tag = new Tag("foo1");
+        tagManager.persist(tag);
+    }
+
+    @Test
+    public void testTagCreation() {
+        assertNotNull(tag.getId());
+        assertNotNull(tagFinder.findByTagName("foo1"));
+    }
+}

Copied: trunk/src/test/java/cc/kune/core/server/manager/TagUserContentTest.java (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagUserContentTest.java)
===================================================================
--- trunk/src/test/java/cc/kune/core/server/manager/TagUserContentTest.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/core/server/manager/TagUserContentTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,118 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.List;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import cc.kune.core.server.PersistencePreLoadedDataTest;
+import cc.kune.core.server.manager.TagManager;
+import cc.kune.core.server.manager.TagUserContentManagerDefault;
+import cc.kune.domain.Tag;
+import cc.kune.domain.TagUserContent;
+import cc.kune.domain.finders.TagUserContentFinder;
+
+import com.google.inject.Inject;
+
+public class TagUserContentTest extends PersistencePreLoadedDataTest {
+    private static final String DUMMY_TAG = "dummy";
+    @Inject
+    TagUserContentFinder finder;
+    @Inject
+    TagUserContentManagerDefault manager;
+
+    private Tag tag;
+    @Inject
+    TagManager tagManager;
+
+    @Before
+    public void before() {
+        tag = new Tag(DUMMY_TAG);
+        tagManager.persist(tag);
+    }
+
+    private void createSomeTagUserContent() {
+        List<Tag> tags = manager.find(user, content);
+        assertEquals(0, tags.size());
+        createTagUserContent();
+        tags = manager.find(user, content);
+        assertEquals(1, tags.size());
+    }
+
+    private TagUserContent createTagUserContent() {
+        final TagUserContent tagUC = new TagUserContent(tag, user, content);
+        manager.persist(tagUC);
+        return tagUC;
+    }
+
+    @Test
+    public void getTagsAsString() {
+        manager.setTags(user, content, DUMMY_TAG);
+        final String tagS = manager.getTagsAsString(user, content);
+        assertEquals(DUMMY_TAG, tagS);
+    }
+
+    @Test
+    public void getTagsGrouped() {
+        finder.getTagsGroups(user.getUserGroup());
+    }
+
+    @Test
+    public void insertSomeUserContent() {
+        createSomeTagUserContent();
+    }
+
+    @Test
+    public void removeSomeUserContent() {
+        createSomeTagUserContent();
+        manager.remove(user, content);
+        final List<Tag> tags = manager.find(user, content);
+        assertEquals(0, tags.size());
+    }
+
+    @Test
+    public void setTags() {
+        List<Tag> tags = manager.find(user, content);
+        assertEquals(0, tags.size());
+        manager.setTags(user, content, DUMMY_TAG + " " + DUMMY_TAG);
+        tags = manager.find(user, content);
+        assertEquals(1, tags.size());
+    }
+
+    @Test
+    public void setTagsRemoveBefore() {
+        manager.setTags(user, content, "foo");
+        manager.setTags(user, content, DUMMY_TAG);
+        final List<Tag> tags = manager.find(user, content);
+        assertEquals(1, tags.size());
+        assertEquals(DUMMY_TAG, tags.get(0).getName());
+    }
+
+    @Test
+    public void testInsertData() {
+        final TagUserContent tagUC = createTagUserContent();
+        assertNotNull(tagUC.getId());
+    }
+}

Copied: trunk/src/test/java/cc/kune/core/server/manager/UserManagerTest.java (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/manager/UserManagerTest.java)
===================================================================
--- trunk/src/test/java/cc/kune/core/server/manager/UserManagerTest.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/core/server/manager/UserManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -0,0 +1,146 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * 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 Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.server.manager;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.util.TimeZone;
+
+import javax.persistence.PersistenceException;
+
+import org.apache.lucene.queryParser.ParseException;
+import org.hibernate.validator.InvalidStateException;
+import org.junit.Test;
+
+import cc.kune.core.client.errors.GroupNameInUseException;
+import cc.kune.core.client.errors.I18nNotFoundException;
+import cc.kune.core.server.PersistencePreLoadedDataTest;
+import cc.kune.core.server.manager.impl.SearchResult;
+import cc.kune.core.shared.domain.UserSNetVisibility;
+import cc.kune.domain.Group;
+import cc.kune.domain.User;
+
+import com.google.inject.Inject;
+
+public class UserManagerTest extends PersistencePreLoadedDataTest {
+    @Inject
+    Group groupFinder;
+
+    @Test
+    public void emailCorrect() {
+        user = new User("test1", "test1 name", "test at example.com", "some passwd", "somediggest".getBytes(),
+                "some salt".getBytes(), english, gb, getTimeZone());
+        persist(user);
+    }
+
+    @Test(expected = PersistenceException.class)
+    public void emailEmpty() {
+        user = new User("test1", "test1 name", null, "some passwd", "somediggest".getBytes(), "some salt".getBytes(),
+                english, gb, getTimeZone());
+        persist(user);
+    }
+
+    @Test(expected = InvalidStateException.class)
+    public void emailIncorrect() {
+        user = new User("test1", "test1 name", "falseEmail@", "some passwd", "somediggest".getBytes(),
+                "some salt".getBytes(), english, gb, getTimeZone());
+        persist(user);
+    }
+
+    private TimeZone getTimeZone() {
+        return TimeZone.getDefault();
+    }
+
+    @Test
+    public void loginIncorrect() {
+        final User result = userManager.login("test", "test");
+        assertNull(result);
+    }
+
+    @Test
+    public void loginWithEmailCorrect() {
+        final User result = userManager.login(USER_EMAIL, USER_PASSWORD);
+        assertNotNull(result.getId());
+    }
+
+    @Test
+    public void loginWithNickCorrect() {
+        final User result = userManager.login(USER_SHORT_NAME, USER_PASSWORD);
+        assertNotNull(result.getId());
+    }
+
+    @Test(expected = InvalidStateException.class)
+    public void passwdLengthIncorrect() {
+        user = new User("test1", "test1 name", "test at example.com", "pass", "diggest".getBytes(), "salt".getBytes(),
+                english, gb, getTimeZone());
+        persist(user);
+    }
+
+    /**
+     * This was not working:
+     * http://opensource.atlassian.com/projects/hibernate/browse/EJB-382
+     */
+    @Test(expected = GroupNameInUseException.class)
+    public void testUserExist() throws I18nNotFoundException {
+        final User user1 = userManager.createUser("test", "test 1 name", "test1 at example.com", "some password", "en",
+                "GB", "GMT");
+        persist(user1);
+        final User user2 = userManager.createUser("test", "test 1 name", "test1 at example.com", "some password", "en",
+                "GB", "GMT");
+        persist(user2);
+    }
+
+    @Test(expected = InvalidStateException.class)
+    public void userNameLengthIncorrect() {
+        user = new User("test1", "te", "test at example.com", "some passwd", "diggest".getBytes(), "salt".getBytes(),
+                english, gb, getTimeZone());
+        persist(user);
+    }
+
+    @Test
+    public void userSearch() throws Exception, ParseException {
+        userManager.reIndex();
+        final SearchResult<User> result = userManager.search(USER_SHORT_NAME);
+        assertEquals(1, result.getSize());
+        assertEquals(USER_SHORT_NAME, result.getList().get(0).getShortName());
+        rollbackTransaction();
+    }
+
+    @Test(expected = InvalidStateException.class)
+    public void userShortNameIncorrect() {
+        user = new User("test1A", "test1 name", "test at example.com", "some passwd", "diggest".getBytes(),
+                "salt".getBytes(), english, gb, getTimeZone());
+        persist(user);
+    }
+
+    @Test
+    public void visibilityPersist() {
+        user = new User("test1", "test1 name", "test at example.com", "some passwd", "somediggest".getBytes(),
+                "some salt".getBytes(), english, gb, getTimeZone());
+        for (final UserSNetVisibility visibility : UserSNetVisibility.values()) {
+            user.setSNetVisibility(visibility);
+            persist(user);
+            assertEquals(user.getSNetVisibility(), visibility);
+        }
+    }
+
+}

Copied: trunk/src/test/java/cc/kune/core/server/manager/file (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/manager/file)

Modified: trunk/src/test/java/cc/kune/core/server/manager/file/EntityLogoUploadManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/EntityLogoUploadManagerTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/manager/file/EntityLogoUploadManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import static org.junit.Assert.assertTrue;
 
@@ -31,6 +31,7 @@
 
 import cc.kune.core.client.errors.SessionExpiredException;
 import cc.kune.core.client.errors.UserMustBeLoggedException;
+import cc.kune.core.server.manager.file.EntityLogoUploadManager;
 import cc.kune.core.shared.dto.StateContainerDTO;
 
 import com.google.inject.Inject;

Modified: trunk/src/test/java/cc/kune/core/server/manager/file/FileDownloadManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManagerTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/manager/file/FileDownloadManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import static org.junit.Assert.assertEquals;
 
@@ -31,9 +31,11 @@
 import org.junit.Test;
 import org.mockito.Mockito;
 import org.ourproject.kune.platf.integration.IntegrationTestHelper;
-import org.ourproject.kune.platf.server.properties.KuneProperties;
 
 import cc.kune.core.client.services.ImageSize;
+import cc.kune.core.server.manager.file.FileDownloadManager;
+import cc.kune.core.server.manager.file.FileUtils;
+import cc.kune.core.server.properties.KuneProperties;
 import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.domain.BasicMimeType;
 import cc.kune.domain.Content;

Modified: trunk/src/test/java/cc/kune/core/server/manager/file/FileManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileManagerTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/manager/file/FileManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -28,9 +28,11 @@
 
 import org.junit.Before;
 import org.junit.Test;
-import org.ourproject.kune.platf.server.TestHelper;
-import org.ourproject.kune.platf.server.manager.FileManager;
 
+import cc.kune.core.server.TestHelper;
+import cc.kune.core.server.manager.FileManager;
+import cc.kune.core.server.manager.file.FileUtils;
+
 import com.google.inject.Inject;
 
 public class FileManagerTest {

Modified: trunk/src/test/java/cc/kune/core/server/manager/file/FileUploadManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileUploadManagerTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/manager/file/FileUploadManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -26,6 +26,7 @@
 
 import cc.kune.core.client.errors.SessionExpiredException;
 import cc.kune.core.client.errors.UserMustBeLoggedException;
+import cc.kune.core.server.manager.file.FileUploadManager;
 
 import com.google.inject.Inject;
 

Modified: trunk/src/test/java/cc/kune/core/server/manager/file/FileUtilsTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileUtilsTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/manager/file/FileUtilsTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,12 +17,14 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import static org.junit.Assert.assertEquals;
 
 import org.junit.Test;
 
+import cc.kune.core.server.manager.file.FileUtils;
+
 public class FileUtilsTest {
 
     private static final String SIMPLE_FILE_NAME = "simple file name";

Modified: trunk/src/test/java/cc/kune/core/server/manager/file/ImageUtilsDefaultTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/ImageUtilsDefaultTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/manager/file/ImageUtilsDefaultTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.file;
+package cc.kune.core.server.manager.file;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -32,6 +32,8 @@
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import cc.kune.core.server.manager.file.ImageUtilsDefault;
+
 /**
  * If you get a UnsatisfiedLinkError this is a problem with jmagick installation
  * (in debian, apt-get install libjmagick6-jni, and add

Copied: trunk/src/test/java/cc/kune/core/server/manager/impl (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl)

Modified: trunk/src/test/java/cc/kune/core/server/manager/impl/AbstractSocialNetworkManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/AbstractSocialNetworkManagerTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/manager/impl/AbstractSocialNetworkManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,15 +17,15 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import static org.junit.Assert.assertEquals;
 
 import org.junit.After;
 import org.junit.Before;
-import org.ourproject.kune.platf.server.PersistenceTest;
 import org.ourproject.kune.testhelper.ctx.DomainContext;
 
+import cc.kune.core.server.PersistenceTest;
 import cc.kune.domain.Group;
 import cc.kune.domain.User;
 

Modified: trunk/src/test/java/cc/kune/core/server/manager/impl/SocialNetworkManagerMoreTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/SocialNetworkManagerMoreTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/manager/impl/SocialNetworkManagerMoreTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -28,6 +28,7 @@
 import cc.kune.core.client.errors.AccessViolationException;
 import cc.kune.core.client.errors.AlreadyGroupMemberException;
 import cc.kune.core.client.errors.LastAdminInGroupException;
+import cc.kune.core.server.manager.impl.SocialNetworkManagerDefault;
 import cc.kune.core.shared.domain.AdmissionType;
 import cc.kune.core.shared.domain.GroupListMode;
 import cc.kune.core.shared.dto.GroupType;

Modified: trunk/src/test/java/cc/kune/core/server/manager/impl/SocialNetworkManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/impl/SocialNetworkManagerTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/manager/impl/SocialNetworkManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.manager.impl;
+package cc.kune.core.server.manager.impl;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -27,6 +27,7 @@
 
 import cc.kune.core.client.errors.AccessViolationException;
 import cc.kune.core.client.errors.AlreadyGroupMemberException;
+import cc.kune.core.server.manager.impl.SocialNetworkManagerDefault;
 import cc.kune.core.shared.domain.GroupListMode;
 
 import com.google.inject.Inject;

Copied: trunk/src/test/java/cc/kune/core/server/mapper (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/mapper)

Modified: trunk/src/test/java/cc/kune/core/server/mapper/MapperTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/mapper/MapperTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/mapper/MapperTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.mapper;
+package cc.kune.core.server.mapper;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -29,11 +29,12 @@
 
 import org.junit.Before;
 import org.junit.Test;
-import org.ourproject.kune.platf.server.TestDomainHelper;
-import org.ourproject.kune.platf.server.TestHelper;
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.state.StateContent;
 
+import cc.kune.core.server.TestDomainHelper;
+import cc.kune.core.server.TestHelper;
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.mapper.Mapper;
+import cc.kune.core.server.state.StateContent;
 import cc.kune.core.shared.domain.GroupListMode;
 import cc.kune.core.shared.domain.SocialNetworkVisibility;
 import cc.kune.core.shared.domain.UserSNetVisibility;

Copied: trunk/src/test/java/cc/kune/core/server/properties (from rev 1292, trunk/src/test/java/org/ourproject/kune/platf/server/properties)

Modified: trunk/src/test/java/cc/kune/core/server/properties/KunePropertiesTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/properties/KunePropertiesTest.java	2011-03-25 10:09:09 UTC (rev 1292)
+++ trunk/src/test/java/cc/kune/core/server/properties/KunePropertiesTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -17,12 +17,14 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  */
-package org.ourproject.kune.platf.server.properties;
+package cc.kune.core.server.properties;
 
 import static org.junit.Assert.assertEquals;
 
 import org.junit.Test;
 
+import cc.kune.core.server.properties.KunePropertiesDefault;
+
 public class KunePropertiesTest {
 
     @Test

Modified: trunk/src/test/java/cc/kune/domain/finders/TagUserContentFinderTest.java
===================================================================
--- trunk/src/test/java/cc/kune/domain/finders/TagUserContentFinderTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/cc/kune/domain/finders/TagUserContentFinderTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -22,8 +22,9 @@
 import javax.persistence.NoResultException;
 
 import org.junit.Test;
-import org.ourproject.kune.platf.server.PersistencePreLoadedDataTest;
 
+import cc.kune.core.server.PersistencePreLoadedDataTest;
+
 import com.google.inject.Inject;
 
 public class TagUserContentFinderTest extends PersistencePreLoadedDataTest {

Modified: trunk/src/test/java/org/ourproject/kune/chat/server/managers/XmppManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/chat/server/managers/XmppManagerTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/chat/server/managers/XmppManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -29,6 +29,12 @@
 import org.junit.Test;
 import org.ourproject.kune.platf.integration.IntegrationTestHelper;
 
+import cc.kune.core.server.xmpp.ChatConnection;
+import cc.kune.core.server.xmpp.ChatException;
+import cc.kune.core.server.xmpp.Room;
+import cc.kune.core.server.xmpp.RoomListener;
+import cc.kune.core.server.xmpp.XmppManager;
+
 import com.google.inject.Inject;
 
 public class XmppManagerTest {

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/DatabaseInitializationTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/DatabaseInitializationTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/DatabaseInitializationTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -29,14 +29,14 @@
 import org.junit.Test;
 import org.ourproject.kune.chat.server.ChatServerTool;
 import org.ourproject.kune.docs.server.DocumentServerTool;
-import org.ourproject.kune.platf.server.content.ContainerManager;
-import org.ourproject.kune.platf.server.content.ContentManager;
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.manager.I18nCountryManager;
-import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
-import org.ourproject.kune.platf.server.manager.I18nTranslationManager;
-import org.ourproject.kune.platf.server.manager.LicenseManager;
 
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.manager.I18nCountryManager;
+import cc.kune.core.server.manager.I18nLanguageManager;
+import cc.kune.core.server.manager.I18nTranslationManager;
+import cc.kune.core.server.manager.LicenseManager;
 import cc.kune.domain.Container;
 import cc.kune.domain.Content;
 import cc.kune.domain.Group;

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -23,11 +23,11 @@
 
 import java.io.IOException;
 
-import org.ourproject.kune.platf.server.UserSession;
-import org.ourproject.kune.platf.server.properties.DatabaseProperties;
 
 import cc.kune.core.client.errors.DefaultException;
 import cc.kune.core.client.rpcservices.UserService;
+import cc.kune.core.server.UserSession;
+import cc.kune.core.server.properties.DatabaseProperties;
 
 import com.google.inject.Inject;
 

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/IntegrationTestHelper.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -24,17 +24,17 @@
 import org.apache.commons.configuration.ConfigurationException;
 import org.ourproject.kune.chat.server.ChatServerModule;
 import org.ourproject.kune.docs.server.DocumentServerModule;
-import org.ourproject.kune.platf.server.KunePersistenceService;
-import org.ourproject.kune.platf.server.PlatformServerModule;
-import org.ourproject.kune.platf.server.TestConstants;
-import org.ourproject.kune.platf.server.init.FinderRegistry;
-import org.ourproject.kune.platf.server.properties.PropertiesFileName;
 import org.ourproject.kune.wiki.server.WikiServerModule;
 import org.waveprotocol.box.server.CoreSettings;
 import org.waveprotocol.box.server.ServerModule;
 import org.waveprotocol.box.server.persistence.PersistenceModule;
 import org.waveprotocol.wave.federation.noop.NoOpFederationModule;
 
+import cc.kune.core.server.KunePersistenceService;
+import cc.kune.core.server.PlatformServerModule;
+import cc.kune.core.server.TestConstants;
+import cc.kune.core.server.init.FinderRegistry;
+import cc.kune.core.server.properties.PropertiesFileName;
 import cc.kune.wave.server.CustomSettingsBinder;
 
 import com.google.inject.AbstractModule;

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/content/ContentServiceSaveTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/content/ContentServiceSaveTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/content/ContentServiceSaveTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -24,8 +24,8 @@
 import org.junit.Before;
 import org.junit.Test;
 import org.ourproject.kune.platf.integration.IntegrationTestHelper;
-import org.ourproject.kune.platf.server.TestDomainHelper;
 
+import cc.kune.core.server.TestDomainHelper;
 import cc.kune.core.shared.dto.StateContentDTO;
 
 public class ContentServiceSaveTest extends ContentServiceIntegrationTest {

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/kuneservice/GroupServiceTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/kuneservice/GroupServiceTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/kuneservice/GroupServiceTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -25,10 +25,10 @@
 import org.junit.Test;
 import org.ourproject.kune.platf.integration.IntegrationTest;
 import org.ourproject.kune.platf.integration.IntegrationTestHelper;
-import org.ourproject.kune.platf.server.UserSession;
 
 import cc.kune.core.client.errors.UserMustBeLoggedException;
 import cc.kune.core.client.rpcservices.GroupService;
+import cc.kune.core.server.UserSession;
 import cc.kune.core.shared.domain.AdmissionType;
 import cc.kune.core.shared.dto.GroupDTO;
 import cc.kune.core.shared.dto.GroupType;

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/site/SiteServiceTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/site/SiteServiceTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/site/SiteServiceTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -29,10 +29,10 @@
 import org.junit.Test;
 import org.ourproject.kune.platf.integration.IntegrationTest;
 import org.ourproject.kune.platf.integration.IntegrationTestHelper;
-import org.ourproject.kune.platf.server.UserSession;
-import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
 
 import cc.kune.core.client.rpcservices.SiteService;
+import cc.kune.core.server.UserSession;
+import cc.kune.core.server.manager.I18nLanguageManager;
 import cc.kune.core.shared.dto.InitDataDTO;
 import cc.kune.core.shared.dto.LicenseDTO;
 import cc.kune.domain.Group;

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/site/UserServiceTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/site/UserServiceTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/site/UserServiceTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -29,16 +29,16 @@
 import org.junit.Test;
 import org.ourproject.kune.platf.integration.IntegrationTest;
 import org.ourproject.kune.platf.integration.IntegrationTestHelper;
-import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
-import org.ourproject.kune.platf.server.mapper.Mapper;
-import org.ourproject.kune.platf.server.properties.DatabaseProperties;
-import org.ourproject.kune.platf.server.users.UserInfo;
-import org.ourproject.kune.platf.server.users.UserInfoService;
 
 import cc.kune.core.client.errors.EmailAddressInUseException;
 import cc.kune.core.client.errors.GroupNameInUseException;
 import cc.kune.core.client.errors.SessionExpiredException;
 import cc.kune.core.client.rpcservices.UserService;
+import cc.kune.core.server.manager.I18nLanguageManager;
+import cc.kune.core.server.mapper.Mapper;
+import cc.kune.core.server.properties.DatabaseProperties;
+import cc.kune.core.server.users.UserInfo;
+import cc.kune.core.server.users.UserInfoService;
 import cc.kune.core.shared.domain.UserSNetVisibility;
 import cc.kune.core.shared.dto.GroupDTO;
 import cc.kune.core.shared.dto.I18nCountryDTO;

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/socialnet/SocialNetworkMembersTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/socialnet/SocialNetworkMembersTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/socialnet/SocialNetworkMembersTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -27,10 +27,10 @@
 import org.junit.Test;
 import org.ourproject.kune.platf.integration.IntegrationTest;
 import org.ourproject.kune.platf.integration.IntegrationTestHelper;
-import org.ourproject.kune.platf.server.UserSession;
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.manager.SocialNetworkManager;
 
+import cc.kune.core.server.UserSession;
+import cc.kune.core.server.manager.GroupManager;
+import cc.kune.core.server.manager.SocialNetworkManager;
 import cc.kune.domain.Group;
 
 import com.google.inject.Inject;

Modified: trunk/src/test/java/org/ourproject/kune/platf/integration/socialnet/SocialNetworkServiceTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/integration/socialnet/SocialNetworkServiceTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/integration/socialnet/SocialNetworkServiceTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -25,11 +25,11 @@
 import org.junit.Test;
 import org.ourproject.kune.platf.integration.IntegrationTest;
 import org.ourproject.kune.platf.integration.IntegrationTestHelper;
-import org.ourproject.kune.platf.server.UserSession;
 
 import cc.kune.core.client.errors.AlreadyUserMemberException;
 import cc.kune.core.client.errors.UserMustBeLoggedException;
 import cc.kune.core.client.rpcservices.SocialNetworkService;
+import cc.kune.core.server.UserSession;
 import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.core.shared.dto.SocialNetworkDataDTO;
 

Deleted: trunk/src/test/java/org/ourproject/kune/platf/server/PersistencePreLoadedDataTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/PersistencePreLoadedDataTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/PersistencePreLoadedDataTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,122 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.TimeZone;
-
-import org.junit.After;
-import org.junit.Before;
-import org.ourproject.kune.docs.server.DocumentServerTool;
-import org.ourproject.kune.platf.server.content.ContainerManager;
-import org.ourproject.kune.platf.server.content.ContentManager;
-import org.ourproject.kune.platf.server.manager.GroupManager;
-import org.ourproject.kune.platf.server.manager.I18nCountryManager;
-import org.ourproject.kune.platf.server.manager.I18nLanguageManager;
-import org.ourproject.kune.platf.server.manager.LicenseManager;
-import org.ourproject.kune.platf.server.manager.UserManager;
-
-import cc.kune.domain.Container;
-import cc.kune.domain.Content;
-import cc.kune.domain.I18nCountry;
-import cc.kune.domain.I18nLanguage;
-import cc.kune.domain.License;
-import cc.kune.domain.User;
-import cc.kune.domain.finders.GroupFinder;
-import cc.kune.domain.finders.LicenseFinder;
-import cc.kune.domain.finders.UserFinder;
-
-import com.google.inject.Inject;
-
-public abstract class PersistencePreLoadedDataTest extends PersistenceTest {
-    protected static final String USER_EMAIL = "useremail at example.com";
-    protected static final String USER_LONG_NAME = "the user long name";
-    protected static final String USER_PASSWORD = "userPassword";
-    protected static final String USER_SHORT_NAME = "usershortname";
-
-    protected Container container;
-    @Inject
-    protected ContainerManager containerManager;
-    protected Content content;
-    @Inject
-    protected ContentManager contentManager;
-    @Inject
-    protected I18nCountryManager countryManager;
-    protected License defLicense;
-    protected I18nLanguage english;
-    protected I18nCountry gb;
-    @Inject
-    protected GroupFinder groupFinder;
-    @Inject
-    protected GroupManager groupManager;
-    @Inject
-    protected I18nLanguageManager languageManager;
-
-    @Inject
-    protected LicenseFinder licenseFinder;
-    @Inject
-    protected LicenseManager licenseManager;
-    // @Inject
-    // protected PropertyGroupManager propGroupManager;
-    protected User user;
-    @Inject
-    protected UserFinder userFinder;
-    @Inject
-    protected UserManager userManager;
-
-    public PersistencePreLoadedDataTest() {
-    }
-
-    @After
-    public void close() {
-        if (getTransaction().isActive()) {
-            getTransaction().rollback();
-        }
-    }
-
-    @Before
-    public void preLoadData() throws Exception {
-        openTransaction();
-        assertEquals(0, userFinder.getAll().size());
-        assertEquals(0, groupFinder.getAll().size());
-        assertEquals(0, licenseFinder.getAll().size());
-        // final PropertyGroup groupProps = new PropertyGroup(Group.PROPS_ID);
-        // final PropertyGroup userProps = new PropertyGroup(User.PROPS_ID);
-        // propGroupManager.persist(userProps);
-        // propGroupManager.persist(groupProps);
-        english = new I18nLanguage(Long.valueOf(1819), "English", "English", "en");
-        languageManager.persist(english);
-        gb = new I18nCountry(Long.valueOf(75), "GB", "GBP", ".", "£%n", "", ".", "United Kingdom", "western", ",");
-        countryManager.persist(gb);
-        user = userManager.createUser(USER_SHORT_NAME, USER_LONG_NAME, USER_EMAIL, USER_PASSWORD, "en", "GB",
-                TimeZone.getDefault().getID());
-        defLicense = new License("by-sa-v3.0", "Creative Commons Attribution-ShareAlike", "",
-                "http://creativecommons.org/licenses/by-sa/3.0/", true, true, false, "", "");
-        licenseManager.persist(defLicense);
-        groupManager.createUserGroup(user, true);
-        content = new Content();
-        content.setLanguage(english);
-        contentManager.persist(content);
-        container = new Container();
-        container.setTypeId(DocumentServerTool.TYPE_FOLDER);
-        containerManager.persist(container);
-    }
-}

Deleted: trunk/src/test/java/org/ourproject/kune/platf/server/PersistenceTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/PersistenceTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/PersistenceTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,93 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityTransaction;
-
-import org.junit.Before;
-
-import com.google.inject.Inject;
-import com.google.inject.Injector;
-import com.google.inject.Provider;
-import com.google.inject.persist.PersistService;
-import com.google.inject.persist.Transactional;
-
-public abstract class PersistenceTest {
-    private final String persistenceUnit;
-    private final String propetiesFileName;
-    @Inject
-    Provider<EntityManager> provider;
-
-    public PersistenceTest() {
-        // test: use memory
-        // test_db: use mysql
-        // Also configurable ein TestHelper
-        this(TestConstants.PERSISTENCE_UNIT, "kune.properties");
-    }
-
-    public PersistenceTest(final String persistenceUnit, final String propetiesFileName) {
-        this.persistenceUnit = persistenceUnit;
-        this.propetiesFileName = propetiesFileName;
-    }
-
-    public void closeTransaction() {
-        getManager().getTransaction().commit();
-    }
-
-    protected EntityManager getManager() {
-        return provider.get();
-    }
-
-    public EntityTransaction getTransaction() {
-        return getManager().getTransaction();
-    }
-
-    public EntityManager openTransaction() {
-        final EntityManager manager = getManager();
-        final EntityTransaction transaction = manager.getTransaction();
-        transaction.begin();
-        return manager;
-    }
-
-    public void persist(final Object... entities) {
-        for (final Object entity : entities) {
-            getManager().persist(entity);
-        }
-    }
-
-    @Transactional
-    @Before
-    public void prepare() {
-        final Injector injector = TestHelper.create(new PlatformServerModule(), persistenceUnit, propetiesFileName);
-        final PersistService persistence = injector.getInstance(PersistService.class);
-        // To Debug insert breakpoint here
-        persistence.start();
-        injector.injectMembers(this);
-    }
-
-    public void rollbackTransaction() {
-        final EntityTransaction transaction = getManager().getTransaction();
-        if (transaction.isActive()) {
-            transaction.rollback();
-        }
-    }
-
-}

Deleted: trunk/src/test/java/org/ourproject/kune/platf/server/TestConstants.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/TestConstants.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/TestConstants.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,12 +0,0 @@
-package org.ourproject.kune.platf.server;
-
-public final class TestConstants {
-    // test: use memory
-    // test_db: use mysql
-    // public static final String PERSISTENCE_UNIT = "test_db";
-    public static final String PERSISTENCE_UNIT = "test";
-    public static final String WAVE_TEST_PROPFILE = "wave-server-testing.properties";
-
-    private TestConstants() {
-    }
-}

Deleted: trunk/src/test/java/org/ourproject/kune/platf/server/TestDomainHelper.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/TestDomainHelper.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/TestDomainHelper.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,259 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server;
-
-import java.util.TimeZone;
-
-import cc.kune.core.shared.domain.AdmissionType;
-import cc.kune.domain.AccessLists;
-import cc.kune.domain.Container;
-import cc.kune.domain.Content;
-import cc.kune.domain.Group;
-import cc.kune.domain.Revision;
-import cc.kune.domain.SocialNetwork;
-import cc.kune.domain.User;
-
-public abstract class TestDomainHelper {
-
-    public static AccessLists createAccessLists(final Group groupAdmin, final Group groupEditor, final Group groupViewer) {
-
-        final AccessLists lists = new AccessLists();
-        if (groupAdmin != null) {
-            lists.addAdmin(groupAdmin);
-        }
-        if (groupEditor != null) {
-            lists.addEditor(groupEditor);
-        }
-        if (groupViewer != null) {
-            lists.addViewer(groupViewer);
-        }
-        return lists;
-    }
-
-    public static String createBigText() {
-        final String text = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce leo felis, cursus eget, scelerisque adipiscing, fringilla vel, sem. Vestibulum semper tristique sem. Etiam quam neque, consectetuer at, fermentum id, vulputate non, leo. Ut condimentum, mauris et sollicitudin faucibus, lectus arcu facilisis mi, eu pretium arcu tortor quis sem. Pellentesque sit amet nulla ut tellus dapibus blandit. Donec eu dolor vitae mi scelerisque pretium. Donec sit amet nunc ut risus laoreet porta. Integer dictum mi at mauris. Vivamus vulputate, dolor quis pharetra interdum, augue nisi congue eros, a consectetuer libero mi ut quam. Fusce commodo sem blandit massa. Phasellus vehicula varius felis.\n"
-                + "\n"
-                + "Aenean tempus. Ut vel elit a nisl adipiscing commodo. Suspendisse nibh. Praesent pellentesque. Curabitur fringilla tempor justo. Suspendisse bibendum faucibus ipsum. Aenean porta elementum pede. Sed vel odio et metus egestas ultrices. Nulla facilisi. Sed blandit fermentum purus. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam adipiscing. Suspendisse dapibus, est porta vehicula auctor, diam orci scelerisque risus, eu condimentum enim pede ut turpis. Nullam turpis. Aliquam erat volutpat. Integer vitae magna. Mauris sit amet turpis.\n"
-                + "\n"
-                + "Suspendisse potenti. Proin ac felis nec justo bibendum tempus. Donec at nunc et leo aliquet vestibulum. Mauris a justo nec orci ultrices placerat. Etiam tempus commodo dolor. Proin at justo blandit mauris vestibulum hendrerit. Donec mollis pede nec orci. Donec mauris. Quisque adipiscing facilisis ante. Aliquam elit quam, vulputate sit amet, posuere a, suscipit nec, nunc. Etiam vehicula ullamcorper metus. Mauris nec diam a arcu porta lobortis.\n"
-                + "\n"
-                + "Cras dapibus justo sed lacus. Ut ultrices, massa malesuada vestibulum rhoncus, eros sem fringilla sem, vel ultricies eros arcu vel augue. Ut vehicula nibh at lacus. Integer interdum turpis vitae arcu tempus luctus. Praesent a ligula. Donec viverra vestibulum est. Donec ultricies blandit mi. Morbi eleifend, nisi quis tristique pretium, lacus enim luctus nisi, quis lacinia ligula quam a orci. Praesent vel lectus. Pellentesque molestie ante sed leo. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ultrices. Etiam augue. Morbi non purus. Nam libero ligula, lacinia at, rhoncus tincidunt, porttitor quis, leo.\n"
-                + "\n"
-                + "Nulla orci purus, laoreet vel, facilisis ac, rhoncus eu, dui. Phasellus sit amet urna quis dui tempor elementum. Curabitur at magna. In hac habitasse platea dictumst. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nullam in dui. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vestibulum lacinia lectus eleifend mauris. Proin pellentesque tellus sit amet eros. Nulla purus mi, aliquam ac, faucibus a, varius viverra, enim. Vestibulum porttitor, arcu in molestie tristique, tellus velit imperdiet risus, dignissim sollicitudin pede ante sed orci. Nunc in elit. Aliquam adipiscing turpis condimentum tortor. Quisque tellus dolor, tincidunt eu, vehicula rutrum, tristique a, ipsum. Fusce a nunc at ligula egestas sodales. Maecenas molestie, arcu ac ullamcorper ornare, sem nunc sollicitudin velit, id tempor est dui vel elit. Praesent quam quam, vehicula a, mollis et, tincidunt a, nisi. Aliquam justo nibh, faucibus porta, convallis eu, sagittis eget, leo. Praesent at nisi. Nullam scelerisque.\n"
-                + "\n"
-                + "Nunc felis. Vestibulum imperdiet sem. Proin posuere, mauris sit amet molestie pharetra, purus turpis vulputate purus, et blandit ante urna non est. Morbi ligula turpis, faucibus fermentum, auctor a, euismod sit amet, lectus. Cras lacinia, purus et rutrum suscipit, pede odio facilisis dolor, nonummy commodo nunc sapien eu lectus. Proin egestas. Nam sodales aliquam eros. Ut lorem est, porttitor vel, dapibus a, tristique nec, diam. Ut non nulla eu nisi rhoncus lacinia. Ut ornare, sem non molestie condimentum, nisi risus iaculis sem, ac aliquet dui sem vel augue. Nullam varius pellentesque sem. Nulla facilisi.\n"
-                + "\n"
-                + "Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fringilla erat at diam. Suspendisse tincidunt. Nullam pharetra, nibh eget varius tempus, arcu massa dignissim justo, et scelerisque nisi velit commodo orci. Morbi sed nisi eu mi ultrices interdum. Cras in urna a elit sollicitudin consequat. Maecenas vel diam vitae dolor aliquam faucibus. Maecenas mattis, sem a iaculis auctor, est felis sagittis sapien, ut imperdiet diam nisi a nisl. Vestibulum rutrum nisl eget ante. Nulla non urna. In tellus urna, dignissim a, auctor in, pharetra eget, massa. Nam a magna. Ut id elit sit amet risus auctor laoreet. Quisque et urna. Praesent vehicula, nibh ac euismod rhoncus, ligula diam pharetra eros, ac sollicitudin elit odio a nunc. Quisque augue. Nulla pellentesque rhoncus leo. Proin sagittis erat.\n"
-                + "\n"
-                + "Donec fringilla. Mauris ultricies gravida pede. Nullam non urna et quam dignissim egestas. Mauris in nulla. Duis ac ligula non nulla sodales hendrerit. Aliquam condimentum lectus ac turpis. Etiam venenatis lacus vel sem. Proin convallis scelerisque diam. Suspendisse sed lacus a felis pretium rhoncus. Mauris at tortor ac libero euismod porttitor. Maecenas euismod. Etiam id orci. Donec consectetuer gravida lacus. Vivamus bibendum nisi ut felis. Phasellus ac nisl. Praesent lorem sapien, ultricies eget, accumsan a, viverra ut, magna. Integer lobortis leo vitae nunc. Sed vulputate justo eu sem. Proin et augue.\n"
-                + "\n"
-                + "Suspendisse pellentesque suscipit lectus. Fusce ut odio a turpis eleifend viverra. Vestibulum nisl. Aliquam sed turpis at ante pulvinar cursus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec sodales odio sagittis lorem. Duis mattis gravida odio. Cras mattis iaculis risus. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed iaculis laoreet elit. Cras ut tortor. Suspendisse eget nisi. Suspendisse ligula tellus, scelerisque a, consectetuer quis, tristique vel, arcu. Morbi varius, ligula et hendrerit iaculis, lorem purus luctus ipsum, eu interdum urna lorem id pede. Mauris est. In posuere dolor ac ipsum. Curabitur dictum. Vestibulum imperdiet. Pellentesque imperdiet aliquet dolor. Sed vulputate, enim at pulvinar sodales, felis libero malesuada felis, in iaculis odio mauris id neque.\n"
-                + "\n"
-                + "Pellentesque adipiscing. Nam ac neque sagittis nunc posuere fermentum. Sed quis orci vel enim commodo scelerisque. Ut aliquam. Quisque vitae tortor. Morbi libero augue, interdum et, nonummy ac, mattis vel, nisl. Suspendisse elit. Curabitur suscipit leo dignissim tellus. Proin felis massa, ultricies nec, fermentum sit amet, sollicitudin dignissim, mi. Maecenas ipsum ligula, tincidunt vitae, varius a, consequat ac, ligula. Suspendisse et urna. Phasellus consequat luctus arcu. Morbi molestie. Vivamus ligula. Mauris mollis.\n"
-                + "\n"
-                + "In nonummy iaculis leo. Sed vitae metus. Morbi vel eros in dolor accumsan pellentesque. In ut velit. Duis in tortor non enim ultricies scelerisque. Pellentesque ultrices dui a magna. In cursus pede non lorem. Vivamus nisl. Morbi ut tortor eu justo cursus dictum. Integer condimentum. Vivamus nisl risus, euismod id, molestie ut, feugiat nec, magna. Vivamus viverra sodales purus. Ut nunc. Vivamus dignissim sollicitudin nunc. Nulla tempor, diam ut viverra tincidunt, nisl orci sollicitudin lectus, eu dignissim tellus justo eu erat. Phasellus lobortis risus id libero. Ut faucibus diam ac justo. Duis neque magna, auctor eu, suscipit sit amet, tempor faucibus, lacus. Nunc mauris velit, feugiat sit amet, venenatis id, euismod ac, risus. Sed nisl lorem, eleifend et, scelerisque vel, imperdiet vitae, quam.\n"
-                + "\n"
-                + "Integer egestas dolor a purus. Ut quam dolor, elementum at, tincidunt venenatis, dapibus sollicitudin, ligula. Morbi luctus diam eget neque. Duis iaculis. Aliquam vel tellus auctor ipsum elementum hendrerit. In euismod ante tincidunt risus. Maecenas ac lorem sed magna volutpat gravida. Aliquam et sapien sed pede tristique vehicula. Cras et tellus. Nunc massa sem, aliquet a, sollicitudin vitae, malesuada vel, dolor. Suspendisse dui. Mauris purus. Maecenas egestas orci ut quam. Sed semper. Nullam feugiat. Ut aliquet, tellus quis aliquam viverra, orci velit viverra odio, vel adipiscing odio ligula in lorem. Sed ac sem vitae nibh pretium dapibus. Donec ac diam. Integer ultrices massa ut diam. Duis pretium posuere arcu.\n"
-                + "\n"
-                + "Morbi lorem. Fusce luctus lorem in risus gravida gravida. Donec vulputate volutpat metus. Pellentesque ac massa vitae orci placerat pellentesque. In hac habitasse platea dictumst. Curabitur pretium, ipsum in consequat tempor, ligula est volutpat nibh, eget porta diam massa ac leo. Curabitur placerat massa vel nibh. Nam at quam. In sagittis augue ac leo. Fusce adipiscing, ligula in auctor molestie, libero felis mattis sem, sit amet faucibus mauris nunc ac metus. Vivamus neque ipsum, bibendum sit amet, fringilla sit amet, bibendum ut, massa. Maecenas bibendum. Vivamus nunc est, accumsan et, tempus vitae, sagittis in, erat. Fusce turpis nunc, pretium vitae, varius sit amet, dignissim et, tortor. Quisque egestas, libero in dapibus tincidunt, justo arcu feugiat massa, sed sollicitudin lectus tellus sit amet augue. Vestibulum tristique nibh eget lorem. Curabitur cursus purus tristique nulla.\n"
-                + "\n"
-                + "Etiam blandit, arcu eu aliquam ornare, velit libero faucibus felis, sit amet sollicitudin velit leo in elit. Sed turpis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec eu risus. Sed risus lorem, luctus mattis, scelerisque eget, tincidunt a, enim. Vivamus consequat mollis tellus. Cras urna lorem, facilisis eu, porttitor mollis, dignissim posuere, ligula. Ut nonummy sapien. Praesent cursus. Ut turpis. Nulla enim. Aliquam aliquet, enim a gravida aliquam, pede odio porttitor nisi, non vestibulum odio erat a tortor. Donec fringilla ligula id augue. Curabitur vel tellus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur ullamcorper est vitae quam.\n"
-                + "\n"
-                + "Sed posuere neque. Vivamus tortor. Ut at mauris. Nam felis tellus, nonummy eu, gravida id, bibendum id, magna. Pellentesque laoreet mi sed felis. Fusce at lectus quis erat auctor laoreet. In interdum velit ut pede. Ut malesuada tincidunt velit. Suspendisse eu felis in mauris scelerisque iaculis. Morbi ornare dapibus risus. Quisque rhoncus elementum ante. Cras euismod nisi et lectus. Donec ut velit. Etiam a mauris. Integer cursus iaculis tellus. Fusce facilisis, nunc at semper tincidunt, dui purus accumsan nisi, in auctor magna ligula vel pede. Suspendisse ut arcu molestie lorem posuere vestibulum. Quisque pulvinar rhoncus ligula.\n"
-                + "\n"
-                + "Morbi sed enim. Donec in erat. Curabitur suscipit euismod lectus. Etiam dui nisi, volutpat vitae, tincidunt eget, tristique eget, turpis. Vivamus feugiat, quam ut tincidunt placerat, risus magna iaculis quam, id semper nisi tortor quis nibh. Donec a nulla. Aliquam turpis felis, aliquam non, ultrices eget, lacinia vel, nibh. Quisque vel nisi et eros vulputate eleifend. Aliquam nisl. Proin semper turpis. Cras ipsum.\n"
-                + "\n"
-                + "Donec scelerisque nunc non nibh. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nullam nec elit congue ligula vulputate pellentesque. Nunc ipsum. In imperdiet blandit lectus. Nulla ornare elit. Nunc at nibh at nibh semper vulputate. Cras scelerisque hendrerit erat. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vestibulum et mi. Etiam ut nisi et augue congue tempor. Curabitur nec libero non lacus congue suscipit. Nunc et metus a justo condimentum tincidunt.\n"
-                + "\n"
-                + "Phasellus ultrices placerat dui. Phasellus luctus, sem eu sagittis ultricies, massa dui eleifend libero, eu mollis urna dolor in neque. Duis pellentesque rutrum ipsum. Phasellus iaculis arcu et enim. Morbi neque. Sed felis velit, mattis sed, mollis quis, tempor sed, mi. Curabitur consequat, ipsum vel volutpat molestie, turpis dui suscipit urna, nec blandit libero pede quis leo. Sed ullamcorper luctus enim. Etiam rutrum imperdiet orci. Pellentesque pede. Nullam sollicitudin blandit quam. Pellentesque non nisi at justo venenatis pharetra. Praesent a dolor at lectus fringilla lobortis.\n"
-                + "\n"
-                + "Morbi eget dolor at mi tempus commodo. Ut accumsan convallis odio. Nam ac velit ac ligula consectetuer lacinia. Ut nibh tortor, auctor et, placerat et, rhoncus ac, ante. Nulla dignissim rhoncus quam. Vestibulum ac est. Integer pharetra, diam sed iaculis porta, turpis orci rhoncus risus, vel aliquet metus eros quis velit. Pellentesque cursus scelerisque ante. Suspendisse tempor, metus a vehicula laoreet, orci mauris tincidunt ante, vitae molestie lectus velit vel nulla. Suspendisse potenti. Morbi quis massa ac felis semper facilisis. Vivamus convallis, magna sed sollicitudin dapibus, tellus tortor congue erat, ac luctus risus mi sit amet lorem.\n"
-                + "\n"
-                + "In pellentesque libero ut lorem. Aliquam a libero eget nulla iaculis vehicula. Nullam turpis tellus, accumsan sit amet, bibendum ac, tincidunt in, libero. Mauris ac neque. Aliquam ultrices lorem id eros cursus pretium. Vivamus at elit ac felis tempor viverra. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam eget nunc. Morbi iaculis luctus massa. In turpis sapien, molestie pretium, vulputate in, facilisis sit amet, lacus. Proin tincidunt faucibus diam. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec nibh tellus, laoreet sit amet, fringilla vitae, ornare a, sapien. Praesent feugiat lobortis tellus. Nullam euismod euismod arcu. Proin a eros. Vivamus in orci. Proin nisi lacus, viverra ut, cursus lacinia, pharetra vitae, metus.\n"
-                + "\n"
-                + "Suspendisse porta risus eget lacus. Suspendisse posuere tortor non erat. Fusce fermentum. Vestibulum pulvinar, elit quis semper porta, nunc mauris dictum quam, eu adipiscing felis pede imperdiet tellus. Nulla sed eros. Sed vestibulum massa vitae purus. Aenean eu felis. Vivamus erat purus, pretium non, congue vulputate, lacinia vel, magna. Donec aliquet, lacus sit amet rhoncus lacinia, nisi tortor mollis felis, id mollis magna quam eu arcu. Morbi quis leo ac orci nonummy malesuada. Fusce iaculis tincidunt elit. Aenean vestibulum. Fusce ut diam eget lectus mattis dapibus. Nam suscipit, tellus vitae lacinia fermentum, nisi leo dignissim erat, a ultrices metus eros et enim. Curabitur congue hendrerit dui. Nulla a sem. Nam tincidunt faucibus leo.\n"
-                + "\n"
-                + "Aliquam quis ante. Sed sit amet eros nec mi aliquet mollis. Nunc libero quam, egestas et, cursus vel, congue id, metus. Etiam et lacus. Phasellus feugiat, mi vel ultrices feugiat, est risus sagittis pede, ut fringilla sem velit quis elit. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur et neque a diam sollicitudin egestas. Fusce fringilla egestas arcu. Integer congue risus quis libero. Suspendisse aliquam erat non leo. Ut tellus leo, accumsan quis, varius in, dapibus venenatis, dui. Cras mollis tincidunt nisl. Phasellus dignissim iaculis est. Morbi elit. Proin at nulla. Sed id arcu sit amet quam luctus volutpat.\n"
-                + "\n"
-                + "Vestibulum a lorem. Sed condimentum iaculis magna. Phasellus rhoncus. Vivamus malesuada, est et aliquam lobortis, dui massa vestibulum nunc, sed pellentesque mi velit ac orci. Nulla facilisi. Nunc a diam eu est iaculis lobortis. In velit sem, iaculis ut, ornare eu, eleifend at, arcu. Nulla quis metus vel neque rhoncus ultrices. Duis non ligula. Donec vitae augue et pede consectetuer egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vestibulum eu lectus eget sem sagittis congue. Donec posuere lacus et turpis. Etiam sed dolor. Nam purus turpis, vehicula eu, suscipit a, vehicula vel, justo. Nunc eros neque, dignissim vel, consectetuer eu, malesuada sed, odio. Quisque consectetuer, risus vitae vulputate viverra, velit metus accumsan velit, vitae commodo sem sapien vitae lacus. Curabitur suscipit sem ut nisl. Aliquam nec metus. Donec vel pede a velit vestibulum luctus.\n"
-                + "\n"
-                + "Morbi neque turpis, tincidunt quis, dapibus et, sollicitudin sit amet, turpis. Praesent pretium pretium neque. Donec venenatis consequat nibh. Quisque eu nisi. Quisque ultricies vulputate turpis. Praesent non lacus et augue tempor dignissim. Praesent interdum, ipsum at viverra imperdiet, odio pede tincidunt augue, sit amet auctor metus arcu eget dui. Sed pellentesque vulputate nibh. Morbi eu lacus. Cras nonummy velit in nisl.\n"
-                + "\n"
-                + "Nullam mollis, dui id imperdiet semper, felis neque lacinia odio, id congue nisi mi a arcu. Maecenas quam. Vestibulum in sapien quis sapien pretium sodales. Maecenas laoreet mauris et turpis hendrerit gravida. Integer tristique, neque in accumsan auctor, dui purus laoreet enim, id laoreet arcu est elementum justo. Quisque adipiscing, metus id consequat elementum, dui magna bibendum ligula, et lacinia risus augue vitae ante. Nullam eget lacus. Vivamus viverra. Donec dolor nunc, nonummy vitae, consectetuer ac, pulvinar sit amet, urna. Pellentesque eget arcu non nulla malesuada condimentum. Morbi sapien felis, rhoncus vel, lobortis at, scelerisque sed, quam. Suspendisse a leo non velit volutpat rhoncus. Duis tempus magna ac nisl. Fusce augue. Sed volutpat posuere erat. Cras accumsan egestas nulla. Etiam mi massa, ultrices quis, facilisis ut, venenatis nec, odio. Integer felis. Morbi ut arcu non magna rutrum eleifend.\n"
-                + "\n"
-                + "Morbi rhoncus lorem sit amet nibh. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec suscipit aliquet tortor. Mauris vel erat. Sed commodo, nisl sed convallis scelerisque, metus turpis commodo nisl, ultricies blandit pede erat nec orci. Morbi turpis mauris, laoreet quis, iaculis vitae, faucibus et, sem. Praesent condimentum lorem in lorem. Aenean elit ipsum, congue in, pellentesque in, congue vel, odio. Fusce neque neque, auctor a, lobortis nec, tincidunt a, tortor. Sed ipsum purus, condimentum nec, dictum sit amet, adipiscing ac, neque. Pellentesque ligula. Maecenas nec mi. Integer iaculis tincidunt elit. Donec commodo orci ut risus. Nunc nonummy suscipit justo. Pellentesque augue urna, blandit sit amet, dapibus quis, mollis ac, pede. Suspendisse ornare velit et metus. Duis leo libero, euismod sed, mollis at, fringilla id, risus. Cras a justo vitae ante adipiscing molestie. Nam viverra.\n"
-                + "\n"
-                + "Nam semper pede id purus. Fusce ut nibh in enim fringilla placerat. Etiam sodales urna et eros. Nulla facilisi. Sed eleifend justo vel nibh. Praesent vestibulum feugiat neque. Nunc pretium. Etiam fringilla lorem eget sapien. Morbi id nisi. Etiam vehicula. Donec nisi risus, malesuada at, consequat pellentesque, iaculis in, turpis. Etiam iaculis risus nec odio. Fusce a risus. Curabitur dui lacus, ultricies quis, pretium eget, venenatis eget, tortor. Sed et urna. Duis enim ipsum, consequat sed, aliquet in, semper ornare, nibh. Aliquam consequat erat eget leo. Nulla facilisi. Vestibulum convallis. Fusce suscipit varius est.\n"
-                + "\n"
-                + "Duis magna. Nunc adipiscing euismod orci. Integer egestas, nisl non suscipit viverra, sapien mauris tempus quam, ac hendrerit ligula nulla quis nisi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nunc eget pede ultrices elit aliquam tincidunt. Praesent nonummy. Maecenas faucibus accumsan nibh. Morbi dapibus erat. Duis feugiat, nibh nec iaculis consequat, nunc eros placerat libero, a commodo enim odio sit amet magna. Vivamus ultricies tempor lectus. Proin eros elit, aliquam ac, pharetra eget, congue nec, lorem. Suspendisse nisl lectus, gravida at, lacinia a, consequat sit amet, dolor.\n"
-                + "\n"
-                + "Sed vitae est eget eros vehicula cursus. Sed interdum orci sed orci. Ut tempus tincidunt magna. Aliquam erat volutpat. Suspendisse sed diam non mi eleifend euismod. Donec sem nunc, gravida sed, condimentum eget, tristique ac, odio. Maecenas mollis tellus eu risus. Donec tristique magna ut purus. Fusce et felis mattis turpis condimentum dignissim. Mauris sapien massa, lacinia tincidunt, vehicula in, scelerisque eget, nisl. Aliquam sed turpis interdum ligula molestie vestibulum. Nunc dolor. Sed sed tellus ac arcu egestas dapibus. Nunc magna. Curabitur non mauris. Integer quis ligula.\n"
-                + "\n"
-                + "Nulla facilisi. Vivamus at lectus in ligula fringilla posuere. Sed et metus. Curabitur sollicitudin. Praesent mi. Donec eros mi, auctor eget, accumsan vel, volutpat porta, metus. Nam molestie, nisi quis bibendum auctor, nisi risus suscipit sem, sed suscipit dolor nibh quis ante. Morbi at eros. Suspendisse rhoncus tellus at nulla. Mauris mollis orci sit amet turpis. Pellentesque tempor purus. Phasellus ultricies dictum massa. Proin nisl. Quisque eleifend dolor sit amet metus. Nulla pellentesque erat at leo dignissim suscipit. Fusce facilisis viverra quam. Duis viverra. Morbi vel eros. Curabitur nunc. Praesent id eros.\n"
-                + "\n"
-                + "Etiam at arcu ac pede lacinia pellentesque. Nullam urna magna, feugiat at, commodo nec, sollicitudin ut, diam. Nunc in urna. Phasellus congue ultricies ante. Etiam vel leo id eros tempor euismod. Vivamus sed justo. Mauris magna nulla, pretium sed, rhoncus elementum, varius in, enim. Proin sagittis nibh non mauris. Duis non pede non est interdum sagittis. Sed nulla.\n"
-                + "\n"
-                + "Integer id quam. Suspendisse ornare tortor sed ligula. Proin ac magna. Etiam dapibus ornare dui. Nullam ac felis quis lectus fermentum aliquet. Nulla sed augue et velit sollicitudin porta. Integer porttitor quam sit amet lacus. In dictum quam in nulla. Fusce euismod purus et justo. Nam sit amet mi quis orci rutrum rhoncus. Curabitur eleifend malesuada ligula. Nunc luctus auctor tellus. Phasellus pretium bibendum libero.\n"
-                + "\n"
-                + "Duis cursus, nibh quis tincidunt egestas, massa pede bibendum metus, a molestie sapien magna ac elit. Donec nunc nunc, vulputate et, sagittis in, bibendum vel, magna. Maecenas eleifend. Maecenas augue nunc, dignissim at, rhoncus at, pulvinar ut, eros. Aliquam dictum rutrum nisi. In hac habitasse platea dictumst. Aliquam justo mauris, vestibulum sed, cursus ut, suscipit ut, metus. Fusce vitae erat nec nisl posuere ultrices. Vestibulum non orci. Cras nunc lectus, aliquet a, pellentesque id, dapibus ut, felis. Sed lacinia tellus ac nunc. Vivamus massa diam, malesuada nec, convallis eget, lobortis id, nulla. Morbi bibendum, diam eu lacinia aliquet, enim risus suscipit sapien, at aliquet ligula lorem quis metus. Vestibulum euismod, lectus ac egestas facilisis, tortor dui pharetra diam, a aliquet enim ante quis neque. Praesent rhoncus ipsum non sem scelerisque vestibulum. Nullam posuere vestibulum tortor. Nulla facilisi. Aenean at urna sed odio posuere imperdiet. In semper suscipit nisl.\n"
-                + "\n"
-                + "Aliquam quam. Nullam euismod scelerisque arcu. Sed ultricies diam vitae neque. Nunc dictum. Curabitur eget tellus. Sed posuere venenatis nisl. Nulla condimentum, erat quis volutpat rutrum, pede sem mattis nisl, sit amet lacinia orci felis non nisi. Ut et turpis. Duis condimentum, eros ac rutrum pellentesque, enim tortor posuere felis, eget tempus sapien sapien id leo. Sed cursus, est sed tempus dapibus, turpis sapien tempor purus, eget rhoncus arcu diam non neque. Cras lorem. Donec posuere posuere orci. Sed nec metus id orci fringilla dictum. Curabitur ultrices viverra libero.\n"
-                + "\n"
-                + "Mauris tincidunt risus a libero. Suspendisse in nisl. Mauris id mauris. Mauris justo neque, varius tincidunt, hendrerit porttitor, ornare et, leo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Pellentesque adipiscing sapien ac sem. Fusce leo. Curabitur sit amet mauris. Suspendisse justo augue, vehicula sit amet, tincidunt id, semper vel, nisi. Curabitur tristique. Nulla facilisis. Fusce posuere, ante a vestibulum mattis, metus lectus pharetra tortor, rutrum egestas pede dui ut ligula. Aliquam lacus ligula, blandit id, aliquam at, elementum sed, felis. Nam laoreet. Vivamus a sapien. Cras quis neque. Sed est.\n"
-                + "\n"
-                + "Vestibulum id diam sit amet eros nonummy fringilla. Nullam cursus lobortis velit. In pharetra diam non augue. Duis convallis risus interdum mauris. Etiam rhoncus metus eget pede. Sed velit enim, rutrum in, tincidunt vel, pellentesque ac, elit. Vestibulum pretium mauris at magna. Suspendisse volutpat. Maecenas sit amet arcu. Fusce blandit. Mauris eget neque. Nunc semper nunc a libero. Donec enim dolor, vulputate ac, tempor sit amet, tincidunt eu, enim. Cras sagittis.\n"
-                + "\n"
-                + "Nullam commodo libero ut nunc tincidunt aliquet. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Etiam id tortor quis ipsum pretium blandit. Ut hendrerit orci ac arcu. In id leo. Suspendisse sit amet leo ut ipsum tristique venenatis. Sed in justo. Quisque feugiat. Morbi gravida arcu a orci. Maecenas in justo. Donec sodales, tortor id luctus interdum, ante lorem pretium ante, ac porttitor odio pede vitae purus. Sed iaculis pellentesque purus. Curabitur sit amet libero. Nam a metus ut tortor commodo rhoncus. Nulla suscipit. Mauris ac nibh. Suspendisse ante. Sed nonummy pede at eros. Aenean augue dui, nonummy id, ullamcorper non, dignissim non, diam. Pellentesque diam nisi, pulvinar et, mollis vel, egestas non, nibh.\n"
-                + "\n"
-                + "Phasellus tincidunt. Aliquam molestie. In tristique viverra magna. Integer consequat tempus urna. Aenean turpis orci, aliquet sit amet, mattis vitae, hendrerit eu, justo. Duis pharetra ultricies enim. Nulla facilisi. Nullam sodales, justo vel consectetuer tempor, risus est accumsan orci, non feugiat est dolor ut risus. In pharetra nunc nec urna. Donec diam sem, gravida et, pulvinar id, elementum eu, enim. Morbi porttitor. Integer quis nibh. Nulla ac nulla. Morbi massa orci, tincidunt in, porttitor a, rutrum id, magna. Phasellus vel quam. Curabitur pharetra rutrum quam. Praesent vestibulum, orci in pulvinar congue, diam justo iaculis eros, imperdiet tincidunt lorem urna quis eros. Praesent in eros at velit porttitor pretium.\n"
-                + "\n"
-                + "Fusce consectetuer mattis est. Sed non nulla. Ut auctor nisl. Pellentesque ac massa sit amet augue volutpat molestie. Aliquam in purus. Etiam vitae libero. Nunc sapien lacus, mollis ac, auctor eu, fermentum eu, ligula. Suspendisse potenti. Duis molestie pulvinar elit. Vestibulum tellus libero, ultrices vitae, blandit eget, porttitor ac, odio.\n"
-                + "\n"
-                + "Vivamus malesuada sapien sed ipsum. Aenean quis nisl quis orci suscipit placerat. Pellentesque porttitor commodo nulla. Proin quis libero. Donec congue porttitor sapien. Phasellus sed est vel ligula vulputate facilisis. Mauris sit amet diam. In quis neque id orci tempus vehicula. Suspendisse egestas feugiat neque. Ut metus leo, placerat eget, pellentesque sed, porta at, nisi. Suspendisse potenti. Phasellus ultricies justo sit amet sem. Aenean porttitor enim nec nibh. Integer sed orci.\n"
-                + "\n"
-                + "Sed dignissim, nisi eu convallis luctus, enim justo posuere mauris, quis cursus leo tortor vitae metus. Nullam nec enim a nisl aliquet aliquam. Morbi nunc nisl, sodales et, condimentum in, sagittis vel, pede. Vivamus a sem. Praesent imperdiet luctus elit. Nulla facilisi. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed ac mauris non sapien pretium consequat. Fusce ut purus. Praesent sem. Proin placerat posuere lorem. Donec vel libero. Morbi tincidunt sapien at nisl. Sed porta felis eu pede. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam scelerisque. Aenean sit amet metus. Morbi accumsan diam et neque mattis vestibulum. Suspendisse sollicitudin odio et odio. Pellentesque auctor ante non elit.\n"
-                + "\n"
-                + "Morbi eget quam eu orci lobortis blandit. Duis consequat nisi ut magna. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nam posuere, diam at pretium auctor, tortor orci mattis mi, quis bibendum leo diam sed tellus. Vestibulum rutrum nunc. Donec sapien mauris, vehicula ac, commodo ac, hendrerit ut, risus. Quisque non magna at sapien vulputate nonummy. Proin pede enim, tempus sit amet, porttitor commodo, adipiscing non, est. Nulla facilisi. Aenean condimentum ante vitae pede. Donec id tortor quis tellus dictum dictum. Sed pretium ipsum nec pede. Nunc porttitor. In auctor quam at justo. Nunc ligula arcu, bibendum ac, volutpat sed, hendrerit eu, augue. Integer molestie pede eget ipsum.\n"
-                + "\n"
-                + "Nulla faucibus urna quis purus. Sed lacinia. Phasellus sollicitudin augue quis eros. Aenean vel mauris non ipsum molestie scelerisque. Cras pharetra, ligula vel adipiscing fringilla, nunc odio nonummy sapien, nec imperdiet sem pede nec mi. Ut vehicula enim a nunc. Donec suscipit. Curabitur dapibus nisi. Aenean nunc sapien, tristique dapibus, placerat sed, venenatis sed, enim. Etiam bibendum laoreet ligula. Aliquam mauris tortor, feugiat non, consectetuer sit amet, accumsan nec, quam. Nunc quis dui. Nulla facilisi. Cras at nisl. Fusce orci. In turpis. Aliquam nisi est, pellentesque nec, rutrum vitae, commodo at, nisi.\n"
-                + "\n"
-                + "Pellentesque ligula massa, faucibus at, porta ac, cursus vitae, turpis. Nam nibh nisi, viverra sit amet, porttitor vel, molestie quis, arcu. Nullam consectetuer egestas lacus. Suspendisse potenti. Nam scelerisque eleifend nunc. Suspendisse potenti. Maecenas turpis. Nam eleifend semper augue. Praesent ante nisl, sagittis sed, rhoncus eget, scelerisque eu, felis. Nullam non urna. Vestibulum eget ante. Sed id quam. Morbi ut lacus venenatis dolor lacinia commodo. Sed tincidunt libero at elit. Vivamus vitae tortor. Suspendisse eget nisl.\n"
-                + "\n"
-                + "Suspendisse dignissim luctus nisi. Pellentesque varius. Sed gravida aliquet lorem. Phasellus ligula mi, rhoncus id, cursus et, consequat quis, ante. Etiam placerat posuere enim. Donec sed tortor eget pede gravida tristique. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas libero. Nunc a metus nec urna mollis dignissim. Cras sodales sapien ac leo. Mauris suscipit. Mauris at nisl sit amet turpis porta semper. Nullam non elit. Fusce pharetra vestibulum odio. Sed a eros id neque accumsan congue. Fusce turpis mi, volutpat a, convallis non, auctor luctus, tortor. Sed blandit, dui at egestas lobortis, ante sapien dictum quam, vel semper arcu nisi id est.\n"
-                + "\n"
-                + "Suspendisse posuere. Etiam gravida scelerisque enim. Praesent placerat. Nam ligula nunc, faucibus quis, porttitor in, molestie id, velit. Cras sed purus. Nullam in erat. Suspendisse nonummy aliquam mi. Etiam eu lorem. Fusce rhoncus mi ac lectus. Proin sed augue. Donec eu libero. Vestibulum iaculis ultrices diam. Nam tincidunt tincidunt risus. Suspendisse non ipsum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam congue erat ac nunc. Nulla interdum nisi vestibulum quam. Curabitur turpis. Praesent varius, nunc ac lacinia egestas, ante elit dictum pede, eu consequat risus ligula id lacus. Donec vel arcu ac augue feugiat posuere.\n"
-                + "\n"
-                + "Etiam tincidunt pulvinar ipsum. In sit amet nunc volutpat lorem luctus feugiat. Proin augue purus, dictum eu, posuere non, vestibulum vitae, libero. Vivamus fermentum. Sed lorem. Aliquam egestas dapibus eros. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vestibulum nec turpis non lacus feugiat auctor. Sed rhoncus libero eu eros pretium dictum. Duis sed quam. Etiam nec nulla. Morbi elit metus, pulvinar quis, condimentum tristique, egestas eu, lorem. Nam turpis. Sed tincidunt, justo varius nonummy vestibulum, ante odio ultricies diam, sed ullamcorper pede turpis eu elit. Integer sit amet arcu. Sed lorem. Quisque vehicula erat vitae sem. Nunc consectetuer tellus sed neque. Nullam fringilla.\n"
-                + "\n"
-                + "Etiam tempus bibendum sem. Morbi nunc orci, molestie at, pretium non, blandit vitae, justo. Suspendisse potenti. Nulla mollis, metus id interdum malesuada, dolor nulla iaculis ligula, nec lacinia nibh odio volutpat arcu. In hac habitasse platea dictumst. Nullam lorem turpis, mollis a, placerat sit amet, lobortis varius, lectus. Nunc viverra vulputate arcu. Donec nec urna. Vestibulum dapibus, metus ut molestie mollis, elit diam tempor est, eu dictum lectus est in velit. Vivamus faucibus, elit id pellentesque malesuada, purus libero porttitor turpis, vel gravida nunc ligula tempor mauris. Vestibulum suscipit lobortis libero. Vestibulum interdum, sem eget eleifend adipiscing, libero lectus aliquam odio, sed bibendum ante dui ut mi. Pellentesque scelerisque, lorem sed pulvinar eleifend, augue velit lacinia dui, nec semper nibh erat sit amet eros. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent fermentum arcu eget leo. Curabitur in felis. Curabitur sit amet massa in est cursus ultricies. Sed neque dolor, mollis vel, pulvinar ac, fermentum eget, mi.\n"
-                + "\n"
-                + "Nulla facilisi. Maecenas eros arcu, gravida vitae, commodo ac, commodo vel, mi. Suspendisse non metus. Aenean aliquet condimentum dui. Donec augue turpis, adipiscing sed, ultricies in, condimentum nec, metus. Nam sit amet pede. Morbi fringilla. Sed sollicitudin massa nec nisi. Nam ut libero. Morbi malesuada, lacus at bibendum luctus, ante diam tincidunt erat, id consectetuer eros felis ut nisi. Suspendisse ullamcorper rutrum tellus. Aenean in metus sit amet magna tempus pellentesque.\n"
-                + "\n"
-                + "Nullam venenatis tellus id pede. Nunc ac nulla a turpis bibendum laoreet. Quisque eget diam eget arcu scelerisque ultricies. Nullam faucibus accumsan ipsum. Quisque diam nisi, euismod nec, cursus at, lobortis sit amet, nunc. Quisque fermentum sapien eget nibh. Curabitur scelerisque. In hac habitasse platea dictumst. Aliquam diam dui, pharetra quis, ultrices ac, rutrum ut, mi. Praesent egestas. Cras convallis sem ac mauris. Curabitur ultrices odio pretium mi. Nam mi metus, adipiscing id, laoreet id, mattis nec, tortor. Ut sed turpis varius purus vehicula rutrum. Duis suscipit erat eget lectus. Donec feugiat varius risus. Donec facilisis dolor ut justo.\n"
-                + "\n"
-                + "Curabitur lectus nibh, congue ac, laoreet sed, vulputate ac, ipsum. Donec convallis nisl placerat augue. Proin nec felis in arcu tincidunt facilisis. Duis congue tincidunt sapien. Vivamus lobortis purus eget risus. Aenean aliquet, ipsum quis bibendum eleifend, justo dolor pellentesque justo, in elementum orci enim congue nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed sem enim, lobortis nec, interdum vitae, sollicitudin non, dolor. Sed commodo euismod orci. Maecenas vel arcu et nunc dignissim volutpat. Morbi molestie aliquam mi. Sed id neque rutrum nunc sagittis ultricies. Mauris diam magna, ullamcorper nec, tincidunt id, laoreet nec, dolor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Aliquam feugiat nisl non arcu. Nulla facilisi. In hac habitasse platea dictumst. Quisque metus.\n"
-                + "\n"
-                + "Suspendisse potenti. Cras malesuada pulvinar est. Ut nisi. Curabitur hendrerit, mauris vel laoreet dictum, quam dolor elementum orci, venenatis gravida sem erat malesuada ante. Aliquam condimentum. Suspendisse orci quam, varius in, egestas ut, mollis quis, arcu. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus sed mauris at massa interdum vulputate. Morbi rutrum ligula. Vivamus nec libero. Curabitur lacinia, lorem eget feugiat pretium, purus urna consequat leo, non bibendum dolor augue vitae quam. Proin mi nunc, feugiat nec, convallis ac, feugiat ac, mi. Praesent pulvinar. Cras cursus nisi id nulla. Integer vel magna. Cras felis. Nam id tellus ac velit interdum convallis. Cras dignissim tortor sed mi.\n"
-                + "\n"
-                + "Nunc vestibulum, tortor eu commodo facilisis, leo mi vehicula sapien, eget hendrerit ipsum odio vitae sem. Aliquam consequat augue eu ligula. Vivamus et neque. Sed sed arcu at justo placerat placerat. Donec posuere. Phasellus lacus ligula, pulvinar at, porta et, tincidunt quis, quam. Curabitur pede mauris, interdum laoreet, feugiat condimentum, mollis ut, lectus. Curabitur laoreet, quam a malesuada suscipit, tellus lorem aliquet diam, a feugiat lorem neque hendrerit risus. Etiam viverra orci vitae mauris. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque tellus augue, aliquam non, porttitor non, ornare eu, mi. Nullam blandit sagittis ante. Aliquam tincidunt, lorem ac imperdiet sodales, elit felis cursus dolor, vel interdum leo purus at tellus. Nunc viverra, dui non sagittis dapibus, justo eros accumsan massa, eu hendrerit lorem nulla ac magna. In hac habitasse platea dictumst.\n"
-                + "\n"
-                + "Ut velit risus, malesuada eget, vestibulum nec, ornare ac, ipsum. Morbi volutpat aliquet turpis. Nam enim. Nulla semper est vitae neque. Phasellus non dui. In hac habitasse platea dictumst. Morbi auctor porttitor est. Nullam non nulla quis elit eleifend porttitor. Aliquam erat volutpat. Duis erat. Cras lobortis nisl in elit. Vivamus leo. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean ac neque. Nam sem nulla, ornare quis, dictum eget, fermentum quis, lorem. In blandit lacus. Aenean in enim.\n"
-                + "\n"
-                + "Donec sit amet orci id quam rhoncus egestas. Integer metus. Vestibulum risus lorem, posuere ac, aliquam in, mollis at, lorem. Integer metus. Aliquam blandit scelerisque orci. Nulla eu ligula. Nulla nec nisi et libero cursus bibendum. Suspendisse potenti. Maecenas in massa eget tortor consectetuer scelerisque. Morbi tincidunt velit. Nam lectus purus, malesuada ac, gravida nec, sodales sed, sem. Vestibulum feugiat. Cras viverra vestibulum massa. Mauris scelerisque. Fusce ut ante ut ante molestie molestie. Praesent non arcu. Fusce auctor blandit ipsum. Nullam est.\n"
-                + "\n"
-                + "In pulvinar arcu quis ligula. Duis volutpat metus at lorem. Aenean eu urna vitae velit tempus sollicitudin. Duis erat lectus, dignissim sit amet, fermentum at, mattis at, nisi. Nunc vel libero. Nulla eget risus et dui facilisis sagittis. Donec vel est. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Sed adipiscing massa nec dolor. Morbi a ligula a ante vulputate tempor. Nullam lorem lacus, sodales gravida, scelerisque in, laoreet eu, nulla. Nam in tortor non nunc consectetuer porta. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Morbi ut diam. Proin nonummy. Pellentesque erat justo, egestas ac, sagittis id, suscipit vitae, diam. Aenean tincidunt urna sit amet urna. Donec turpis. Mauris cursus dolor a massa.\n"
-                + "\n"
-                + "Phasellus sem arcu, semper vel, eleifend eu, viverra eu, nulla. Fusce felis elit, semper cursus, ornare et, eleifend vel, pede. In est tellus, vulputate sit amet, tristique sed, imperdiet vel, lacus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam justo. Proin volutpat. Nullam vitae dui nec urna convallis euismod. Nulla facilisi. Phasellus porttitor. Aenean scelerisque dolor sed justo. In vel nisi gravida mi mollis tempus. Curabitur ante lorem, fringilla eu, laoreet vitae, ultricies id, nisi. Sed id ante. Morbi tristique, est id porta tempus, turpis ipsum porta elit, at gravida leo odio in ante. Fusce euismod.\n"
-                + "\n"
-                + "Maecenas urna quam, fringilla eu, porta eu, semper quis, dui. Nunc congue est eu ante. Donec suscipit viverra leo. Nullam tempus porttitor est. Cras eu elit eget erat consectetuer convallis. Nam tellus ligula, eleifend ultrices, consequat et, malesuada non, velit. Quisque vitae enim in elit accumsan ullamcorper. Pellentesque eget enim. Sed nonummy, orci pretium malesuada adipiscing, dolor velit bibendum pede, non tincidunt diam sapien ac nunc. Maecenas porta leo at augue.\n"
-                + "\n"
-                + "Aliquam erat volutpat. Curabitur eu arcu faucibus tellus hendrerit bibendum. Praesent orci pede, lacinia vitae, tristique vitae, suscipit non, turpis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse tincidunt laoreet sapien. Vestibulum varius neque in odio. Donec sem ipsum, egestas id, molestie sit amet, luctus eu, est. Integer leo eros, laoreet non, lacinia in, cursus nec, mi. Donec ornare velit non massa. Curabitur turpis ligula, pharetra lacinia, euismod eu, tincidunt ut, velit. Cras nec ipsum eget augue sagittis vestibulum. Cras mattis dapibus tortor. Pellentesque sit amet arcu eu quam pretium malesuada. Phasellus turpis nisi, mattis ac, gravida et, aliquam eget, tellus. Aenean quis justo eget erat congue tincidunt.\n"
-                + "\n"
-                + "Aenean non tortor ut sem facilisis blandit. Sed ante lectus, bibendum id, fermentum ac, vestibulum et, ipsum. Sed tincidunt. Ut tincidunt. In sit amet odio. Sed massa. Nullam auctor. Nam lacinia sem eu lorem. Nunc neque tortor, euismod ut, dictum vel, commodo vehicula, lorem. Nullam metus urna, interdum non, semper eget, sodales in, eros. Sed eget magna vel dui tincidunt iaculis. Nam faucibus justo eget nunc. Suspendisse potenti. Proin fermentum erat in orci. Suspendisse semper lorem. Fusce rhoncus nulla a sapien. Mauris turpis turpis, bibendum euismod, porttitor pretium, semper id, ante. Ut eget est vel elit tempus auctor. Morbi interdum quam. In hac habitasse platea dictumst.\n"
-                + "\n"
-                + "Praesent vel ante ac mi consectetuer accumsan. Quisque quis ipsum. Suspendisse vitae magna vitae metus congue tempus. Aenean sagittis, ante nec vehicula molestie, ligula nisl tristique justo, quis suscipit nulla urna in sapien. Pellentesque eget felis pellentesque orci dignissim interdum. Sed metus lorem, egestas quis, iaculis at, venenatis eleifend, dui. Praesent elementum porttitor lacus. Sed suscipit dui vel dolor. Sed sit amet nunc et nunc rutrum eleifend. Curabitur et ligula. Phasellus consectetuer mi ut pede. In a libero in urna blandit varius. Sed pellentesque ligula aliquet risus. Ut laoreet, eros volutpat rhoncus congue, erat felis porttitor augue, vel laoreet eros est vitae pede. Suspendisse sit amet elit. Quisque quis dui. Vivamus massa. Suspendisse quis felis. Aliquam diam enim, volutpat in, commodo pellentesque, consectetuer ut, nibh.\n"
-                + "\n"
-                + "Donec mattis. Quisque purus purus, mattis sit amet, sollicitudin at, faucibus quis, diam. Sed ut urna a arcu posuere porta. Duis feugiat massa ut pede. In hac habitasse platea dictumst. Donec lectus nisl, elementum vel, pulvinar a, bibendum at, lorem. Vestibulum non lacus. Praesent arcu. Maecenas justo. Proin vel ipsum. Etiam egestas arcu vitae nibh. Aenean vel lacus id lacus tempus hendrerit. Ut lobortis ornare nibh.\n"
-                + "\n"
-                + "Donec nonummy, massa a accumsan tristique, purus diam iaculis nibh, ut dictum lorem metus sit amet nibh. Aliquam id eros et diam congue condimentum. Vestibulum porttitor massa a purus dignissim fringilla. Curabitur lectus. Phasellus auctor tortor vitae orci. Duis ante est, hendrerit ut, commodo sit amet, scelerisque eget, arcu. Cras luctus, risus eu volutpat sagittis, sem nulla accumsan libero, nec volutpat eros dui sit amet ante. Nunc convallis purus sed nisl. Nulla rutrum. Etiam viverra, orci at facilisis pretium, odio libero sollicitudin eros, ac pharetra est diam eu orci. Cras dolor risus, porttitor eu, convallis sit amet, tincidunt a, nulla. Nunc porttitor luctus diam. Mauris erat magna, pharetra ac, pretium consequat, viverra ut, nisl. Donec blandit mollis metus. Praesent dui pede, ultricies non, pellentesque et, molestie eu, nulla.\n"
-                + "\n"
-                + "Vivamus eleifend, leo sit amet tristique elementum, urna urna sollicitudin dolor, eu egestas est enim et tellus. Maecenas congue feugiat dolor. Nullam semper. Aliquam ipsum justo, fringilla et, consequat in, malesuada id, arcu. Ut orci. Aliquam sagittis consequat urna. Nam elementum diam quis lacus. Morbi elementum adipiscing orci. Mauris eros neque, vehicula quis, egestas sit amet, imperdiet id, mi. Cras convallis nisi vitae nulla. Vestibulum at purus.\n"
-                + "\n"
-                + "Etiam quis nisi vel sapien commodo ultrices. Etiam lacus. Etiam venenatis elit nec purus. Fusce id est. Vivamus justo tellus, facilisis quis, bibendum non, lacinia eget, ante. Mauris aliquet. Suspendisse iaculis placerat purus. Aliquam erat volutpat. Quisque vel sem. Donec pulvinar, lorem id malesuada blandit, nibh diam lobortis mi, in elementum velit mi a felis. In egestas. Suspendisse pede.\n"
-                + "\n"
-                + "Curabitur eu urna eget pede placerat adipiscing. Sed adipiscing bibendum tortor. Integer justo. Fusce risus enim, hendrerit ac, pellentesque sed, egestas sed, orci. Nunc orci erat, rutrum eu, euismod quis, condimentum eget, metus. Cras tincidunt. Phasellus scelerisque. Nunc sed nulla. Aliquam et sapien ac purus faucibus tincidunt. Ut id ligula egestas enim gravida vulputate. Maecenas consequat. Etiam varius sapien id pede. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Integer cursus libero eget pede. In faucibus ultricies felis. Praesent nulla. Donec tortor.\n"
-                + "\n"
-                + "Nulla quam felis, semper pellentesque, imperdiet a, egestas ut, purus. Fusce vitae elit quis dolor hendrerit gravida. Donec vestibulum. Aenean fermentum semper libero. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla facilisi. Donec eleifend leo at sem. Vivamus consectetuer, magna et iaculis elementum, erat sapien viverra lacus, consectetuer consectetuer justo leo id nulla. Phasellus id nisl. Aliquam molestie pede sit amet nisl. Duis iaculis vehicula tellus.\n"
-                + "\n"
-                + "Donec quis ipsum eget lacus vehicula fringilla. Vivamus dui est, interdum sed, scelerisque at, rhoncus at, massa. Proin placerat sodales elit. Mauris sagittis urna et enim. Vestibulum aliquet convallis nisi. Donec auctor ullamcorper lectus. Nullam vitae purus facilisis justo condimentum malesuada. Donec dui lectus, iaculis quis, lobortis aliquam, auctor nec, lectus. Aenean vel mi. Pellentesque et arcu faucibus orci convallis ullamcorper. In consequat. Praesent lobortis faucibus leo. Duis ut justo. Morbi viverra aliquam dui. Fusce laoreet dolor porta quam. Duis molestie porttitor dui. Quisque libero sem, tempor vitae, rhoncus sed, suscipit non, ante.\n"
-                + "\n"
-                + "In accumsan. Ut metus turpis, tincidunt in, rutrum quis, ultrices feugiat, tellus. Vivamus pellentesque urna sit amet elit. Mauris iaculis dui nec massa. Duis ac sem. Suspendisse sed lorem. Etiam eget sapien. Duis adipiscing porttitor neque. Nullam nisl elit, imperdiet et, pretium et, pretium ac, velit. Aenean eu lectus. Nam suscipit blandit purus. Vestibulum vel pede sodales nisi pulvinar porta. Integer ut urna ac arcu imperdiet tempus. Etiam rutrum, quam id euismod mattis, ligula tortor imperdiet orci, nec fringilla tortor libero eu est. Nulla pretium ligula. Sed eu nisi. Proin neque lorem, suscipit euismod, vestibulum eu, pretium volutpat, elit. Aenean mauris lacus, dictum nec, vulputate et, aliquam et, mi. Praesent aliquam purus ac neque.\n"
-                + "\n"
-                + "Maecenas mollis risus eget turpis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur lacus urna, auctor in, commodo ut, blandit vitae, tellus. Nunc vitae elit. Mauris elementum arcu. Nulla facilisi. Nunc diam tellus, porttitor non, dictum id, fermentum eget, nulla. Nulla facilisis enim nec felis. Phasellus interdum, erat a fermentum mattis, urna nisl iaculis ipsum, sit amet venenatis ante massa sit amet enim. Quisque facilisis nibh. Donec sit amet mauris et nisi eleifend egestas. Suspendisse pellentesque malesuada dui. Ut vestibulum, tortor sit amet pellentesque venenatis, sem turpis scelerisque massa, ut facilisis est ipsum ut arcu. Suspendisse feugiat, enim sit amet vehicula varius, tortor justo dapibus odio, et semper magna turpis ac ligula.\n"
-                + "\n"
-                + "Pellentesque non diam. Donec vel neque vel turpis vulputate ornare. Sed porttitor mi id augue. Etiam sapien mi, lobortis sed, dapibus nec, congue at, augue. Vestibulum condimentum, leo in cursus porta, quam nisl eleifend lectus, quis mattis sapien nisl sed lacus. Morbi pellentesque viverra massa. Aenean volutpat nibh lobortis tortor. Aliquam id diam. Nulla facilisi. Etiam ipsum elit, vestibulum vitae, accumsan vitae, aliquam sit amet, odio. Donec condimentum. Phasellus sodales, nunc et ullamcorper laoreet, turpis arcu egestas pede, id pharetra ante tortor vel est. Maecenas sem. Nulla lorem massa, mollis id, malesuada eu, faucibus a, est.\n"
-                + "\n"
-                + "Curabitur molestie, nunc at aliquet tempor, risus metus adipiscing felis, vitae euismod justo felis id eros. Aenean tincidunt nunc sed eros. Nulla ac tellus. Aliquam erat volutpat. Nulla vitae felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In consectetuer posuere purus. Phasellus interdum. Ut laoreet semper nunc. Duis blandit quam a velit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Curabitur aliquam dolor et tortor. Pellentesque vulputate. Pellentesque diam purus, facilisis nec, fermentum a, consequat quis, ipsum. Ut euismod dui ut massa. Proin nonummy nisi ut pede. Pellentesque sollicitudin lectus a purus.\n"
-                + "\n"
-                + "Cras vulputate. Praesent tempus fringilla diam. Suspendisse at elit. Cras ut nulla eget mi dapibus pretium. Etiam hendrerit tortor sed lectus. Cras mauris. Nam ligula. Mauris semper, arcu ut facilisis molestie, lorem sapien iaculis quam, at dignissim sapien mauris id pede. In metus ante, porttitor id, fringilla a, adipiscing eget, nisi. Ut ornare sapien nec velit. Aenean tortor metus, pellentesque vitae, iaculis eget, imperdiet nec, turpis. Vestibulum sit amet erat ac urna auctor imperdiet. Nulla facilisi. Quisque facilisis pede vel mi consequat dignissim. Vivamus sapien.\n";
-        return text;
-    }
-
-    public static Content createDescriptor(final long id, final String title, final String content) {
-        final Content descriptor = new Content();
-        descriptor.setId(id);
-        final Revision rev = new Revision(descriptor);
-        descriptor.addRevision(rev);
-        rev.setTitle(title);
-        rev.setBody(content);
-        return descriptor;
-    }
-
-    public static Container createFolderWithId(final long id) {
-        final Container container = new Container();
-        container.setId(id);
-        return container;
-    }
-
-    public static Container createFolderWithIdAndGroupAndTool(final int i, final String groupShortName,
-            final String toolName) {
-        final Container container = createFolderWithIdAndToolName(i, toolName);
-        final Group owner = new Group();
-        owner.setShortName(groupShortName);
-        container.setOwner(owner);
-        return container;
-
-    }
-
-    public static Container createFolderWithIdAndToolName(final int i, final String toolName) {
-        final Container container = createFolderWithId(i);
-        container.setToolName(toolName);
-        return container;
-    }
-
-    public static Group createGroup(final int number) {
-        final Group group = new Group("ysei" + number, "Yellow Submarine Environmental Initiative" + number);
-        group.setId(Long.valueOf(number));
-        return group;
-    }
-
-    public static SocialNetwork createSocialNetwork(final Group groupInAdmins, final Group groupInCollab,
-            final Group groupInViewer, final Group groupInPendings) {
-
-        final SocialNetwork socialNetwork = new SocialNetwork();
-        socialNetwork.addAdmin(groupInAdmins);
-        socialNetwork.addCollaborator(groupInCollab);
-        socialNetwork.addViewer(groupInViewer);
-        socialNetwork.addPendingCollaborator(groupInPendings);
-        return socialNetwork;
-    }
-
-    public static User createUser(final int number) {
-        final String shortName = "shortname" + number;
-        final String longName = "name" + number;
-        final User user = new User(shortName, longName, "email at domain" + number, ("password" + number),
-                "diggest".getBytes(), "salt".getBytes(), null, null, TimeZone.getDefault());
-        final Group userGroup = new Group(shortName, longName);
-        userGroup.setAdmissionType(AdmissionType.Closed);
-        userGroup.setSocialNetwork(createSocialNetwork(userGroup, userGroup, userGroup, null));
-        user.setUserGroup(userGroup);
-        return user;
-    }
-}

Deleted: trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/TestHelper.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,88 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.configuration.ConfigurationException;
-import org.ourproject.kune.platf.integration.HttpServletRequestMocked;
-import org.ourproject.kune.platf.server.init.FinderRegistry;
-import org.ourproject.kune.platf.server.properties.PropertiesFileName;
-import org.waveprotocol.box.server.CoreSettings;
-import org.waveprotocol.box.server.ServerModule;
-import org.waveprotocol.box.server.authentication.AccountStoreHolder;
-import org.waveprotocol.box.server.persistence.AccountStore;
-import org.waveprotocol.box.server.persistence.PersistenceException;
-import org.waveprotocol.box.server.persistence.PersistenceModule;
-import org.waveprotocol.wave.federation.noop.NoOpFederationModule;
-
-import cc.kune.wave.server.CustomSettingsBinder;
-
-import com.google.inject.Binder;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import com.google.inject.Key;
-import com.google.inject.Module;
-import com.google.inject.Scopes;
-import com.google.inject.name.Names;
-import com.google.inject.persist.jpa.JpaPersistModule;
-import com.google.inject.servlet.RequestScoped;
-import com.google.inject.servlet.SessionScoped;
-
-public abstract class TestHelper {
-    public static Injector create(final Module module, final String persistenceUnit, final String propetiesFileName) {
-        try {
-            final Injector injector = Guice.createInjector(CustomSettingsBinder.bindSettings(
-                    TestConstants.WAVE_TEST_PROPFILE, CoreSettings.class));
-            final PersistenceModule wavePersistModule = injector.getInstance(PersistenceModule.class);
-            final NoOpFederationModule federationModule = injector.getInstance(NoOpFederationModule.class);
-            final Injector childInjector = injector.createChildInjector(wavePersistModule, new ServerModule(false),
-                    federationModule, FinderRegistry.init(new JpaPersistModule(persistenceUnit)), module, new Module() {
-                        @Override
-                        public void configure(final Binder binder) {
-                            binder.bindScope(SessionScoped.class, Scopes.SINGLETON);
-                            binder.bindScope(RequestScoped.class, Scopes.SINGLETON);
-                            binder.bindConstant().annotatedWith(PropertiesFileName.class).to(propetiesFileName);
-                            binder.bind(HttpServletRequest.class).to(HttpServletRequestMocked.class);
-                        }
-                    });
-            final AccountStore accountStore = childInjector.getInstance(AccountStore.class);
-            accountStore.initializeAccountStore();
-            AccountStoreHolder.resetForTesting();
-            AccountStoreHolder.init(accountStore,
-                    childInjector.getInstance(Key.get(String.class, Names.named(CoreSettings.WAVE_SERVER_DOMAIN))));
-            return childInjector;
-        } catch (final ConfigurationException e) {
-            e.printStackTrace();
-        } catch (final PersistenceException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    public static void inject(final Object target) {
-        // test: use memory
-        // test_db: use mysql
-        // Also configurable ein PersistenceTest
-        TestHelper.create(new PlatformServerModule(), TestConstants.PERSISTENCE_UNIT, "kune.properties").injectMembers(
-                target);
-    }
-
-}

Deleted: trunk/src/test/java/org/ourproject/kune/platf/server/manager/ContentManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/ContentManagerTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/ContentManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,121 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Ignore;
-import org.junit.Test;
-import org.ourproject.kune.docs.server.DocumentServerTool;
-import org.ourproject.kune.platf.server.PersistencePreLoadedDataTest;
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
-
-import cc.kune.domain.BasicMimeType;
-import cc.kune.domain.Content;
-
-public class ContentManagerTest extends PersistencePreLoadedDataTest {
-
-    private static final String BODY = "body";
-    private static final String MIMETYPE = "image";
-    private static final String TITLE = "title";
-
-    private void createContent() {
-        final Content cnt = contentManager.createContent(TITLE, BODY, user, container,
-                DocumentServerTool.TYPE_UPLOADEDFILE);
-        persist(cnt);
-    }
-
-    private void createContentWithMimeAndCheck(final String mimetype) {
-        final Content cnt = contentManager.createContent(TITLE, BODY, user, container,
-                DocumentServerTool.TYPE_UPLOADEDFILE);
-        cnt.setMimeType(new BasicMimeType(mimetype));
-        persist(cnt);
-        final Content newCnt = contentManager.find(cnt.getId());
-        assertEquals(mimetype, newCnt.getMimeType().toString());
-    }
-
-    @Ignore
-    @Test
-    public void testBasicBodySearch() {
-        createContent();
-        final SearchResult<Content> search = contentManager.search(BODY);
-        contentManager.reIndex();
-        assertEquals(1, search.getSize());
-    }
-
-    @Test
-    public void testBasicMimePersist() {
-        final String mimetype = "application/pdf";
-        createContentWithMimeAndCheck(mimetype);
-    }
-
-    @Test
-    public void testBasicMimePersistWithoutSubtype() {
-        final String mimetype = "application";
-        createContentWithMimeAndCheck(mimetype);
-    }
-
-    @Test
-    public void testBasicMimeSearchWithQueriesAndFields() {
-        createContentWithMimeAndCheck(MIMETYPE + "/png");
-        contentManager.reIndex();
-        final SearchResult<Content> search = contentManager.search(new String[] { MIMETYPE },
-                new String[] { "mimeType.mimetype" }, 0, 10);
-        assertEquals(1, search.getSize());
-    }
-
-    @Test
-    public void testBasicSearchWithQueriesAndFields() {
-        createContentWithMimeAndCheck(MIMETYPE);
-        final SearchResult<Content> search = contentManager.search(new String[] { BODY },
-                new String[] { "lastRevision.body" }, 0, 10);
-        contentManager.reIndex();
-        assertEquals(1, search.getSize());
-    }
-
-    @Test
-    public void testBasicTitleSearch() {
-        createContent();
-        final SearchResult<Content> search = contentManager.search(TITLE);
-        contentManager.reIndex();
-        assertEquals(1, search.getSize());
-    }
-
-    @Ignore
-    @Test
-    public void testtMimeSearch() {
-        createContentWithMimeAndCheck(MIMETYPE + "/png");
-        contentManager.reIndex();
-        final SearchResult<Content> search = contentManager.searchMime(BODY, 0, 10, "asb", MIMETYPE);
-        assertEquals(1, search.getSize());
-    }
-
-    /**
-     * This normally fails with mysql (not configured for utf-8), see the
-     * INSTALL mysql section
-     */
-    @Test
-    public void testUTF8Persist() {
-        final Content cnt = contentManager.createContent("汉语/漢語", "汉语/漢語", user, container,
-                DocumentServerTool.TYPE_DOCUMENT);
-        final Content newCnt = contentManager.find(cnt.getId());
-        assertEquals("汉语/漢語", newCnt.getTitle());
-    }
-}

Deleted: trunk/src/test/java/org/ourproject/kune/platf/server/manager/FileManagerDefaultTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/FileManagerDefaultTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/FileManagerDefaultTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,37 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import org.junit.Before;
-import org.ourproject.kune.platf.server.PersistenceTest;
-
-import com.google.inject.Inject;
-
-public class FileManagerDefaultTest extends PersistenceTest {
-
-    @Inject
-    FileManager fileManager;
-
-    @Before
-    public void start() {
-
-    }
-
-}

Deleted: trunk/src/test/java/org/ourproject/kune/platf/server/manager/GroupManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/GroupManagerTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/GroupManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,201 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.TimeZone;
-
-import org.apache.lucene.queryParser.ParseException;
-import org.hibernate.validator.InvalidStateException;
-import org.junit.Test;
-import org.ourproject.kune.platf.server.PersistencePreLoadedDataTest;
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
-
-import cc.kune.core.client.errors.EmailAddressInUseException;
-import cc.kune.core.client.errors.GroupNameInUseException;
-import cc.kune.core.client.errors.I18nNotFoundException;
-import cc.kune.core.client.errors.UserRegistrationException;
-import cc.kune.core.shared.dto.GroupType;
-import cc.kune.domain.AccessLists;
-import cc.kune.domain.Group;
-import cc.kune.domain.SocialNetwork;
-import cc.kune.domain.User;
-
-public class GroupManagerTest extends PersistencePreLoadedDataTest {
-
-    @Test
-    public void createdGroupShoudHaveValidSocialNetwork() throws Exception {
-        final Group group = new Group("short", "longName", defLicense, GroupType.PROJECT);
-        groupManager.createGroup(group, user);
-        final SocialNetwork socialNetwork = group.getSocialNetwork();
-        final AccessLists lists = socialNetwork.getAccessLists();
-        assertTrue(lists.getAdmins().includes(user.getUserGroup()));
-        assertTrue(lists.getEditors().isEmpty());
-        assertTrue(lists.getViewers().isEmpty());
-        closeTransaction();
-    }
-
-    @Test
-    public void createGroup() throws Exception {
-        final Group group = new Group("ysei", "Yellow Submarine Environmental Initiative", defLicense,
-                GroupType.PROJECT);
-        groupManager.createGroup(group, user);
-        final Group otherGroup = groupManager.findByShortName("ysei");
-
-        assertEquals(group.getLongName(), otherGroup.getLongName());
-        assertEquals(group.getShortName(), otherGroup.getShortName());
-        closeTransaction();
-    }
-
-    @Test
-    public void createGroupAndSearch() throws Exception, ParseException {
-        final Group group = new Group("ysei", "Yellow Submarine Environmental Initiative", defLicense,
-                GroupType.PROJECT);
-        groupManager.createGroup(group, user);
-        groupManager.reIndex();
-        final SearchResult<Group> result = groupManager.search("ysei");
-        assertEquals(1, result.getSize());
-        assertEquals("ysei", result.getList().get(0).getShortName());
-        rollbackTransaction();
-    }
-
-    @Test(expected = GroupNameInUseException.class)
-    public void createGroupWithExistingLongName() throws Exception {
-        final Group group = new Group("ysei", "Yellow Submarine Environmental Initiative", defLicense,
-                GroupType.PROJECT);
-        groupManager.createGroup(group, user);
-
-        final Group group2 = new Group("ysei2", "Yellow Submarine Environmental Initiative", defLicense,
-                GroupType.PROJECT);
-        group2.setDefaultLicense(defLicense);
-        groupManager.createGroup(group2, user);
-
-        rollbackTransaction();
-    }
-
-    @Test(expected = GroupNameInUseException.class)
-    public void createGroupWithExistingShortName() throws Exception {
-        final Group group = new Group("ysei", "Yellow Submarine Environmental Initiative", defLicense,
-                GroupType.PROJECT);
-        groupManager.createGroup(group, user);
-
-        final Group group2 = new Group("ysei", "Yellow Submarine Environmental Initiative 2", defLicense,
-                GroupType.PROJECT);
-        groupManager.createGroup(group2, user);
-
-        rollbackTransaction();
-    }
-
-    private void createTestGroup(final int number) throws Exception {
-        final Group g = new Group("ysei" + number, "Yellow Submarine Environmental Initiative " + number, defLicense,
-                GroupType.PROJECT);
-        groupManager.createGroup(g, user);
-    }
-
-    @Test(expected = EmailAddressInUseException.class)
-    public void createUserExistingEmail() throws I18nNotFoundException, GroupNameInUseException,
-            EmailAddressInUseException {
-        final User user1 = userManager.createUser("test", "test 1 name", "test1 at example.com", "some password", "en",
-                "GB", "GMT");
-        groupManager.createUserGroup(user1);
-        final User user2 = userManager.createUser("test2", "test 2 name", "test1 at example.com", "some password", "en",
-                "GB", "GMT");
-        groupManager.createUserGroup(user2);
-    }
-
-    @Test(expected = GroupNameInUseException.class)
-    public void createUserExistingLongName() throws I18nNotFoundException, GroupNameInUseException,
-            EmailAddressInUseException {
-        final User user1 = userManager.createUser("test", "test 1 name", "test1 at example.com", "some password", "en",
-                "GB", "GMT");
-        groupManager.createUserGroup(user1);
-        final User user2 = userManager.createUser("test2", "test 1 name", "test2 at example.com", "some password", "en",
-                "GB", "GMT");
-        groupManager.createUserGroup(user2);
-    }
-
-    @Test(expected = GroupNameInUseException.class)
-    public void createUserExistingShortName() throws I18nNotFoundException, GroupNameInUseException,
-            EmailAddressInUseException {
-        final User user1 = userManager.createUser("test", "test 1 name", "test1 at example.com", "some password", "en",
-                "GB", "GMT");
-        groupManager.createUserGroup(user1);
-        final User user2 = userManager.createUser("test", "test 2 name", "test2 at example.com", "some password", "en",
-                "GB", "GMT");
-        groupManager.createUserGroup(user2);
-    }
-
-    @Test(expected = EmailAddressInUseException.class)
-    public void createUserWithExistingEmail() throws Exception {
-        final User user2 = userManager.createUser("username2", "the user name 2", USER_EMAIL, "userPassword", "en",
-                "GB", TimeZone.getDefault().getID());
-        groupManager.createUserGroup(user2);
-        rollbackTransaction();
-    }
-
-    @Test(expected = GroupNameInUseException.class)
-    public void createUserWithExistingLongName() throws Exception {
-        final User user2 = userManager.createUser("username2", USER_LONG_NAME, "email2 at example.com", "userPassword",
-                "en", "GB", TimeZone.getDefault().getID());
-        groupManager.createUserGroup(user2);
-        rollbackTransaction();
-    }
-
-    @Test(expected = GroupNameInUseException.class)
-    public void createUserWithExistingShortName() throws Exception {
-        final User user2 = userManager.createUser(USER_SHORT_NAME, "the user name 2", "email2 at example.com",
-                "userPassword", "en", "GB", TimeZone.getDefault().getID());
-        groupManager.createUserGroup(user2);
-        rollbackTransaction();
-    }
-
-    @Test(expected = UserRegistrationException.class)
-    public void createUserWithIncorrectShortName() throws Exception {
-        final User user2 = userManager.createUser("u s", "the user name 2", "email2 at example.com", "userPassword", "en",
-                "GB", TimeZone.getDefault().getID());
-        groupManager.createUserGroup(user2);
-        rollbackTransaction();
-    }
-
-    @Test(expected = InvalidStateException.class)
-    public void createUserWithVeryShortName() throws Exception {
-        final User user2 = userManager.createUser("us", "the user name 2", "email2 at example.com", "userPassword", "en",
-                "GB", TimeZone.getDefault().getID());
-        groupManager.createUserGroup(user2);
-        rollbackTransaction();
-    }
-
-    @Test
-    public void groupSearchPagination() throws Exception, ParseException {
-        for (int i = 1; i < 10; i++) {
-            createTestGroup(i);
-        }
-        groupManager.reIndex();
-        final SearchResult<Group> result = groupManager.search("Yellow", 0, 5);
-        assertEquals(9, result.getSize());
-        assertEquals(5, result.getList().size());
-        final SearchResult<Group> result2 = groupManager.search("Yellow", 5, 5);
-        assertEquals(9, result2.getSize());
-        assertEquals(4, result2.getList().size());
-        rollbackTransaction();
-    }
-}

Deleted: trunk/src/test/java/org/ourproject/kune/platf/server/manager/I18nManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/I18nManagerTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/I18nManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,176 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.HashMap;
-
-import org.apache.commons.lang.StringEscapeUtils;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.ourproject.kune.platf.server.PersistenceTest;
-
-import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.domain.I18nCountry;
-import cc.kune.domain.I18nLanguage;
-import cc.kune.domain.I18nTranslation;
-
-import com.google.inject.Inject;
-
-public class I18nManagerTest extends PersistenceTest {
-    @Inject
-    I18nTranslationManager translationManager;
-    @Inject
-    I18nCountryManager countryManager;
-    @Inject
-    I18nLanguageManager languageManager;
-    @Inject
-    I18nTranslationService translationService;
-
-    @Test
-    public void byDefaultUseEnglish() {
-        HashMap<String, String> map = translationManager.getLexicon("en");
-        HashMap<String, String> map2 = translationManager.getLexicon("af");
-        assertEquals(map.size(), map2.size());
-    }
-
-    @After
-    public void close() {
-        if (getTransaction().isActive()) {
-            getTransaction().rollback();
-        }
-    }
-
-    @Test
-    public void getNonExistentTranslationInAnyLangReturnsKey() {
-        HashMap<String, String> map = translationManager.getLexicon("en");
-        HashMap<String, String> map2 = translationManager.getLexicon("aa");
-        int initialSize = map.size();
-        int initialSize2 = map2.size();
-
-        String translation = translationManager.getTranslation("es", "Foo foo foo");
-        String translation2 = translationManager.getTranslation("aa", "Foo foo foo");
-
-        assertEquals(I18nTranslation.UNTRANSLATED_VALUE, translation);
-        assertEquals(I18nTranslation.UNTRANSLATED_VALUE, translation2);
-
-        map = translationManager.getLexicon("en");
-        map2 = translationManager.getLexicon("aa");
-        int newSize = map.size();
-        int newSize2 = map2.size();
-
-        assertEquals(initialSize + 1, newSize);
-        assertEquals(initialSize2 + 1, newSize2);
-    }
-
-    @Test
-    public void getNonExistentTranslationReturnsDefaultLanguage() {
-        String translation = translationManager.getTranslation("af", "January [month]");
-        assertEquals("January", translation);
-    }
-
-    @Test
-    public void getTranslation() {
-        String translation = translationManager.getTranslation("af", "Sunday [weekday]");
-        assertEquals("Sondag", translation);
-    }
-
-    @Test
-    public void getTranslationUTF8() {
-        String translation = translationManager.getTranslation("el", "January [month]");
-        assertEquals("Ιανουάριος", translation);
-    }
-
-    @Test
-    public void getTranslationWithIntArg() {
-        String translation = translationManager.getTranslation("en", "[%d] users", 20);
-        assertEquals("20 users", translation);
-    }
-
-    @Test
-    public void getTranslationWithIntArgFromService() {
-        String translation = translationService.t("[%d] users", 20);
-        assertEquals("20 users", translation);
-    }
-
-    @Test
-    public void getTranslationWithIntArgFromWithNtService() {
-        String translation = translationService.tWithNT("[%d] users", "foo foo", 20);
-        assertEquals("20 users", translation);
-    }
-
-    @Test
-    public void getTranslationWithStringArg() {
-        String translation = translationManager.getTranslation("en", "[%s] users", "Twenty");
-        assertEquals("Twenty users", translation);
-    }
-
-    @Test
-    public void getTranslationWithStringArgFromService() {
-        String translation = translationService.t("[%s] users", "Twenty");
-        assertEquals("Twenty users", translation);
-    }
-
-    @Test
-    public void getTranslationWithStringArgWithNtFromService() {
-        String translation = translationService.tWithNT("[%s] users", "foo foo", "Twenty");
-        assertEquals("Twenty users", translation);
-    }
-
-    @Before
-    public void insertData() {
-        openTransaction();
-        I18nLanguage english = new I18nLanguage(Long.valueOf(1819), "English", "English", "en");
-        I18nLanguage spanish = new I18nLanguage(Long.valueOf(5889), "Spanish", "Español", "es");
-        I18nLanguage afrikaans = new I18nLanguage(Long.valueOf(114), "Afrikaans", "Afrikaans", "af");
-        I18nLanguage greek = new I18nLanguage(Long.valueOf(1793), "Greek", "Ελληνικά", "el");
-        languageManager.persist(english);
-        languageManager.persist(spanish);
-        languageManager.persist(afrikaans);
-        languageManager.persist(greek);
-        translationManager.persist(new I18nTranslation("Sunday [weekday]", english, "Sunday"));
-        translationManager.persist(new I18nTranslation("January [month]", english, "January"));
-        translationManager.persist(new I18nTranslation("Sunday [weekday]", afrikaans, "Sondag"));
-        translationManager.persist(new I18nTranslation("January [month]", greek, "Ιανουάριος"));
-        translationManager.persist(new I18nTranslation(StringEscapeUtils.escapeHtml("[%s] users"), english,
-                StringEscapeUtils.escapeHtml("[%s] users")));
-        translationManager.persist(new I18nTranslation(StringEscapeUtils.escapeHtml("[%d] users"), english,
-                StringEscapeUtils.escapeHtml("[%d] users")));
-        I18nCountry gb = new I18nCountry(Long.valueOf(75), "GB", "GBP", ".", "£%n", "", ".", "United Kingdom",
-                "western", ",");
-        countryManager.persist(gb);
-    }
-
-    @Test
-    public void setTranslation() {
-        translationManager.setTranslation("en", "Foo foo foo", "Foo foo foo translation");
-        String translation = translationManager.getTranslation("en", "Foo foo foo");
-        assertEquals("Foo foo foo translation", translation);
-    }
-
-    @Test
-    public void testGetLexicon() {
-        HashMap<String, String> map = translationManager.getLexicon("af");
-        assertTrue(map.size() > 0);
-    }
-}

Deleted: trunk/src/test/java/org/ourproject/kune/platf/server/manager/LicenseManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/LicenseManagerTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/LicenseManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,63 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.ourproject.kune.platf.server.PersistenceTest;
-
-import cc.kune.domain.License;
-import cc.kune.domain.finders.LicenseFinder;
-
-import com.google.inject.Inject;
-
-public class LicenseManagerTest extends PersistenceTest {
-    private License license;
-    @Inject
-    LicenseFinder licenseFinder;
-    @Inject
-    LicenseManager licenseManager;
-
-    @After
-    public void close() {
-        if (getTransaction().isActive()) {
-            getTransaction().rollback();
-        }
-    }
-
-    @Before
-    public void insertData() {
-        openTransaction();
-        assertEquals(0, licenseFinder.getAll().size());
-        license = new License("by", "Creative Commons Attribution", "", "http://creativecommons.org/licenses/by/3.0/",
-                true, false, false, "", "");
-        licenseManager.persist(license);
-    }
-
-    @Test
-    public void testLicenseCreation() {
-        assertNotNull(license.getId());
-        assertEquals(1, licenseFinder.getAll().size());
-    }
-}

Deleted: trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagManagerTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,63 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import static org.junit.Assert.assertNotNull;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.ourproject.kune.platf.server.PersistenceTest;
-import org.ourproject.kune.platf.server.content.ContentManager;
-
-import cc.kune.domain.Tag;
-import cc.kune.domain.finders.TagFinder;
-
-import com.google.inject.Inject;
-
-public class TagManagerTest extends PersistenceTest {
-    @Inject
-    ContentManager contentManager;
-    private Tag tag;
-    @Inject
-    TagFinder tagFinder;
-    @Inject
-    TagManager tagManager;
-
-    @After
-    public void close() {
-        if (getTransaction().isActive()) {
-            getTransaction().rollback();
-        }
-    }
-
-    @Before
-    public void insertData() {
-        openTransaction();
-        tag = new Tag("foo1");
-        tagManager.persist(tag);
-    }
-
-    @Test
-    public void testTagCreation() {
-        assertNotNull(tag.getId());
-        assertNotNull(tagFinder.findByTagName("foo1"));
-    }
-}

Deleted: trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagUserContentTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagUserContentTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/TagUserContentTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,116 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.util.List;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.ourproject.kune.platf.server.PersistencePreLoadedDataTest;
-
-import cc.kune.domain.Tag;
-import cc.kune.domain.TagUserContent;
-import cc.kune.domain.finders.TagUserContentFinder;
-
-import com.google.inject.Inject;
-
-public class TagUserContentTest extends PersistencePreLoadedDataTest {
-    private static final String DUMMY_TAG = "dummy";
-    @Inject
-    TagUserContentFinder finder;
-    @Inject
-    TagUserContentManagerDefault manager;
-
-    private Tag tag;
-    @Inject
-    TagManager tagManager;
-
-    @Before
-    public void before() {
-        tag = new Tag(DUMMY_TAG);
-        tagManager.persist(tag);
-    }
-
-    private void createSomeTagUserContent() {
-        List<Tag> tags = manager.find(user, content);
-        assertEquals(0, tags.size());
-        createTagUserContent();
-        tags = manager.find(user, content);
-        assertEquals(1, tags.size());
-    }
-
-    private TagUserContent createTagUserContent() {
-        final TagUserContent tagUC = new TagUserContent(tag, user, content);
-        manager.persist(tagUC);
-        return tagUC;
-    }
-
-    @Test
-    public void getTagsAsString() {
-        manager.setTags(user, content, DUMMY_TAG);
-        final String tagS = manager.getTagsAsString(user, content);
-        assertEquals(DUMMY_TAG, tagS);
-    }
-
-    @Test
-    public void getTagsGrouped() {
-        finder.getTagsGroups(user.getUserGroup());
-    }
-
-    @Test
-    public void insertSomeUserContent() {
-        createSomeTagUserContent();
-    }
-
-    @Test
-    public void removeSomeUserContent() {
-        createSomeTagUserContent();
-        manager.remove(user, content);
-        final List<Tag> tags = manager.find(user, content);
-        assertEquals(0, tags.size());
-    }
-
-    @Test
-    public void setTags() {
-        List<Tag> tags = manager.find(user, content);
-        assertEquals(0, tags.size());
-        manager.setTags(user, content, DUMMY_TAG + " " + DUMMY_TAG);
-        tags = manager.find(user, content);
-        assertEquals(1, tags.size());
-    }
-
-    @Test
-    public void setTagsRemoveBefore() {
-        manager.setTags(user, content, "foo");
-        manager.setTags(user, content, DUMMY_TAG);
-        final List<Tag> tags = manager.find(user, content);
-        assertEquals(1, tags.size());
-        assertEquals(DUMMY_TAG, tags.get(0).getName());
-    }
-
-    @Test
-    public void testInsertData() {
-        final TagUserContent tagUC = createTagUserContent();
-        assertNotNull(tagUC.getId());
-    }
-}

Deleted: trunk/src/test/java/org/ourproject/kune/platf/server/manager/UserManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/UserManagerTest.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/UserManagerTest.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -1,146 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.server.manager;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import java.util.TimeZone;
-
-import javax.persistence.PersistenceException;
-
-import org.apache.lucene.queryParser.ParseException;
-import org.hibernate.validator.InvalidStateException;
-import org.junit.Test;
-import org.ourproject.kune.platf.server.PersistencePreLoadedDataTest;
-import org.ourproject.kune.platf.server.manager.impl.SearchResult;
-
-import cc.kune.core.client.errors.GroupNameInUseException;
-import cc.kune.core.client.errors.I18nNotFoundException;
-import cc.kune.core.shared.domain.UserSNetVisibility;
-import cc.kune.domain.Group;
-import cc.kune.domain.User;
-
-import com.google.inject.Inject;
-
-public class UserManagerTest extends PersistencePreLoadedDataTest {
-    @Inject
-    Group groupFinder;
-
-    @Test
-    public void emailCorrect() {
-        user = new User("test1", "test1 name", "test at example.com", "some passwd", "somediggest".getBytes(),
-                "some salt".getBytes(), english, gb, getTimeZone());
-        persist(user);
-    }
-
-    @Test(expected = PersistenceException.class)
-    public void emailEmpty() {
-        user = new User("test1", "test1 name", null, "some passwd", "somediggest".getBytes(), "some salt".getBytes(),
-                english, gb, getTimeZone());
-        persist(user);
-    }
-
-    @Test(expected = InvalidStateException.class)
-    public void emailIncorrect() {
-        user = new User("test1", "test1 name", "falseEmail@", "some passwd", "somediggest".getBytes(),
-                "some salt".getBytes(), english, gb, getTimeZone());
-        persist(user);
-    }
-
-    private TimeZone getTimeZone() {
-        return TimeZone.getDefault();
-    }
-
-    @Test
-    public void loginIncorrect() {
-        final User result = userManager.login("test", "test");
-        assertNull(result);
-    }
-
-    @Test
-    public void loginWithEmailCorrect() {
-        final User result = userManager.login(USER_EMAIL, USER_PASSWORD);
-        assertNotNull(result.getId());
-    }
-
-    @Test
-    public void loginWithNickCorrect() {
-        final User result = userManager.login(USER_SHORT_NAME, USER_PASSWORD);
-        assertNotNull(result.getId());
-    }
-
-    @Test(expected = InvalidStateException.class)
-    public void passwdLengthIncorrect() {
-        user = new User("test1", "test1 name", "test at example.com", "pass", "diggest".getBytes(), "salt".getBytes(),
-                english, gb, getTimeZone());
-        persist(user);
-    }
-
-    /**
-     * This was not working:
-     * http://opensource.atlassian.com/projects/hibernate/browse/EJB-382
-     */
-    @Test(expected = GroupNameInUseException.class)
-    public void testUserExist() throws I18nNotFoundException {
-        final User user1 = userManager.createUser("test", "test 1 name", "test1 at example.com", "some password", "en",
-                "GB", "GMT");
-        persist(user1);
-        final User user2 = userManager.createUser("test", "test 1 name", "test1 at example.com", "some password", "en",
-                "GB", "GMT");
-        persist(user2);
-    }
-
-    @Test(expected = InvalidStateException.class)
-    public void userNameLengthIncorrect() {
-        user = new User("test1", "te", "test at example.com", "some passwd", "diggest".getBytes(), "salt".getBytes(),
-                english, gb, getTimeZone());
-        persist(user);
-    }
-
-    @Test
-    public void userSearch() throws Exception, ParseException {
-        userManager.reIndex();
-        final SearchResult<User> result = userManager.search(USER_SHORT_NAME);
-        assertEquals(1, result.getSize());
-        assertEquals(USER_SHORT_NAME, result.getList().get(0).getShortName());
-        rollbackTransaction();
-    }
-
-    @Test(expected = InvalidStateException.class)
-    public void userShortNameIncorrect() {
-        user = new User("test1A", "test1 name", "test at example.com", "some passwd", "diggest".getBytes(),
-                "salt".getBytes(), english, gb, getTimeZone());
-        persist(user);
-    }
-
-    @Test
-    public void visibilityPersist() {
-        user = new User("test1", "test1 name", "test at example.com", "some passwd", "somediggest".getBytes(),
-                "some salt".getBytes(), english, gb, getTimeZone());
-        for (final UserSNetVisibility visibility : UserSNetVisibility.values()) {
-            user.setSNetVisibility(visibility);
-            persist(user);
-            assertEquals(user.getSNetVisibility(), visibility);
-        }
-    }
-
-}

Modified: trunk/src/test/java/org/ourproject/kune/rack/filters/rest/TestRESTMethodFinder.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/rack/filters/rest/TestRESTMethodFinder.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/rack/filters/rest/TestRESTMethodFinder.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -29,6 +29,12 @@
 import org.junit.Before;
 import org.junit.Test;
 
+import cc.kune.core.server.rack.filters.rest.DefaultRESTMethodFinder;
+import cc.kune.core.server.rack.filters.rest.Parameters;
+import cc.kune.core.server.rack.filters.rest.REST;
+import cc.kune.core.server.rack.filters.rest.RESTMethod;
+import cc.kune.core.server.rack.filters.rest.RESTMethodFinder;
+
 public class TestRESTMethodFinder {
     private RESTMethodFinder finder;
     private MyTestService service;

Modified: trunk/src/test/java/org/ourproject/kune/rack/filters/rest/TestRESTServiceDefinition.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/rack/filters/rest/TestRESTServiceDefinition.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/org/ourproject/kune/rack/filters/rest/TestRESTServiceDefinition.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -24,6 +24,9 @@
 import org.junit.Before;
 import org.junit.Test;
 
+import cc.kune.core.server.rack.filters.rest.REST;
+import cc.kune.core.server.rack.filters.rest.RESTServiceDefinition;
+
 public class TestRESTServiceDefinition {
 
     private RESTServiceDefinition definition;

Modified: trunk/src/test/java/testsuites/ServerManagerTestSuite.java
===================================================================
--- trunk/src/test/java/testsuites/ServerManagerTestSuite.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/testsuites/ServerManagerTestSuite.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -22,22 +22,23 @@
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
-import org.ourproject.kune.platf.server.manager.ContentManagerTest;
-import org.ourproject.kune.platf.server.manager.GroupManagerTest;
-import org.ourproject.kune.platf.server.manager.I18nManagerTest;
-import org.ourproject.kune.platf.server.manager.LicenseManagerTest;
-import org.ourproject.kune.platf.server.manager.TagManagerTest;
-import org.ourproject.kune.platf.server.manager.TagUserContentTest;
-import org.ourproject.kune.platf.server.manager.UserManagerTest;
-import org.ourproject.kune.platf.server.manager.file.EntityLogoUploadManagerTest;
-import org.ourproject.kune.platf.server.manager.file.FileDownloadManagerTest;
-import org.ourproject.kune.platf.server.manager.file.FileManagerTest;
-import org.ourproject.kune.platf.server.manager.file.FileUploadManagerTest;
-import org.ourproject.kune.platf.server.manager.file.FileUtilsTest;
-import org.ourproject.kune.platf.server.manager.file.ImageUtilsDefaultTest;
-import org.ourproject.kune.platf.server.manager.impl.SocialNetworkManagerMoreTest;
-import org.ourproject.kune.platf.server.manager.impl.SocialNetworkManagerTest;
 
+import cc.kune.core.server.manager.ContentManagerTest;
+import cc.kune.core.server.manager.GroupManagerTest;
+import cc.kune.core.server.manager.I18nManagerTest;
+import cc.kune.core.server.manager.LicenseManagerTest;
+import cc.kune.core.server.manager.TagManagerTest;
+import cc.kune.core.server.manager.TagUserContentTest;
+import cc.kune.core.server.manager.UserManagerTest;
+import cc.kune.core.server.manager.file.EntityLogoUploadManagerTest;
+import cc.kune.core.server.manager.file.FileDownloadManagerTest;
+import cc.kune.core.server.manager.file.FileManagerTest;
+import cc.kune.core.server.manager.file.FileUploadManagerTest;
+import cc.kune.core.server.manager.file.FileUtilsTest;
+import cc.kune.core.server.manager.file.ImageUtilsDefaultTest;
+import cc.kune.core.server.manager.impl.SocialNetworkManagerMoreTest;
+import cc.kune.core.server.manager.impl.SocialNetworkManagerTest;
+
 /**
  * Rescan with :
  * 

Modified: trunk/src/test/java/testsuites/ServerOtherTestSuite.java
===================================================================
--- trunk/src/test/java/testsuites/ServerOtherTestSuite.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/testsuites/ServerOtherTestSuite.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -22,18 +22,19 @@
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
-import org.ourproject.kune.platf.server.access.AccessRightsServiceTest;
-import org.ourproject.kune.platf.server.access.FinderTest;
-import org.ourproject.kune.platf.server.auth.AuthenticatedMethodInterceptorTest;
-import org.ourproject.kune.platf.server.auth.AuthorizatedMethodInterceptorTest;
-import org.ourproject.kune.platf.server.domain.GroupListTest;
-import org.ourproject.kune.platf.server.finders.GroupFinderTest;
-import org.ourproject.kune.platf.server.finders.LicenseFinderTest;
-import org.ourproject.kune.platf.server.finders.RateFinderTest;
-import org.ourproject.kune.platf.server.finders.UserFinderTest;
-import org.ourproject.kune.platf.server.mapper.MapperTest;
-import org.ourproject.kune.platf.server.properties.KunePropertiesTest;
 
+import cc.kune.core.server.access.AccessRightsServiceTest;
+import cc.kune.core.server.access.FinderTest;
+import cc.kune.core.server.auth.AuthenticatedMethodInterceptorTest;
+import cc.kune.core.server.auth.AuthorizatedMethodInterceptorTest;
+import cc.kune.core.server.domain.GroupListTest;
+import cc.kune.core.server.finders.GroupFinderTest;
+import cc.kune.core.server.finders.LicenseFinderTest;
+import cc.kune.core.server.finders.RateFinderTest;
+import cc.kune.core.server.finders.UserFinderTest;
+import cc.kune.core.server.mapper.MapperTest;
+import cc.kune.core.server.properties.KunePropertiesTest;
+
 /**
  * Rescan with :
  * 

Modified: trunk/src/test/java/testsuites/ServerTestSuite.java
===================================================================
--- trunk/src/test/java/testsuites/ServerTestSuite.java	2011-03-25 12:43:38 UTC (rev 1293)
+++ trunk/src/test/java/testsuites/ServerTestSuite.java	2011-03-25 20:21:30 UTC (rev 1294)
@@ -22,18 +22,19 @@
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
-import org.ourproject.kune.platf.server.access.AccessRightsServiceTest;
-import org.ourproject.kune.platf.server.access.FinderTest;
-import org.ourproject.kune.platf.server.auth.AuthenticatedMethodInterceptorTest;
-import org.ourproject.kune.platf.server.auth.AuthorizatedMethodInterceptorTest;
-import org.ourproject.kune.platf.server.domain.GroupListTest;
-import org.ourproject.kune.platf.server.finders.GroupFinderTest;
-import org.ourproject.kune.platf.server.finders.LicenseFinderTest;
-import org.ourproject.kune.platf.server.finders.RateFinderTest;
-import org.ourproject.kune.platf.server.finders.UserFinderTest;
-import org.ourproject.kune.platf.server.mapper.MapperTest;
-import org.ourproject.kune.platf.server.properties.KunePropertiesTest;
 
+import cc.kune.core.server.access.AccessRightsServiceTest;
+import cc.kune.core.server.access.FinderTest;
+import cc.kune.core.server.auth.AuthenticatedMethodInterceptorTest;
+import cc.kune.core.server.auth.AuthorizatedMethodInterceptorTest;
+import cc.kune.core.server.domain.GroupListTest;
+import cc.kune.core.server.finders.GroupFinderTest;
+import cc.kune.core.server.finders.LicenseFinderTest;
+import cc.kune.core.server.finders.RateFinderTest;
+import cc.kune.core.server.finders.UserFinderTest;
+import cc.kune.core.server.mapper.MapperTest;
+import cc.kune.core.server.properties.KunePropertiesTest;
+
 /**
  * Rescan with :
  * 




More information about the kune-commits mailing list