Package org.apache.pluto.portlet.admin

Examples of org.apache.pluto.portlet.admin.PlutoAdminException


    try {
      PageRegistryXao xao = new PageRegistryXao();
      exists = xao.pageExists(pageName);
    } catch (Exception e) {
      logError(METHOD_NAME, e);
      throw new PlutoAdminException(e);
    }
    return exists;
  }
View Full Code Here


        sb.append(b);
      }
      contents = sb.toString().trim();
    } catch (FileNotFoundException e) {
      logError(METHOD_NAME, e);
      throw new PlutoAdminException(e);
    } catch (IOException e) {
      logError(METHOD_NAME, e);
      throw new PlutoAdminException(e);
    finally {
      if (fis != null) {
        try {
          fis.close();
        } catch (IOException e) {
          logError(METHOD_NAME, e);
          throw new PlutoAdminException(e);
        }
      }
    }
    return contents;
  }
View Full Code Here

      fos = new FileOutputStream(file);
      byte[] bytes = contents.getBytes();
      fos.write(bytes);
    } catch (FileNotFoundException e) {
      logError(METHOD_NAME, e);
      throw new PlutoAdminException(e);
    } catch (IOException e) {
      logError(METHOD_NAME, e);
      throw new PlutoAdminException(e);
    finally {
      if (fos != null) {
        try {
          fos.close();
        } catch (IOException e) {
          logError(METHOD_NAME, e);
          throw new PlutoAdminException(e);
        }
      }
    }
  }
View Full Code Here

        DocumentBuilder db = null;
        try {
            db = dbf.newDocumentBuilder();
        } catch (ParserConfigurationException e) {
          PlutoAdminLogger.logError(CLASS_NAME, METHOD_NAME, e);
          throw new PlutoAdminException(e);
        }

        OutputStreamWriter errorWriter =
                new OutputStreamWriter(System.err, PlutoAdminConstants.ENCODING);
        db.setErrorHandler(
                new MyErrorHandler(new PrintWriter(errorWriter, true)));

        Document doc = null;
        try {
            doc = db.parse(ios);
        } catch (SAXException e) {
          PlutoAdminLogger.logError(CLASS_NAME, METHOD_NAME, e);
          throw new PlutoAdminException(e);
        } catch (IOException e) {
          PlutoAdminLogger.logError(CLASS_NAME, METHOD_NAME, e);
          throw new PlutoAdminException(e);
        }

        NodeList portletNames = doc.getElementsByTagName("portlet-name");
        if (null !=  portletNames)
        {
View Full Code Here

        org.apache.pluto.portlet.admin.model.PortletEntityRegistryXao xao =
          new org.apache.pluto.portlet.admin.model.PortletEntityRegistryXao();
        apps = xao.getApplications();
      } catch (Exception e) {
        PlutoAdminLogger.logError(CLASS_NAME, METHOD_NAME, e);
        throw new PlutoAdminException(e);
      }
      ArrayList list = new ArrayList(apps);
      Iterator iter = list.iterator();
      int nNewId = 0;
      while (iter.hasNext()) {
View Full Code Here

        PortletApplicationEntityListImpl registry = xao.load();
        alist = registry.getCastorApplications();
        logDebug(METHOD_NAME, "App list: " + alist);
      } catch (Exception e) {
        logError(METHOD_NAME, e);
        throw new PlutoAdminException(e);
      }
      //sort the collection
      ArrayList slist = new ArrayList(alist);
      Collections.sort(slist, new PortletApplicationEntityImplComparator());
      Iterator iter = slist.iterator();
View Full Code Here

        org.apache.pluto.portlet.admin.model.PortletEntityRegistryXao xao =
          new org.apache.pluto.portlet.admin.model.PortletEntityRegistryXao();
        app = xao.getApplication(appId);
      } catch (Exception e) {
        logError(METHOD_NAME, e);
        throw new PlutoAdminException(e);
      }
      session.setAttribute(PlutoAdminConstants.APP_ATTR, app, PortletSession.APPLICATION_SCOPE);
      logMethodEnd(METHOD_NAME);
    }
View Full Code Here

          new org.apache.pluto.portlet.admin.model.PortletEntityRegistryXao();
        Collection coll = xao.getPortletPreferences(appId, portletId);
        prefs = new ArrayList(coll);
      } catch (Exception e) {
        logError(METHOD_NAME, e);
        throw new PlutoAdminException(e);
      }
      PortletSession session = request.getPortletSession();
      Map map = (Map)session.getAttribute(PlutoAdminConstants.PREF_LIST_ATTR);
      if (map == null) {
        map = new HashMap();
View Full Code Here

        org.apache.pluto.portlet.admin.model.PortletEntityRegistryXao xao =
          new org.apache.pluto.portlet.admin.model.PortletEntityRegistryXao();
        apps = xao.getApplications();
      } catch (Exception e) {
        PlutoAdminLogger.logError(CLASS_NAME, METHOD_NAME, e);
        throw new PlutoAdminException(e);
      }
      ArrayList list = new ArrayList(apps);
      Iterator iter = list.iterator();
      int nNewId = 0;
      while (iter.hasNext()) {
View Full Code Here

        PortletApplicationEntityListImpl registry = xao.load();
        alist = registry.getCastorApplications();
        logDebug(METHOD_NAME, "App list: " + alist);
      } catch (Exception e) {
        logError(METHOD_NAME, e);
        throw new PlutoAdminException(e);
      }
      //sort the collection
      ArrayList slist = new ArrayList(alist);
      Collections.sort(slist, new PortletApplicationEntityImplComparator());
      Iterator iter = slist.iterator();
View Full Code Here

TOP

Related Classes of org.apache.pluto.portlet.admin.PlutoAdminException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.