1 /*
2 * The Kuali Financial System, a comprehensive financial management system for higher education.
3 *
4 * Copyright 2005-2014 The Kuali Foundation
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 package org.kuali.kfs.module.cam.document.service;
20
21 import java.util.Map;
22
23 import org.kuali.kfs.module.cam.businessobject.Asset;
24 import org.kuali.kfs.module.cam.businessobject.AssetLocation;
25 import org.kuali.kfs.module.cam.businessobject.AssetType;
26 import org.kuali.rice.krad.bo.BusinessObject;
27
28 public interface AssetLocationService {
29
30 public static enum LocationField {
31 CAMPUS_CODE, BUILDING_CODE, ROOM_NUMBER, SUB_ROOM_NUMBER, CONTACT_NAME, STREET_ADDRESS, CITY_NAME, STATE_CODE, ZIP_CODE, COUNTRY_CODE;
32 }
33
34 /**
35 * The method will set Off Campus Location from the assetLocations collection
36 */
37 public void setOffCampusLocation(Asset asset);
38
39 /**
40 * Update user input into reference of Asset Location
41 */
42 public void updateOffCampusLocation(Asset newAsset);
43
44 boolean validateLocation(Map<LocationField, String> fieldMap, BusinessObject businessObject, boolean isCapital, AssetType assetType);
45
46 /**
47 * check if offCampusLocation is holding any location information.
48 *
49 * @param offCampusLocation
50 */
51 public boolean isOffCampusLocationExists(AssetLocation offCampusLocation);
52
53 /**
54 * check if offCampusLocation is empty
55 *
56 * @param offCampusLocation
57 */
58 public boolean isOffCampusLocationEmpty(AssetLocation offCampusLocation);
59 }