Examples of Hook


Examples of com.jcabi.github.Hook

     * @throws Exception If some problem inside
     */
    @Test
    public void canCreateHook() throws Exception {
        final Hooks hooks = MkHooksTest.repo().hooks();
        final Hook hook = hooks.create(
            "geocommit", Collections.<String, String>emptyMap()
        );
        MatcherAssert.assertThat(
            hooks.iterate().iterator().next().number(),
            Matchers.equalTo(hook.number())
        );
    }
View Full Code Here

Examples of fr.soleil.lib.flyscan.model.parsing.configuration.fsobject.actor.Hook

                            else if (name.equals(ParsingUtil.SENSOR)) {
                                currentObject = new Sensor(currentSection);
                            } else if (name.equals(ParsingUtil.TIMEBASE)) {
                                currentObject = new TimeBase(currentSection);
                            } else if (name.equals(ParsingUtil.HOOK)) {
                                currentObject = new Hook(currentSection);
                            } else if (name.equals(ParsingUtil.MONITOR)) {
                                currentObject = new Monitor(currentSection);
                            } else if (name.startsWith(ParsingUtil.CONSTRAINT)) {
                                // Hierarchical constraint case processing
                                currentObject = new HierarchicalConstraint(currentSection);
View Full Code Here

Examples of org.apache.james.protocols.smtp.hook.Hook

     * @param index
     * @return hook
     * @throws WiringException
     */
    public final synchronized Hook removeHook(int index) throws WiringException {
        Hook hook = hooks.remove(index);
        handlers.remove(hook);
        wireExtensibleHandlers();
        return hook;

    }
View Full Code Here

Examples of org.apache.james.protocols.smtp.hook.Hook

     * @param index
     * @return hook
     * @throws WiringException
     */
    public final synchronized Hook removeHook(int index) throws WiringException {
        Hook hook = hooks.remove(index);
        handlers.remove(hook);
        wireExtensibleHandlers();
        return hook;

    }
View Full Code Here

Examples of org.mifosplatform.infrastructure.hooks.domain.Hook

      final Set<HookConfiguration> config = assembleConfig(
          command.mapValueOfParameterNamed(configJson), template);
      final JsonArray events = command
          .arrayOfParameterNamed(eventsParamName);
      final Set<HookResource> allEvents = assembleSetOfEvents(events);
      final Hook hook = Hook.fromJson(command, template, config,
          allEvents);

      validateHookRules(template, config, allEvents);

      this.hookRepository.save(hook);

      return new CommandProcessingResultBuilder()
          .withCommandId(command.commandId())
          .withEntityId(hook.getId()).build();
    } catch (final DataIntegrityViolationException dve) {
      handleHookDataIntegrityIssues(command, dve);
      return CommandProcessingResult.empty();
    }
  }
View Full Code Here

Examples of org.mifosplatform.infrastructure.hooks.domain.Hook

    try {
      this.context.authenticatedUser();

      this.fromApiJsonDeserializer.validateForUpdate(command.json());

      final Hook hook = retrieveHookBy(hookId);
      final HookTemplate template = hook.getHookTemplate();
      final Map<String, Object> changes = hook.update(command);

      if (!changes.isEmpty()) {

        if (changes.containsKey(eventsParamName)) {
          final Set<HookResource> events = assembleSetOfEvents(command
              .arrayOfParameterNamed(eventsParamName));
          final boolean updated = hook.updateEvents(events);
          if (!updated) {
            changes.remove(eventsParamName);
          }
        }

        if (changes.containsKey(configParamName)) {
          final String configJson = command
              .jsonFragment(configParamName);
          final Set<HookConfiguration> config = assembleConfig(
              command.mapValueOfParameterNamed(configJson),
              template);
          final boolean updated = hook.updateConfig(config);
          if (!updated) {
            changes.remove(configParamName);
          }
        }
View Full Code Here

Examples of org.mifosplatform.infrastructure.hooks.domain.Hook

  @CacheEvict(value = "hooks", allEntries = true)
  public CommandProcessingResult deleteHook(final Long hookId) {

    this.context.authenticatedUser();

    final Hook hook = retrieveHookBy(hookId);

    try {
      this.hookRepository.delete(hook);
      this.hookRepository.flush();
    } catch (final DataIntegrityViolationException e) {
View Full Code Here

Examples of org.mifosplatform.infrastructure.hooks.domain.Hook

    return new CommandProcessingResultBuilder().withEntityId(hookId)
        .build();
  }

  private Hook retrieveHookBy(final Long hookId) {
    final Hook hook = this.hookRepository.findOne(hookId);
    if (hook == null) {
      throw new HookNotFoundException(hookId.toString());
    }
    return hook;
  }
View Full Code Here

Examples of org.owasp.webscarab.plugin.Hook

       
    private void removeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeButtonActionPerformed
        TreePath path = _hookTree.getTree().getSelectionPath();
        if (path.getPathCount()==4) {
            String plugin = (String) path.getPathComponent(1);
            Hook hook = (Hook) path.getPathComponent(2);
            Script script = (Script) path.getPathComponent(3);
            _manager.removeScript(plugin, hook, script);
        }
    }//GEN-LAST:event_removeButtonActionPerformed
View Full Code Here

Examples of org.owasp.webscarab.plugin.Hook

    }//GEN-LAST:event_removeButtonActionPerformed
   
    private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addButtonActionPerformed
        TreePath path = _hookTree.getTree().getSelectionPath();
        String plugin = null;
        Hook hook = null;
        if (path.getPathCount()>=3) {
            plugin = (String) path.getPathComponent(1);
            hook = (Hook) path.getPathComponent(2);
        } else {
            return;
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.