package com.capgemini.reports.definition.r11report.data.extractor;

import com.capgemini.framework.teamcenter.authent.TcSession;
import com.capgemini.framework.teamcenter.resolution.filtering.TcTypeInclusionFilter;
import com.capgemini.reports.bomlineholder.BOMLineHolder;
import com.capgemini.reports.filter.IFilterExplosionNomenclature;
import com.capgemini.reports.snecmaobjects.ISnecmaObject;

/**
 * Class which allow to filter some objects which is defined in lstTypeObject.
 */
public class FilterByTypeObject extends TcTypeInclusionFilter implements IFilterExplosionNomenclature {

    /**
     * Builds a Filter instance, that will ALLOW any object of the provided type.
     *
     * @param lstTypeObject the object types to be included
     */
    public FilterByTypeObject(final String... lstTypeObject) {
        super(lstTypeObject);
    }

    @Override
    public boolean isExcluded(TcSession session, final BOMLineHolder objectToFind) {
        return super.isExcluded(objectToFind.getObjectType());
    }

    @Override
    public boolean isExcluded(final ISnecmaObject object) {
        return super.isExcluded(object.getType());
    }
}
