Package javax.portlet

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


    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

   
    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

   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

   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

   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

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

        }
    }

    public PreferencesValidator getPreferencesValidator(PortletDefinition pd)
    {
        PreferencesValidator validator = null;
       
        try
        {
            String paName = pd.getApplication().getName();
            String pdName = pd.getPortletName();
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

    public PreferencesValidator getPreferencesValidator(PortletDefinition pd)
    {
      synchronized (cacheMutex)
      {
            PreferencesValidator validator = null;
           
            try
            {
                String paName = pd.getApplication().getName();
                String pdName = pd.getPortletName();
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.