public void validateCreate()

in curator-framework/src/main/java/org/apache/curator/framework/schema/Schema.java [169:187]


    public void validateCreate(CreateMode mode, String path, byte[] data, List<ACL> acl) {
        if (mode.isEphemeral() && (ephemeral == Allowance.CANNOT)) {
            throw new SchemaViolation(this, new SchemaViolation.ViolatorData(path, data, acl), "Cannot be ephemeral");
        }

        if (!mode.isEphemeral() && (ephemeral == Allowance.MUST)) {
            throw new SchemaViolation(this, new SchemaViolation.ViolatorData(path, data, acl), "Must be ephemeral");
        }

        if (mode.isSequential() && (sequential == Allowance.CANNOT)) {
            throw new SchemaViolation(this, new SchemaViolation.ViolatorData(path, data, acl), "Cannot be sequential");
        }

        if (!mode.isSequential() && (sequential == Allowance.MUST)) {
            throw new SchemaViolation(this, new SchemaViolation.ViolatorData(path, data, acl), "Must be sequential");
        }

        validateGeneral(path, data, acl);
    }