Package javax.portlet

Examples of javax.portlet.PreferencesValidator


*/
public class ScriptPortletPreferencesValidator implements PreferencesValidator
{
    public void validate(PortletPreferences preferences) throws ValidatorException
    {
        PreferencesValidator delegatee = ScriptPortlet.getCurrentValidatorInstance();
       
        if (delegatee != null)
        {
            delegatee.validate(preferences);
        }
    }
View Full Code Here


                    return;
                }
               
                validatorSourceLastModified = checkedScriptSourceLastModified;
                validatorSourceLastEvalStarted = System.currentTimeMillis();
                PreferencesValidator tempValidatorInstance = null;
                Object evalPortlet = ScriptEngineUtils.evaluateScript(scriptEngine, validatorSource, evalKey, true);
                validatorSourceLastEvaluated = System.currentTimeMillis();
                   
                if (evalPortlet instanceof PreferencesValidator)
                {
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 PreferencesValidator getPreferencesValidator(PortletDefinition pd)
    {
        PreferencesValidator validator = null;
        try
        {
            String pdId = pd.getId().toString();
           
            synchronized (validatorCache)
View Full Code Here

        {
            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

        }
    }
   
    public PreferencesValidator getPreferencesValidator(PortletDefinition pd)
    {
        PreferencesValidator validator = null;
        try
        {
            String paName = ((PortletApplication)pd.getPortletApplicationDefinition()).getName();
            String pdName = pd.getName();
           
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 pdId = pd.getId().toString();
           
            synchronized (validatorCache)
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

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.