Examples of PreferencesValidator


Examples of javax.portlet.PreferencesValidator

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

Examples of javax.portlet.PreferencesValidator

        }
    }
   
    public PreferencesValidator getPreferencesValidator(PortletDefinition pd)
    {
        PreferencesValidator validator = null;
        try
        {
            String pdId = pd.getId().toString();
           
            synchronized (validatorCache)
View Full Code Here

Examples of javax.portlet.PreferencesValidator

        }
    }
   
    public PreferencesValidator getPreferencesValidator(PortletDefinition pd)
    {
        PreferencesValidator validator = null;
        try
        {
            String pdId = pd.getId().toString();
           
            synchronized (validatorCache)
View Full Code Here

Examples of javax.portlet.PreferencesValidator

     */
    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

Examples of javax.portlet.PreferencesValidator

     * @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

Examples of javax.portlet.PreferencesValidator

        {
            throw new java.lang.IllegalStateException("store is only allowed inside a processAction call");
        }

        // validate preferences
        PreferencesValidator validator = portletDefinition.getPreferenceSet().getPreferencesValidator();
        if (validator != null)
        {
            validator.validate(this);
        }

        // transfer changes to the top preference set
        PreferenceSet preferences = (PreferenceSet)preferenceSetList.get(0);
        PreferenceSetCtrl preferencesCtrl = (PreferenceSetCtrl)ControllerObjectAccess.get(preferences);
View Full Code Here

Examples of javax.portlet.PreferencesValidator

    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

Examples of javax.portlet.PreferencesValidator

   
    public PreferencesValidator getPreferencesValidator(PortletDefinition portletDD)
    throws ValidatorException {

        // Try to retrieve the validator from cache.
        PreferencesValidator validator = cache.get(portletDD);
        if (validator != null) {
            return validator;
        }

        // Try to construct the validator instance for the portlet definition.
View Full Code Here

Examples of javax.portlet.PreferencesValidator

   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.getRequest());
View Full Code Here

Examples of javax.portlet.PreferencesValidator

   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
TOP
Copyright © 2018 www.massapi.com. 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.