/* Copyright (c) 2003, Oracle Corporation. All Rights Reserved. */
package oracle.portal.provider.v2;

import oracle.portal.provider.v2.utils.ValidationError;

/**
 * <code>Validateable</code> objects have the ability to validate their
 * internal state and report errors to calling code. See the {@link
 * #validate(String, ValidationError)} method.
 */
public interface Validateable
{

    /**
     * Validate the internal state of this <code>Validateable</code>
     * instance. Append context information to the supplied
     * <code>java.lang.String</code> and report any errors to the supplied
     * {@link oracle.portal.provider.v2.utils.ValidationError}.
     *
     * @param context A <code>java.lang.String</code> representing the context
     * as far as the calling client. <code>Validateable</code> instances append
     * context information here.
     *
     * @param errors A {@link oracle.portal.provider.v2.utils.ValidationError}
     * instance to be used for reporting errors.
     */
    public void validate(String context, ValidationError errors);

}
