Coverage Report - org.kuali.rice.kim.api.util.KualiDateTimeMask
 
Classes in this File Line Coverage Branch Coverage Complexity
KualiDateTimeMask
0%
0/9
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007-2009 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.kim.api.util;
 17  
 
 18  
 
 19  
 import org.joda.time.Chronology;
 20  
 import org.joda.time.ReadableDateTime;
 21  
 import org.joda.time.base.AbstractDateTime;
 22  
 import org.joda.time.chrono.AssembledChronology;
 23  
 import org.joda.time.chrono.ISOChronology;
 24  
 import org.kuali.rice.kim.util.KimConstants;
 25  
 
 26  
 /**
 27  
  * This class is for masking java.util.Date using Kuali mask. 
 28  
  * 
 29  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 30  
  *
 31  
  */
 32  
 public class KualiDateTimeMask extends AbstractDateTime implements ReadableDateTime {
 33  
 
 34  
         private static final long serialVersionUID = 1L;
 35  
         
 36  
         private String mask;
 37  
         
 38  0
         private KualiDateTimeMask(String s){
 39  
                 
 40  0
                 mask = s;
 41  0
         }
 42  
 
 43  
         public static KualiDateTimeMask getInstance(){
 44  
                 
 45  0
                 return new KualiDateTimeMask(KimConstants.RESTRICTED_DATA_MASK);
 46  
         }
 47  
 
 48  
     @Override
 49  
     public long getMillis() {
 50  0
         return 0;
 51  
     }
 52  
 
 53  
     @Override
 54  
     public Chronology getChronology() {
 55  0
         return ISOChronology.getInstance();
 56  
     }
 57  
 
 58  
     public String toString(){
 59  
                 
 60  0
                 return this.mask;
 61  
         }
 62  
 
 63  
         public static void main(String[] args){
 64  0
                 System.out.println("masked date\t" + KualiDateTimeMask.getInstance().toString());
 65  
 
 66  0
         }
 67  
 
 68  
 }