001 /*
002 * Copyright 2006-2007 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 */
016 package org.kuali.rice.krad.datadictionary.mask;
017
018 /**
019 * The maskLiteral element is used to completely hide the field value for
020 * unauthorized users. The specified literal will be shown instead of the field
021 * value.
022 *
023 * @author Kuali Rice Team (rice.collab@kuali.org)
024 */
025 public class MaskFormatterLiteral implements MaskFormatter {
026 private static final long serialVersionUID = 3368293409242411693L;
027
028 protected String literal;
029
030 public String maskValue(Object value) {
031 return literal;
032 }
033
034 /**
035 * Gets the literalString attribute.
036 *
037 * @return Returns the literal String.
038 */
039 public String getLiteral() {
040 return literal;
041 }
042
043 /**
044 * Specify the string that will be shown instead of the actual value when masked.
045 */
046 public void setLiteral(String literal) {
047 this.literal = literal;
048 }
049
050 }