Package org.jasig.portal

Examples of org.jasig.portal.PortalException


        if (mCarFile == null)
        {
            CarResources cRes = CarResources.getInstance();
            URL classUrl = cRes.findResource(mClassFilePath);
            if (classUrl == null)
                throw new PortalException(
                        "Unable to locate CAR containing compiled " +
                        "controller class file '" + mClassFilePath + "'.");
            String carPath = classUrl.toExternalForm();
            carPath = carPath.substring("jar:file:".length());
            carPath = carPath.substring(0, carPath.indexOf('!'));
            mCarFile = new File(carPath);

            if (!mCarFile.exists())
                throw new PortalException("Unable to locate CAR '" + carPath
                        + "'. Resources can't be deployed.");
        }
        return mCarFile;
    }
View Full Code Here


        if (ctxRelativePath.endsWith("/") || ctxRelativePath.endsWith("\\"))
            ctxRelativePath = ctxRelativePath.substring(0, ctxRelativePath
                    .length() - 1);
        String realPath = ctx.getRealPath(ctxRelativePath);
        if (realPath == null)
            throw new PortalException(
                "Unable to locate directory " + ctxRelativePath);
        return realPath;
    }
View Full Code Here

        URL classUrl = cLdr.getResource(mClassFilePath);

        // if null then not in CAR or on classpath
        if (classUrl == null)
            throw new PortalException(
                "Class file, '" + mClassFilePath + "' not found on classpath.");

        String classUrlPath = classUrl.toExternalForm();
        if (classUrlPath.startsWith("file:"))
        {
View Full Code Here

        {
            return (Document) person.getAttribute( Constants.PLF );
        }
        catch ( Exception ex )
        {
            throw new PortalException( ex );
        }
    }
View Full Code Here

          } else {
              tab.setName(tabName);
          }
          ulm.updateNode(tab);
      } else {
          throw new PortalException("Attempt to rename immutable tab " + tabId + "has failed");
      }
  }
View Full Code Here

        } catch (Exception e) {
            // we log and wrap in PortalExceptions Exceptions other than
            // PortalException and RuntimeException, so that we conform to
            // the IChannel API.
            log.error("Error rendering CAbstractXSLT instance.", e);
            throw new PortalException(e);
        }
   
       
        if (log.isTraceEnabled()) {
            log.trace("returning from renderXML()");
View Full Code Here

        String override = param.getAttribute("override");
        if (override != null && override.equals("yes"))
          overridableParams.add(param);
      }
    } else {
      throw new PortalException("Channel " + channelPublishId + " is missing from the channel registry");
    }
    return overridableParams;
  }
View Full Code Here

        upm.setNewUserLayoutAndUserPreferences(null, userPrefs);
    } else {
      try {
          ulStore.putUserPreferences(staticData.getPerson(), userPrefs);
      } catch (Exception e) {
        throw new PortalException(e);
      }
    }
  }
View Full Code Here

              try {
                  ssup.setFolderAttributeValue(tab.getId(), "externalId", tabExternalId);
                  ulStore.setStructureStylesheetUserPreferences(staticData.getPerson(),
                                editedUserProfile.getProfileId(), ssup);
              } catch (Exception e) {
                throw new PortalException("Failed to set the 'externalId' attribute of tab '" +
                            tabId + "' in StructureStylesheetUserPreferences", e);
              }
          } else {
            // tabExternalId is not specified... need to remove it if present...
            if (ssup.getDefinedFolderAttributeValue(tab.getId(), "externalId") != null) {
              // It *is* previously specified, and being removed...
                  try {
                    // Setting to null and saving will remove it from DB.
                      ssup.setFolderAttributeValue(tab.getId(), "externalId", null);
                      ulStore.setStructureStylesheetUserPreferences(staticData.getPerson(),
                                  editedUserProfile.getProfileId(), ssup);
                  } catch (Exception e) {
                    throw new PortalException("Failed to remove the 'externalId' attribute of tab '" +
                                tabId + "' in StructureStylesheetUserPreferences", e);
                  }             
            }
          }

      } else {
       
          throw new PortalException("attempt.to.rename.immutable.tab" +tabId);
      }
      saveLayout(false);
  }
View Full Code Here

            StructureStylesheetUserPreferences ssup = userPrefs.getStructureStylesheetUserPreferences();
            ssup.setFolderAttributeValue(newTab.getId(), "externalId", tabExternalId);
            int profileId = editedUserProfile.getProfileId();
            ulStore.setStructureStylesheetUserPreferences(staticData.getPerson(), profileId, ssup);
        } catch (Exception e) {
          throw new PortalException("Failed to set the 'externalId' attribute of tab '" +
                newTab.getId() + "' in StructureStylesheetUserPreferences", e);
        }
    }

    saveLayout(false);
View Full Code Here

TOP

Related Classes of org.jasig.portal.PortalException

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.