Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
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.workspace;
 

Author(s):
Julien Viet
Version:
$Revision$
 
 @NodeMapping(name = "mop:uiwindow")
 public abstract class UIWindowImpl extends UIComponentImpl implements UIWindowCustomizationContext {

  
The content manager.
 
 
     return ;
   }
 
   public void setContentManager(ContentManager contentManager) {
     this. = contentManager;
   }
 
   public ObjectType<? extends UIWindowgetObjectType() {
     return .;
   }
 
   // Abstract **********************************************************************************************************
 
   @OneToOne
   @MappedBy("customization")
   public abstract WorkspaceCustomization getCustomization();
 
   public abstract void setCustomization(WorkspaceCustomization customization);
 
 /*
   @ManyToOne(type = RelationshipType.PATH)
   @MappedBy("relatedcustomization")
   public abstract Customization getRelatedCustomization();
 
   public abstract void setRelatedCustomization(Customization relatedCustomization);
 */
 
   @Create
   public abstract WorkspaceClone create();
 
   @Create
   public abstract WorkspaceSpecialization create2();
 
   // UIWindow implementation *******************************************************************************************
 
   public <S> Customization<S> customize(ContentType<S> contentTypeString contentId, S state) {
     if (getCustomization() != null) {
       throw new IllegalStateException("Already customized");
     }
 /*
     if (getRelatedCustomization() != null) {
       throw new IllegalStateException("Referencing a customization context");
     }
 */
     WorkspaceClone customization = create();
     setCustomization(customization);
     customization.setMimeType(contentType.getMimeType());
     customization.setContentId(contentId);
     customization.setState(state);
     return (Customization<S>)customization;
   }
 
   public <S> Customization<S> customize(Customization<S> customization) {
    if (customization == null) {
      throw new NullPointerException();
    } else if (customization instanceof WorkspaceCustomization) {
      if (getCustomization() != null) {
        throw new IllegalStateException("Already customized");
      }
      //
      WorkspaceSpecialization specialization = create2();
      setCustomization(specialization);
      specialization.setCustomization((WorkspaceCustomization)customization);
      return (Customization<S>)specialization;
    } else {
      throw new IllegalArgumentException("implement customization of "customization);
    }
  }
  // WorkspaceCustomizationContext implementation **********************************************************************
  public String getContextType() {
  }
  public String getContextId() {
    return getObjectId();
  }
  public boolean contains(CustomizationContext that) {
    return contains(thisthat);
  }
New to GrepCode? Check out our FAQ X