Examples of ORecordHook


Examples of com.orientechnologies.orient.core.hook.ORecordHook

    //OrientDB 1.7:
    Map<ORecordHook, HOOK_POSITION> hooks = db.getHooks();
    List hs = IteratorUtils.toList(hooks.keySet().iterator());
    Iterator<ORecordHook> it =hs.iterator();
    while (it.hasNext()){
      ORecordHook h = it.next();
      if (h instanceof BaasBoxHook) {
        if (Logger.isDebugEnabled()) Logger.debug("Removing "+ ((BaasBoxHook) h).getHookName() + " hook");
        db.unregisterHook(h);
      }
    }
View Full Code Here

Examples of com.orientechnologies.orient.core.hook.ORecordHook

  public static void enableHidePasswordHook(ODatabaseRecordTx db,boolean enable){
    Map<ORecordHook, HOOK_POSITION> hooks = db.getHooks();
    List hs = IteratorUtils.toList(hooks.keySet().iterator());
    Iterator<ORecordHook> it =hs.iterator();
    while (it.hasNext()){
      ORecordHook h = it.next();
      if (h instanceof HidePassword) {
        if (Logger.isDebugEnabled()) Logger.debug("Enable: "+ enable+ " " + ((BaasBoxHook) h).getHookName() + " hook");
        ((HidePassword) h).enable(enable);
        break;
      }
View Full Code Here

Examples of com.orientechnologies.orient.core.hook.ORecordHook

     if (iDatabase instanceof ODatabaseComplex) {
       final ODatabaseComplex<?> db = (ODatabaseComplex<?>) iDatabase;
       for (OServerHookConfiguration hook : configuredHooks) {
         try {
           final ORecordHook.HOOK_POSITION pos = ORecordHook.HOOK_POSITION.valueOf(hook.position);
           final ORecordHook h = (ORecordHook) Class.forName(hook.clazz).newInstance();
           if (hook.parameters != null && hook.parameters.length > 0)
             try {
               final Method m = h.getClass().getDeclaredMethod("config", new Class[] { OServerParameterConfiguration[].class });
               m.invoke(h, new Object[] { hook.parameters });
             } catch (Exception e) {
               OLogManager
                   .instance()
                   .warn(this, "[configure] Failed to configure hook '%s'. Parameters specified but hook don support parameters. Should have a method config with parameters OServerParameterConfiguration[] ", hook.clazz);
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.