Package org.jasig.portal

Examples of org.jasig.portal.PortalException


        try
        {
            def = crs.getChannelDefinition(pubId);
        } catch (Exception e)
        {
            throw new PortalException("unable.to.load.channel.definition "
                    + id, e);
        }
        return def.getParameters();
    }
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 {
        editedUserProfile.setLayoutId(0);
        ulStore.updateUserProfile(staticData.getPerson(), editedUserProfile);
        ulm.loadUserLayout();
      } catch (Exception e) {
        throw new PortalException(e);
      }
      // return to the default state
      BaseState df = new DefaultState(context);
      df.setStaticData(staticData);
      context.setState(df);
View Full Code Here

        editedUserProfile.setLayoutId(0);
        ulStore.updateUserProfile(user, editedUserProfile);
        user.setAttribute( Constants.PLF, null );
        ulm.loadUserLayout(true);
      } catch (Exception e) {
        throw new PortalException(e);
      }
      // return to the default state
      BaseState df = new DefaultState(context);
      df.setStaticData(staticData);
      context.setState(df);
View Full Code Here

    private static void initialize() throws PortalException {
        try {
            // Create an instance of the IAccountStore as specified in portal.properties
            accountStoreImpl = new RDBMAccountStore();
        } catch (Exception e) {
            throw new PortalException("AccountStoreFactory: Could obtain an instance of RDBMAccountStore", e);
        }
    }
View Full Code Here

                  profile = context.getUserLayoutStore().getSystemProfileById(profileId.intValue());
                } else {
                    profile = context.getUserLayoutStore().getUserProfileById(context.getPerson(), profileId.intValue());
                }
              } catch (Exception e) {
                throw new PortalException(e);
              }
             
              if (profile == null) {
                // failed to find the specified profile, return to the base state
                context.setState(null);
              }
            }
          }
        } else if (action.equals("completeEdit")) {
          if (runtimeData.getParameter("submitCancel") != null) {
            // cancel button has been hit
            context.setState(null);
          } else if (runtimeData.getParameter("submitSave") != null) {
            // save changes
            profile.setProfileName(runtimeData.getParameter("profileName"));
            profile.setProfileDescription(runtimeData.getParameter("profileDescription"));
            // determine new theme stylesheet id
            int newId = Integer.parseInt(runtimeData.getParameter("stylesheetID"));
            if (newId != profile.getThemeStylesheetId()) {
              profile.setThemeStylesheetId(newId);
              // see if the mime type has changed, alert user
            }
            try {
                if (profile.isSystemProfile()) {
                    // only administrative users should be able to do this
                    context.getUserLayoutStore().updateSystemProfile(profile);
                } else {
                    context.getUserLayoutStore().updateUserProfile(context.getPerson(), profile);
                }
            } catch (Exception e) {
              throw new PortalException(e);
            }
            context.setState(null);
          }
        }
      }
View Full Code Here

        Element themeEl = doc.createElement("themestylesheets");
        Hashtable tsList;
        try {
          tsList = context.getUserLayoutStore().getThemeStylesheetList(profile.getStructureStylesheetId());
        } catch (Exception e) {
          throw new PortalException(e);
        }
        if (tsList == null) {
            throw  new ResourceMissingException("", "List of theme stylesheets for the structure stylesheet \"" + profile.getStructureStylesheetId()+ "\"", "Unable to obtain a list of theme stylesheets for the specified structure stylesheet");
        }
View Full Code Here

                  profile = context.getUserLayoutStore().getSystemProfileById(profileId.intValue());
                } else {
                    profile = context.getUserLayoutStore().getUserProfileById(context.getPerson(), profileId.intValue());
                }
              } catch (Exception e) {
                throw new PortalException(e);
              }
             
              if (profile == null) {
                // failed to find the specified profile, return to the base state
                context.setState(null);
              }
            }
          }
        } else if (action.equals("completeEdit")) {
          if (runtimeData.getParameter("submitCancel") != null) {
            // cancel button has been hit
            context.setState(null);
          } else if (runtimeData.getParameter("submitSave") != null) {
            // save changes
            profile.setProfileName(runtimeData.getParameter("profileName"));
            profile.setProfileDescription(runtimeData.getParameter("profileDescription"));
            // determine new theme stylesheet id
            int newId = Integer.parseInt(runtimeData.getParameter("stylesheetID"));
            if (newId != profile.getThemeStylesheetId()) {
              profile.setThemeStylesheetId(newId);
              // see if the mime type has changed, alert user
            }
            try {
                if (profile.isSystemProfile()) {
                    // only administrative users should be able to do this
                    context.getUserLayoutStore().updateSystemProfile(profile);
                } else {
                    context.getUserLayoutStore().updateUserProfile(context.getPerson(), profile);
                }
            } catch (Exception e) {
              throw new PortalException(e);
            }
            context.setState(null);
          }
        }
      }
View Full Code Here

        Element themeEl = doc.createElement("themestylesheets");
        Hashtable tsList;
        try {
          tsList = context.getUserLayoutStore().getThemeStylesheetList(profile.getStructureStylesheetId());
        } catch (Exception e) {
          throw new PortalException(e);
        }
        if (tsList == null) {
            throw  new ResourceMissingException("", "List of theme stylesheets for the structure stylesheet \"" + profile.getStructureStylesheetId()+ "\"", "Unable to obtain a list of theme stylesheets for the specified structure stylesheet");
        }
View Full Code Here

        final GetMethod get = new GetMethod(xmlUri);
        try {
          get.setFollowRedirects(true);
          final int rc = client.executeMethod(get);
          if (rc != HttpStatus.SC_OK) {
            throw new PortalException("HttpStatus:"+ rc+" url: " + xmlUri);
          }
          final InputStream in = get.getResponseBodyAsStream();
          feed = input.build(new XmlReader(in));
        } finally {
          get.releaseConnection();
        }
      } else {
      URL feedUrl;
      feedUrl = new URL(xmlUri);
      feed = input.build(new XmlReader(feedUrl));
      }
    } catch (MalformedURLException e) {
      throw new PortalException(e);
    } catch (IllegalArgumentException e) {
      throw new PortalException(e);
    } catch (FeedException e) {
      throw new PortalException(e);
    } catch (IOException e) {
      throw new PortalException(e);
    } catch (BlockedUriException e) {
      throw new PortalException(e);
    }
    return feed;
  }
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.