pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR286ConfigurationProcessor.java [382:413]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   private void handleCWS(List<CustomWindowStateType> cwss) {
      for (CustomWindowStateType cws : cwss) {

         // validate data
         if ((cws.getWindowState() == null)
               || (cws.getWindowState().getValue() == null)) {
            String warning = "Custom window state cannot be null.";
            LOG.warn(warning);
            throw new IllegalArgumentException(warning);
         } else {
            String val = cws.getWindowState().getValue();
            if (val.equalsIgnoreCase("normal") || val.equalsIgnoreCase("maximized")
                  || val.equalsIgnoreCase("minimized")) {
               String warning = "Bad custom window state: " + val;
               LOG.warn(warning);
               throw new IllegalArgumentException(warning);
            }
         }

         // set up the custom portlet mode
         CustomWindowState ws = new CustomWindowStateImpl(cws.getWindowState()
               .getValue());
         for (Description desc : handleDescriptions(cws.getDescription())) {
            ws.addDescription(desc);
         }

         // add it to the model
         pad.addCustomWindowState(ws);

      }

   }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR168ConfigurationProcessor.java [234:265]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   private void handleCWS(List<CustomWindowStateType> cwss) {
      for (CustomWindowStateType cws : cwss) {

         // validate data
         if ((cws.getWindowState() == null)
               || (cws.getWindowState().getValue() == null)) {
            String warning = "Bad custom portlet mode. Mode was null.";
            LOG.warn(warning);
            throw new IllegalArgumentException(warning);
         } else {
            String val = cws.getWindowState().getValue();
            if (val.equalsIgnoreCase("view") || val.equalsIgnoreCase("edit")
                  || val.equalsIgnoreCase("help")) {
               String warning = "Bad custom portlet mode. Mode was: " + val;
               LOG.warn(warning);
               throw new IllegalArgumentException(warning);
            }
         }

         // set up the custom portlet mode
         CustomWindowState ws = new CustomWindowStateImpl(cws.getWindowState()
               .getValue());
         for (Description desc : handleDescriptions(cws.getDescription())) {
            ws.addDescription(desc);
         }

         // add it to the model
         pad.addCustomWindowState(ws);

      }

   }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



