001 /* 002 * Copyright 2011 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.kfs.module.cam.document.authorization; 017 018 import java.util.Set; 019 020 import org.kuali.kfs.module.cam.CamsPropertyConstants; 021 import org.kuali.kfs.sys.KFSConstants; 022 import org.kuali.kfs.sys.document.authorization.FinancialSystemMaintenanceDocumentPresentationControllerBase; 023 import org.kuali.rice.kns.bo.BusinessObject; 024 025 public class AssetLocationGlobalPresentationController extends FinancialSystemMaintenanceDocumentPresentationControllerBase { 026 protected static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(AssetLocationGlobalPresentationController.class); 027 028 @Override 029 public Set<String> getConditionallyHiddenPropertyNames(BusinessObject businessObject) { 030 Set<String> fields = super.getConditionallyHiddenPropertyNames(businessObject); 031 032 // only include campitalAssetNumber in the add section within the asset location details collection 033 fields.add(KFSConstants.ADD_PREFIX + "." + CamsPropertyConstants.AssetLocationGlobal.ASSET_LOCATION_GLOBAL_DETAILS + "." + CamsPropertyConstants.AssetLocationGlobal.CAMPUS_CODE); 034 fields.add(KFSConstants.ADD_PREFIX + "." + CamsPropertyConstants.AssetLocationGlobal.ASSET_LOCATION_GLOBAL_DETAILS + "." + CamsPropertyConstants.AssetLocationGlobal.BUILDING_CODE); 035 fields.add(KFSConstants.ADD_PREFIX + "." + CamsPropertyConstants.AssetLocationGlobal.ASSET_LOCATION_GLOBAL_DETAILS + "." + CamsPropertyConstants.AssetLocationGlobal.BUILDING_ROOM_NUMBER); 036 fields.add(KFSConstants.ADD_PREFIX + "." + CamsPropertyConstants.AssetLocationGlobal.ASSET_LOCATION_GLOBAL_DETAILS + "." + CamsPropertyConstants.AssetLocationGlobal.BUILDING_SUB_ROOM_NUMBER); 037 fields.add(KFSConstants.ADD_PREFIX + "." + CamsPropertyConstants.AssetLocationGlobal.ASSET_LOCATION_GLOBAL_DETAILS + "." + CamsPropertyConstants.AssetLocationGlobal.CAMPUS_TAG_NUMBER); 038 039 return fields; 040 } 041 042 }