Package com.dotmarketing.business

Examples of com.dotmarketing.business.Interceptor


  }
 
  private void setUpHooks(String pluginId) throws InstantiationException, IllegalAccessException, ClassNotFoundException, DotDataException{

    PluginAPI pluginAPI = APILocator.getPluginAPI();
    Interceptor conI = (Interceptor)APILocator.getContentletAPIntercepter();
    String conPreHooks = pluginAPI.loadPluginConfigProperty(pluginId, "contentletapi.prehooks");
    String conPostHooks = pluginAPI.loadPluginConfigProperty(pluginId, "contentletapi.posthooks");
    if(UtilMethods.isSet(conPreHooks)){
      String[] pres = conPreHooks.split(",");
      for (String string : pres) {
        conI.addPreHook(string);
      }
    }
    if(UtilMethods.isSet(conPostHooks)){
      String[] post = conPostHooks.split(",");
      for (String string : post) {
        conI.addPostHook(string);
      }
    }
  }
View Full Code Here


     * @param preHook
     * @throws Exception
     */
    protected void addPreHook ( Object preHook ) throws Exception {

        Interceptor interceptor = (Interceptor) APILocator.getContentletAPIntercepter();
        //First we need to be sure we are not adding the same hook more than once
        interceptor.delPreHookByClassName( preHook.getClass().getName() );

        if ( preHooks == null ) {
            preHooks = new ArrayList<String>();
        }

        interceptor.addPreHook( preHook );
        preHooks.add( preHook.getClass().getName() );
    }
View Full Code Here

     * @param postHook
     * @throws Exception
     */
    protected void addPostHook ( Object postHook ) throws Exception {

        Interceptor interceptor = (Interceptor) APILocator.getContentletAPIntercepter();
        //First we need to be sure we are not adding the same hook more than once
        interceptor.delPostHookByClassName( postHook.getClass().getName() );

        if ( postHooks == null ) {
            postHooks = new ArrayList<String>();
        }

        interceptor.addPostHook( postHook );
        postHooks.add( postHook.getClass().getName() );
    }
View Full Code Here

     */
    protected void unregisterPostHooks () {

        if ( postHooks != null ) {

            Interceptor interceptor = (Interceptor) APILocator.getContentletAPIntercepter();
            for ( String postHook : postHooks ) {
                interceptor.delPostHookByClassName( postHook );
            }
        }
    }
View Full Code Here

     */
    protected void unregisterPreHooks () {

        if ( preHooks != null ) {

            Interceptor interceptor = (Interceptor) APILocator.getContentletAPIntercepter();
            for ( String preHook : preHooks ) {
                interceptor.delPreHookByClassName( preHook );
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.dotmarketing.business.Interceptor

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.