Author: julien_viet
Date: 2009-09-11 18:06:22 -0400 (Fri, 11 Sep 2009)
New Revision: 180
Removed:
components/mop/trunk/api/src/main/java/org/gatein/mop/api/content/ContentManager.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/content/ContentManagerImpl.java
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/ModelImpl.java
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIWindowImpl.java
Log:
remove useless ContentManager
Deleted:
components/mop/trunk/api/src/main/java/org/gatein/mop/api/content/ContentManager.java
===================================================================
---
components/mop/trunk/api/src/main/java/org/gatein/mop/api/content/ContentManager.java 2009-09-10
22:20:07 UTC (rev 179)
+++
components/mop/trunk/api/src/main/java/org/gatein/mop/api/content/ContentManager.java 2009-09-11
22:06:22 UTC (rev 180)
@@ -1,48 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.gatein.mop.api.content;
-
-/**
- * Provides access to content as seen by the framework.
- *
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
- * @version $Revision$
- */
-public interface ContentManager {
-
- /**
- * Returns the representation of a specified content or null if it cannot be found.
- *
- * @param contentType the content type
- * @param contentId the content id
- * @return the content
- * @param <S> the state type
- */
- <S> Content<S> getContent(ContentType<S> contentType, String
contentId);
-
- /**
- * Returns the representation of a specified content or null if it cannot be found.
- *
- * @param mimeType the mime type
- * @param contentId the content id
- * @return the content
- */
- Content<?> getContent(String mimeType, String contentId);
-
-}
Modified: components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/ModelImpl.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/ModelImpl.java 2009-09-10
22:20:07 UTC (rev 179)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/ModelImpl.java 2009-09-11
22:06:22 UTC (rev 180)
@@ -18,26 +18,19 @@
*/
package org.gatein.mop.core.api;
-import org.gatein.mop.core.api.content.ContentManagerImpl;
import org.gatein.mop.core.api.content.ContentManagerRegistry;
import org.gatein.mop.core.api.content.CustomizationContextProviderRegistry;
import org.gatein.mop.core.api.content.CustomizationContextResolver;
import org.gatein.mop.core.api.workspace.WorkspaceImpl;
import org.gatein.mop.api.workspace.WorkspaceCustomizationContext;
-import org.gatein.mop.core.api.workspace.UIWindowImpl;
import org.gatein.mop.core.api.workspace.content.ContextSpecialization;
import org.gatein.mop.core.api.workspace.content.WorkspaceClone;
-import org.gatein.mop.api.content.ContentManager;
import org.gatein.mop.api.content.CustomizationContext;
import org.gatein.mop.api.workspace.Workspace;
import org.gatein.mop.api.workspace.ObjectType;
import org.gatein.mop.api.workspace.WorkspaceObject;
import org.gatein.mop.api.Model;
import org.chromattic.api.ChromatticSession;
-import org.chromattic.api.query.QueryLanguage;
-import org.chromattic.api.query.Query;
-import org.chromattic.api.query.ObjectQueryBuilder;
-import org.chromattic.api.query.ObjectQuery;
import org.chromattic.api.event.LifeCycleListener;
import java.util.Iterator;
@@ -58,9 +51,6 @@
private final CustomizationContextProviderRegistry customizationContextResolvers;
/** . */
- private final ContentManagerImpl contentManager;
-
- /** . */
private WorkspaceImpl workspace;
/** . */
@@ -80,7 +70,6 @@
this.session = session;
this.contentManagers = contentManagers;
this.customizationContextResolvers = customizationContextResolvers;
- this.contentManager = new ContentManagerImpl(contentManagers,
customizationContextResolvers, session);
//
session.addEventListener(contextualizer);
@@ -100,10 +89,6 @@
return workspace;
}
- public ContentManager getContentManager() {
- return contentManager;
- }
-
public void save() {
session.save();
}
@@ -140,9 +125,7 @@
}
private void inject(Object o, boolean persistent) {
- if (o instanceof UIWindowImpl) {
- ((UIWindowImpl)o).setContentManager(contentManager);
- } else if (o instanceof ContextSpecialization) {
+ if (o instanceof ContextSpecialization) {
((ContextSpecialization)o).setCustomizationContextResolver(customizationContextResolver);
} else if (o instanceof WorkspaceClone && persistent) {
((WorkspaceClone)o).registry = contentManagers;
Deleted:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/content/ContentManagerImpl.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/content/ContentManagerImpl.java 2009-09-10
22:20:07 UTC (rev 179)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/content/ContentManagerImpl.java 2009-09-11
22:06:22 UTC (rev 180)
@@ -1,59 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.gatein.mop.core.api.content;
-
-import org.gatein.mop.api.content.ContentManager;
-import org.gatein.mop.api.content.Content;
-import org.gatein.mop.api.content.ContentType;
-import org.chromattic.api.ChromatticSession;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
- * @version $Revision$
- */
-public class ContentManagerImpl implements ContentManager {
-
- /** . */
- final ContentManagerRegistry contentManagers;
-
- /** . */
- final CustomizationContextProviderRegistry customizationContextResolvers;
-
- /** . */
- private final ChromatticSession session;
-
- public ContentManagerImpl(
- ContentManagerRegistry contentManagers,
- CustomizationContextProviderRegistry customizationContextResolvers,
- ChromatticSession session) {
-
- //
- this.contentManagers = contentManagers;
- this.session = session;
- this.customizationContextResolvers = customizationContextResolvers;
- }
-
- public <S> Content<S> getContent(ContentType<S> contentType, String
contentId) {
- throw new UnsupportedOperationException();
- }
-
- public Content<?> getContent(String mimeType, String contentId) {
- throw new UnsupportedOperationException();
- }
-}
\ No newline at end of file
Modified:
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIWindowImpl.java
===================================================================
---
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIWindowImpl.java 2009-09-10
22:20:07 UTC (rev 179)
+++
components/mop/trunk/core/src/main/java/org/gatein/mop/core/api/workspace/UIWindowImpl.java 2009-09-11
22:06:22 UTC (rev 180)
@@ -25,7 +25,6 @@
import org.gatein.mop.api.workspace.ui.UIWindow;
import org.gatein.mop.api.workspace.ObjectType;
import org.gatein.mop.api.workspace.WorkspaceCustomizationContext;
-import org.gatein.mop.api.content.ContentManager;
import org.gatein.mop.api.content.CustomizationContext;
import org.gatein.mop.api.content.Customization;
import org.gatein.mop.api.content.ContentType;
@@ -40,17 +39,6 @@
@NodeMapping(name = "mop:uiwindow")
public abstract class UIWindowImpl extends UIComponentImpl implements UIWindow,
CustomizationContext {
- /** The content manager. */
- private ContentManager contentManager;
-
- public ContentManager getContentManager() {
- return contentManager;
- }
-
- public void setContentManager(ContentManager contentManager) {
- this.contentManager = contentManager;
- }
-
public ObjectType<? extends UIWindow> getObjectType() {
return ObjectType.WINDOW;
}