Examples of Expose


Examples of br.com.ingenieux.mojo.aws.Expose

    /**
     * Fill in defaults if needed
     */
    if (0 == exposes.length) {
      exposes = new Expose[1];
      exposes[0] = new Expose();
      exposes[0].setServerId(this.serverId);
      exposes[0].setAccessKey("aws.accessKey");
      exposes[0].setSharedKey("aws.secretKey");
    } else {
      /**
       * Validate parameters, for gods sake
       */
      try {
        for (Expose e : exposes) {
          assertOrWarn(StringUtils.isNotBlank(e.getServerId()),
              "serverId must be supplied");
          assertOrWarn(StringUtils.isNotBlank(e.getAccessKey()),
              "accessKey must be supplied");
          assertOrWarn(StringUtils.isNotBlank(e.getSharedKey()),
              "sharedKey must be supplied");
        }
      } catch (IllegalStateException e) {
        return null;
      }
    }

    for (Expose e : exposes) {
      Expose realExpose = super.exposeSettings(e.getServerId());

      getLog().info(
          String.format(
              "Writing Security Settings from serverId ('%s') into properties '%s' (accessKey) and '%s' (secretKey)",
              e.getServerId(), e.getAccessKey(), e.getSharedKey()));

      project.getProperties().put(e.getAccessKey(),
          realExpose.getAccessKey());

      project.getProperties().put(e.getSharedKey(),
          realExpose.getSharedKey());
    }

    return null;
  }
View Full Code Here

Examples of br.com.ingenieux.mojo.aws.Expose

    /**
     * Fill in defaults if needed
     */
    if (0 == exposes.length) {
      exposes = new Expose[1];
      exposes[0] = new Expose();
      exposes[0].setServerId(this.serverId);
      exposes[0].setAccessKey("aws.accessKey");
      exposes[0].setSharedKey("aws.secretKey");
    } else {
      /**
       * Validate parameters, for gods sake
       */
      try {
        for (Expose e : exposes) {
          assertOrWarn(StringUtils.isNotBlank(e.getServerId()),
              "serverId must be supplied");
          assertOrWarn(StringUtils.isNotBlank(e.getAccessKey()),
              "accessKey must be supplied");
          assertOrWarn(StringUtils.isNotBlank(e.getSharedKey()),
              "sharedKey must be supplied");
        }
      } catch (IllegalStateException e) {
        return null;
      }
    }

    for (Expose e : exposes) {
      Expose realExpose = super.exposeSettings(e.getServerId());

      getLog().info(
          String.format(
              "Writing Security Settings from serverId ('%s') into properties '%s' (accessKey) and '%s' (secretKey)",
              e.getServerId(), e.getAccessKey(), e.getSharedKey()));

      project.getProperties().put(e.getAccessKey(),
          realExpose.getAccessKey());

      project.getProperties().put(e.getSharedKey(),
          realExpose.getSharedKey());
    }

    return null;
  }
View Full Code Here

Examples of br.com.ingenieux.mojo.aws.Expose

    /**
     * Fill in defaults if needed
     */
    if (0 == exposes.length) {
      exposes = new Expose[1];
      exposes[0] = new Expose();
      exposes[0].setServerId(this.serverId);
      exposes[0].setAccessKey("aws.accessKey");
      exposes[0].setSharedKey("aws.secretKey");
    } else {
      /**
       * Validate parameters, for gods sake
       */
      for (Expose e : exposes) {
        Validate.isTrue(StringUtils.isNotBlank(e.getServerId()),
            "serverId must not supplied");
        Validate.isTrue(StringUtils.isNotBlank(e.getAccessKey()),
            "accessKey must not supplied");
        Validate.isTrue(StringUtils.isNotBlank(e.getSharedKey()),
            "sharedKey must not supplied");
      }
    }

    for (Expose e : exposes) {
      Expose realExpose = super.exposeSettings(e.getServerId());

      getLog().info(
          String.format(
              "Writing Security Settings from serverId ('%s') into properties '%s' (accessKey) and '%s' (secretKey)",
              e.getServerId(), e.getAccessKey(), e.getSharedKey()));

      project.getProperties().put(e.getAccessKey(),
          realExpose.getAccessKey());
     
      project.getProperties().put(e.getSharedKey(),
          realExpose.getSharedKey());
    }

    return null;
  }
View Full Code Here

Examples of br.com.ingenieux.mojo.aws.Expose

    /**
     * Fill in defaults if needed
     */
    if (0 == exposes.length) {
      exposes = new Expose[1];
      exposes[0] = new Expose();
      exposes[0].setServerId(this.serverId);
      exposes[0].setAccessKey("aws.accessKey");
      exposes[0].setSharedKey("aws.secretKey");
    } else {
      /**
       * Validate parameters, for gods sake
       */
      try {
        for (Expose e : exposes) {
          assertOrWarn(StringUtils.isNotBlank(e.getServerId()),
              "serverId must be supplied");
          assertOrWarn(StringUtils.isNotBlank(e.getAccessKey()),
              "accessKey must be supplied");
          assertOrWarn(StringUtils.isNotBlank(e.getSharedKey()),
              "sharedKey must be supplied");
        }
      } catch (IllegalStateException e) {
        return null;
      }
    }

    for (Expose e : exposes) {
      Expose realExpose = null;

      try {
        realExpose = super.exposeSettings(e.getServerId());
      } catch (Exception exc) {
        getLog().warn("Failed to Expose Settings from serverId ('" + e.getServerId() + "')");
        continue;
      }

      getLog().info(
          String.format(
              "Writing Security Settings from serverId ('%s') into properties '%s' (accessKey) and '%s' (secretKey)",
              e.getServerId(), e.getAccessKey(), e.getSharedKey()));

      project.getProperties().put(e.getAccessKey(),
          realExpose.getAccessKey());

      project.getProperties().put(e.getSharedKey(),
          realExpose.getSharedKey());
    }

    return null;
  }
View Full Code Here

Examples of com.google.gson.annotations.Expose

  public boolean shouldSkipClass(Class<?> clazz) {
    return false;
  }

  public boolean shouldSkipField(FieldAttributes f) {
    Expose annotation = f.getAnnotation(Expose.class);
    if (annotation == null) {
      return true;
    }
    return !annotation.serialize();
  }
View Full Code Here

Examples of com.google.gson.annotations.Expose

  public boolean shouldSkipClass(Class<?> clazz) {
    return false;
  }

  public boolean shouldSkipField(FieldAttributes f) {
    Expose annotation = f.getAnnotation(Expose.class);
    if (annotation == null) {
      return true;
    }
    return !annotation.deserialize();
  }
View Full Code Here

Examples of com.google.gson.annotations.Expose

    if (field.isSynthetic()) {
      return true;
    }

    if (requireExpose) {
      Expose annotation = field.getAnnotation(Expose.class);
      if (annotation == null || (serialize ? !annotation.serialize() : !annotation.deserialize())) {
        return true;
      }
    }

    if (!serializeInnerClasses && isInnerClass(field.getType())) {
View Full Code Here

Examples of com.massivecraft.mcore.xlib.gson.annotations.Expose

    if (field.isSynthetic()) {
      return true;
    }

    if (requireExpose) {
      Expose annotation = field.getAnnotation(Expose.class);
      if (annotation == null || (serialize ? !annotation.serialize() : !annotation.deserialize())) {
        return true;
      }
    }

    if (!serializeInnerClasses && isInnerClass(field.getType())) {
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.