Examples of Violations


Examples of net.sourceforge.chaperon.model.Violations

   *
   * @return Return a list of violations, if this object isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

    if (definition==null)
    {
      if (symbol!=null)
        violations.addViolation("Lexeme "+symbol+" contains no definition", location);
      else
        violations.addViolation("Lexeme contains no definition", location);
    }

    if ((symbol!=null) && (symbol.getName().equals("error")))
      violations.addViolation("Symbol with name \"error\" is not allowed", location);

    return violations;
  }
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations

   *
   * @return Return a list of violations, if this pattern isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

    /*if (pattern==null)
      violations.addViolation("Multiplier contains no pattern",
                              getLocation());*/
    for (int i = 0; i<getPatternCount(); i++)
      violations.addViolations(getPattern(i).validate());

    return violations;
  }
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations

   *
   * @return Return a list of violations, if this object isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

    if (symbol==null)
      violations.addViolation("No symbol is for the left side defined", location);

    if (getPatternCount()==0)
      violations.addViolation("No pattern are for the right side defined", location);

    for (int i = 0; i<getPatternCount(); i++)
      violations.addViolations(getPattern(i).validate());

    return violations;
  }
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations

   *
   * @return Return a list of violations, if this pattern isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

    if (symbol==null)
      violations.addViolation("No symbol defined for element", location);

    return violations;
  }
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations

   *
   * @return Return a list of violations, if this pattern isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

    if ((first==null) || (last==null))
      violations.addViolation("Interval is incomplete", getLocation());

    if (first.getCharacter()>last.getCharacter())
      violations.addViolation("First is greater than the last", getLocation());

    if (first.getCharacter()==last.getCharacter())
      violations.addViolation("First is equal than the last", getLocation());

    return violations;
  }
View Full Code Here

Examples of net.sourceforge.chaperon.model.Violations

   *
   * @return Return a list of violations, if this pattern isn't valid.
   */
  public Violations validate()
  {
    Violations violations = new Violations();

    /*if (getPatternCount()==0)
      violations.addViolation("Sequence doesn't contain any elements",
                              getLocation());*/
    for (int i = 0; i<getPatternCount(); i++)
      violations.addViolations(getPattern(i).validate());

    return violations;
  }
View Full Code Here

Examples of org.apache.accumulo.core.constraints.Violations

  public CommitSession prepareMutationsForCommit(TservConstraintEnv cenv, List<Mutation> mutations) throws TConstraintViolationException {
   
    ConstraintChecker cc = constraintChecker.get();
   
    List<Mutation> violators = null;
    Violations violations = new Violations();
    cenv.setExtent(extent);
    for (Mutation mutation : mutations) {
      Violations more = cc.check(cenv, mutation);
      if (more != null) {
        violations.add(more);
        if (violators == null)
          violators = new ArrayList<Mutation>();
        violators.add(mutation);
View Full Code Here

Examples of org.apache.accumulo.core.constraints.Violations

    this.maxLatency = config.getMaxLatency(TimeUnit.MILLISECONDS) <= 0 ? Long.MAX_VALUE : config.getMaxLatency(TimeUnit.MILLISECONDS);
    this.credentials = credentials;
    this.timeout = config.getTimeout(TimeUnit.MILLISECONDS);
    mutations = new MutationSet();
   
    violations = new Violations();
   
    authorizationFailures = new HashMap<KeyExtent,Set<SecurityErrorCode>>();
    serverSideErrors = new HashSet<String>();
   
    lastProcessingStartTime = System.currentTimeMillis();
View Full Code Here

Examples of org.apache.accumulo.core.constraints.Violations

      security.authenticateUser(credentials, credentials);
      if (updateMetrics.isEnabled())
        updateMetrics.add(TabletServerUpdateMetrics.permissionErrors, 0);
     
      UpdateSession us = new UpdateSession();
      us.violations = new Violations();
      us.credentials = credentials;
      us.cenv = new TservConstraintEnv(security, us.credentials);
     
      long sid = sessionManager.createSession(us, false);
     
View Full Code Here

Examples of org.apache.accumulo.core.constraints.Violations

  public CommitSession prepareMutationsForCommit(TservConstraintEnv cenv, List<Mutation> mutations) throws TConstraintViolationException {
   
    ConstraintChecker cc = constraintChecker.get();
   
    List<Mutation> violators = null;
    Violations violations = new Violations();
    cenv.setExtent(extent);
    for (Mutation mutation : mutations) {
      Violations more = cc.check(cenv, mutation);
      if (more != null) {
        violations.add(more);
        if (violators == null)
          violators = new ArrayList<Mutation>();
        violators.add(mutation);
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.