Package org.apache.jetspeed.components.portletregistry

Examples of org.apache.jetspeed.components.portletregistry.RegistryException


      }
      catch (IOException e)
      {
        String msg = "Failed to create PA WAR for " + contextName;
        log.error(msg, e);
        throw new RegistryException(msg, e);
      }

      MutablePortletApplication pa = (MutablePortletApplication) registry
        .getPortletApplication(contextName);
View Full Code Here


          }
          catch (PortletEntityNotDeletedException e)
          {
            String msg = "Failed to delete Portlet Entity " + entity.getId();
            log.error(msg, e);
            throw new RegistryException(msg, e);
          }
        }

        entityAccess.removeFromCache(entity);
        windowAccess.removeWindows(entity);
View Full Code Here

          }
          catch (PortletEntityNotDeletedException e)
          {
            String msg = "Failed to delete Portlet Entity " + entity.getId();
            log.error(msg, e);
            throw new RegistryException(msg, e);
          }
        }

        entityAccess.removeFromCache(entity);
        windowAccess.removeWindows(entity);
View Full Code Here

            if (pa != null)
            {
                if (portletFactory.getPortletApplicationClassLoader(pa) != null)
                {
                    throw new RegistryException("Portlet Application " + paName + " still running");
                }

                unregisterPortletApplication(pa, true);
            }
        }
View Full Code Here

    if ((contextName.length() >= prefixLength)
      && contextName.substring(0, prefixLength).equalsIgnoreCase(LOCAL_PA_PREFIX))
    {
      if (!local)
      {
        throw new RegistryException("Prefix \"" + LOCAL_PA_PREFIX
          + "\" is reserved for Local Portlet Applications only.");
      }
    }
    else if (local)
    {
      throw new RegistryException("Prefix \"" + LOCAL_PA_PREFIX
        + "\" is required for Local Portlet Applications.");
    }
  }
View Full Code Here

    catch (Exception e)
    {
      String msg = "Failed to load portlet application for "
        + paWar.getPortletApplicationName();
      log.error(msg);
      throw new RegistryException(msg);
    }

    // register the portlet application
    try
    {
      registry.registerPortletApplication(pa);
      registered = true;
      log.info("Registered the portlet application " + paName);

      // add to search engine result
      if (searchEngine != null)
      {
        searchEngine.add(pa);
        searchEngine.add(pa.getPortletDefinitions());
        log.info("Registered the portlet application in the search engine... " + paName);
      }
           
            if ( autoCreateRoles && roleManager != null && pa.getWebApplicationDefinition().getSecurityRoles() != null )
            {
                try
                {
                    Iterator rolesIter = pa.getWebApplicationDefinition().getSecurityRoles().iterator();
                    SecurityRole sr;
                    while ( rolesIter.hasNext() )
                    {
                        sr = (SecurityRole)rolesIter.next();
                        if ( !roleManager.roleExists(sr.getRoleName()) )
                        {
                            roleManager.addRole(sr.getRoleName());
                            log.info("AutoCreated role: "+sr.getRoleName()+" from portlet application "+paName+" its web definition");
                        }
                    }
                }
                catch (SecurityException sex)
                {
                    log.warn("Failed to autoCreate roles for portlet application " + paName+": "+sex.getMessage(), sex);
                }
            }

      return pa;
    }
    catch (Exception e)
    {
      String msg = "Failed to register portlet application, " + paName;
      log.error(msg, e);

      if (registered)
      {
        try
        {
          unregisterPortletApplication(pa, local);
        }
        catch (Exception re)
        {
          log.error("Failed to rollback registration of portlet application" + paName, re);
        }
      }

      throw new RegistryException(msg, e);
    }
  }
View Full Code Here

      }
      catch (IOException e)
      {
        String msg = "Failed to create PA WAR for " + contextName;
        log.error(msg, e);
        throw new RegistryException(msg, e);
      }

      MutablePortletApplication pa = (MutablePortletApplication) registry
        .getPortletApplication(contextName);
View Full Code Here

    protected void retryStartPortletApplication(String contextName, String contextPath, FileSystemHelper warStruct, ClassLoader paClassLoader, int paType) throws RegistryException
    {
        // Retry to start application according to configuration. Note
        // that this method is not declared transactional to allow clean
        // retries within a single transaction.
        RegistryException tryStartException = null;
        for (int i = 0; (i < maxRetriedStarts+1); i++)
        {
            try
            {
                // try to start portlet application
View Full Code Here

           
            if (pa != null)
            {
                if (portletFactory.isPortletApplicationRegistered(pa))
                {
                    throw new RegistryException("Portlet Application " + paName + " still running");
                }

                unregisterPortletApplication(pa, true);
                try
                {
View Full Code Here

        if ((contextName.length() >= prefixLength)
            && contextName.substring(0, prefixLength).equalsIgnoreCase(LOCAL_PA_PREFIX))
        {
            if (!local)
            {
                throw new RegistryException("Prefix \"" + LOCAL_PA_PREFIX
                    + "\" is reserved for Local Portlet Applications only.");
            }
        }
        else if (local)
        {
            throw new RegistryException("Prefix \"" + LOCAL_PA_PREFIX
                + "\" is required for Local Portlet Applications.");
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.components.portletregistry.RegistryException

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.