001/**
002 * Copyright 2005-2018 The Kuali Foundation
003 *
004 * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php
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 */
016package org.kuali.rice.krad.demo.travel.options;
017
018import org.kuali.rice.core.api.util.ConcreteKeyValue;
019import org.kuali.rice.core.api.util.KeyValue;
020import org.kuali.rice.krad.keyvalues.KeyValuesBase;
021
022import java.util.ArrayList;
023import java.util.List;
024
025public class AttachmentTypeCodeKeyValues extends KeyValuesBase {
026
027    private static final long serialVersionUID = -4843103151826286724L;
028    private boolean blankOption;
029
030        @Override
031    public List<KeyValue> getKeyValues() {
032        List<KeyValue> keyValues = new ArrayList<KeyValue>();
033
034        if (blankOption) {
035            keyValues.add(new ConcreteKeyValue("", ""));
036        }
037
038        keyValues.add(new ConcreteKeyValue("TXT", "TXT"));
039        keyValues.add(new ConcreteKeyValue("PDF", "PDF"));
040        keyValues.add(new ConcreteKeyValue("IMG", "IMG"));
041        keyValues.add(new ConcreteKeyValue("OTH", "OTH"));
042
043        return keyValues;
044    }
045
046    /**
047     * @return the blankOption
048     */
049    public boolean isBlankOption() {
050        return this.blankOption;
051    }
052
053    /**
054     * @param blankOption the blankOption to set
055     */
056    public void setBlankOption(boolean blankOption) {
057        this.blankOption = blankOption;
058    }
059
060}