package com.capgemini.reports.filter;

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.snecmaobjects.ISnecmaObject;


/** Filters objects according to their type. */
public class FilterIncludeByType extends TcTypeInclusionFilter implements IFilterExplosionNomenclature {

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

    @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());
    }
}
