Package javax.portlet

Examples of javax.portlet.PreferencesValidator


        }
    }

    public PreferencesValidator getPreferencesValidator(PortletDefinition pd)
    {
        PreferencesValidator validator = null;
       
        try
        {
            String paName = pd.getApplication().getName();
            String pdName = pd.getPortletName();
View Full Code Here


     */
    private void internalStore() throws IOException, ValidatorException {
        // Validate the preferences before storing, if a validator is defined.
        //   If the preferences cannot pass the validation,
        //   an ValidatorException will be thrown out.
        PreferencesValidator validator = window.getPortletEntity()
            .getPreferencesValidator();
        if (validator != null) {
          validator.validate(this);
        }
        // Store the portlet preferences.
        InternalPortletPreference[] prefs = (InternalPortletPreference[])
            (new ArrayList(preferences.values())).toArray(
                new InternalPortletPreference[preferences.size()]);
View Full Code Here

     * @return the preferences validator instance for this portlet.
     * @throws ValidatorException  if fail to instantiate the validator.
     */
    public PreferencesValidator getPreferencesValidator()
    throws ValidatorException {
      PreferencesValidator validator = PreferencesValidatorRegistry
          .getRegistry()
          .getPreferencesValidator(getPortletDefinition());
      return validator;
    }
View Full Code Here

   */
  public PreferencesValidator getPreferencesValidator(PortletDD portletDD)
  throws ValidatorException {
   
    // Try to retrieve the validator from cache.
    PreferencesValidator validator = (PreferencesValidator)
        cache.get(portletDD);
    if (validator != null) {
      return validator;
    }
   
View Full Code Here

   public PortletRequestImpl(PortletContainerImpl container, PortletInvocation invocation)
   {
      int mode = this instanceof RenderRequest ? PortletPreferencesImpl.RENDER : PortletPreferencesImpl.ACTION;
      PropertyContext prefs = (PropertyContext)invocation.getAttribute(PropertyContext.PREFERENCES_ATTRIBUTE);
      PreferencesValidator validator = container.getPreferencesValidator();
      ContainerPortletInfo info = container.getInfo();
      ContainerPreferencesInfo containerPrefs = info.getPreferences();
      ContainerNavigationInfo navigationInfo = info.getNavigation();
      UserContext userContext = invocation.getUserContext();
      HttpServletRequestWrapper realReq = new HttpServletRequestWrapper(invocation.getDispatchedRequest());
View Full Code Here

     */
    private void internalStore() throws IOException, ValidatorException {
        // Validate the preferences before storing, if a validator is defined.
        //   If the preferences cannot pass the validation,
        //   an ValidatorException will be thrown out.
        PreferencesValidator validator = window.getPortletEntity()
            .getPreferencesValidator();
        if (validator != null) {
          validator.validate(this);
        }
        // Store the portlet preferences.
        InternalPortletPreference[] prefs = (InternalPortletPreference[])
            (new ArrayList(preferences.values())).toArray(
                new InternalPortletPreference[preferences.size()]);
View Full Code Here

     * @return the preferences validator instance for this portlet.
     * @throws ValidatorException  if fail to instantiate the validator.
     */
    public PreferencesValidator getPreferencesValidator()
    throws ValidatorException {
      PreferencesValidator validator = PreferencesValidatorRegistry
          .getRegistry()
          .getPreferencesValidator(getPortletDefinition());
      return validator;
    }
View Full Code Here

     * @return the preferences validator instance for this portlet.
     * @throws ValidatorException  if fail to instantiate the validator.
     */
    public PreferencesValidator getPreferencesValidator()
    throws ValidatorException {
      PreferencesValidator validator = PreferencesValidatorRegistry
          .getRegistry()
          .getPreferencesValidator(getPortletDefinition());
      return validator;
    }
View Full Code Here

     */
    protected final void internalStore() throws IOException, ValidatorException {
        // Validate the preferences before storing, if a validator is defined.
        //   If the preferences cannot pass the validation,
        //   an ValidatorException will be thrown out.
        PreferencesValidator validator = window.getPortletEntity()
            .getPreferencesValidator();
        if (validator != null) {
          validator.validate(this);
        }
        // Store the portlet preferences.
        InternalPortletPreference[] prefs = (InternalPortletPreference[])
            (new ArrayList(preferences.values())).toArray(
                new InternalPortletPreference[preferences.size()]);
View Full Code Here

    protected final void internalStore() throws IOException, ValidatorException {
        // Validate the preferences before storing, if a validator is defined.
        //   If the preferences cannot pass the validation,
        //   an ValidatorException will be thrown out.
        PortletDefinition portletD = window.getPortletDefinition();
        PreferencesValidator validator = preferencesService.getPreferencesValidator(portletD);
        if (validator != null)
        {
            validator.validate(this);
        }
        // Store the portlet preferences.
        try {
          preferencesService.store(window, request, preferences);
        } catch (PortletContainerException ex) {
View Full Code Here

TOP

Related Classes of javax.portlet.PreferencesValidator

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.