001 /* 002 * Copyright 2006 Stephen J. McConnell. 003 * 004 * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0 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 013 * implied. 014 * 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018 019 package net.dpml.transit.management; 020 021 import javax.management.AttributeChangeNotification; 022 import javax.management.MBeanNotificationInfo; 023 import javax.management.NotificationBroadcasterSupport; 024 import javax.management.MBeanException; 025 026 import net.dpml.transit.model.LayoutModel; 027 028 /** 029 * Transit MBean. 030 * 031 * @author <a href="http://www.dpml.net">Digital Product Meta Library</a> 032 * @version 0.0.0 033 */ 034 public class LayoutController implements LayoutControllerMXBean 035 { 036 private LayoutModel m_model; 037 038 public LayoutController( final LayoutModel model ) 039 { 040 m_model = model; 041 } 042 043 public String getID() throws MBeanException 044 { 045 try 046 { 047 return m_model.getID(); 048 } 049 catch( Exception e ) 050 { 051 throw new MBeanException( e ); 052 } 053 } 054 055 public String getTitle() throws MBeanException 056 { 057 try 058 { 059 return m_model.getTitle(); 060 } 061 catch( Exception e ) 062 { 063 throw new MBeanException( e ); 064 } 065 } 066 067 public String getClassname() throws MBeanException 068 { 069 try 070 { 071 return m_model.getClassname(); 072 } 073 catch( Exception e ) 074 { 075 throw new MBeanException( e ); 076 } 077 } 078 }