001/*
002 * (C) Copyright 2010 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 * Contributors:
016 * Nuxeo - initial API and implementation
017 */
018
019package org.nuxeo.ecm.platform.types.localconfiguration;
020
021import java.util.List;
022import java.util.Map;
023
024import org.nuxeo.ecm.core.api.localconfiguration.LocalConfiguration;
025import org.nuxeo.ecm.platform.types.SubType;
026
027/**
028 * Local configuration class to handle configuration of UI Types.
029 *
030 * @author <a href="mailto:troger@nuxeo.com">Thomas Roger</a>
031 */
032public interface UITypesConfiguration extends LocalConfiguration<UITypesConfiguration> {
033
034    /**
035     * Returns the configured allowed types.
036     */
037    List<String> getAllowedTypes();
038
039    /**
040     * Returns the configured denied types.
041     */
042    List<String> getDeniedTypes();
043
044    /**
045     * Returns {@code true} if all the types are denied, {@code false} otherwise.
046     */
047    boolean denyAllTypes();
048
049    /**
050     * Filter the {@code allowedSubTypes} according to this object configuration.
051     */
052    Map<String, SubType> filterSubTypes(Map<String, SubType> allowedSubTypes);
053
054    String getDefaultType();
055}