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.endow.document.service.impl;
017
018 import java.util.ArrayList;
019 import java.util.HashMap;
020 import java.util.List;
021 import java.util.Map;
022
023 import org.kuali.kfs.module.endow.EndowPropertyConstants;
024 import org.kuali.kfs.module.endow.businessobject.Tickler;
025 import org.kuali.kfs.module.endow.document.service.TicklerService;
026 import org.kuali.rice.kns.service.BusinessObjectService;
027
028 /**
029 * This class provides implementation for Tickler related methods.
030 */
031 public class TicklerServiceImpl implements TicklerService {
032
033 private BusinessObjectService businessObjectService;
034
035 /**
036 * @see org.kuali.kfs.module.endow.document.service.TicklerService#getSecurityActiveTicklers(java.lang.String)
037 */
038 public List<Tickler> getSecurityActiveTicklers(String securityId) {
039 List<Tickler> result = new ArrayList<Tickler>();
040 Map<String, String> criteria = new HashMap<String, String>();
041
042 criteria.put(EndowPropertyConstants.TICKLER_SECURITIES + "." + EndowPropertyConstants.TICKLER_SECURITYID, securityId);
043 criteria.put(EndowPropertyConstants.TICKLER_ACTIVE_INDICATOR, Boolean.TRUE.toString());
044
045 result = (List<Tickler>) businessObjectService.findMatchingOrderBy(Tickler.class, criteria, EndowPropertyConstants.TICKLER_ENTRY_DETAIL, true);
046
047 return result;
048 }
049
050 /**
051 * Gets the businessObjectService.
052 *
053 * @return businessObjectService
054 */
055 public BusinessObjectService getBusinessObjectService() {
056 return businessObjectService;
057 }
058
059 /**
060 * Sets the businessObjectService.
061 *
062 * @param businessObjectService
063 */
064 public void setBusinessObjectService(BusinessObjectService businessObjectService) {
065 this.businessObjectService = businessObjectService;
066 }
067
068 }