001/** 002 * Copyright 2005-2015 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 */ 016package org.kuali.rice.krad.labs.maintenance; 017 018import org.kuali.rice.krad.maintenance.MaintenanceViewPresentationControllerBase; 019import org.kuali.rice.krad.uif.container.Group; 020import org.kuali.rice.krad.uif.view.View; 021import org.kuali.rice.krad.uif.view.ViewModel; 022 023/** 024 * Labs demonstration of a maintenance presentation controller. 025 * 026 * @author Kuali Rice Team (rice.collab@kuali.org) 027 */ 028public class LabsTravelAccountPresentationController extends MaintenanceViewPresentationControllerBase { 029 030 public boolean canViewGroup(View view, ViewModel model, Group group, String groupId) { 031 if ("TravelAccount-SubAccounts".equals(groupId)) { 032 return false; 033 } else { 034 return true; 035 } 036 } 037 038 public boolean canEditGroup(View view, ViewModel model, Group group, String groupId) { 039 if ("TravelAccount-Basic".equals(groupId)) { 040 return false; 041 } else { 042 return true; 043 } 044 } 045 046}