components/visual-panels/time/src/java/vpanels/app/time/com/oracle/solaris/vp/panels/time/client/swing/NTPModel.java
branchs11-update
changeset 2805 4888f6212f94
parent 827 0944d8c0158b
--- a/components/visual-panels/time/src/java/vpanels/app/time/com/oracle/solaris/vp/panels/time/client/swing/NTPModel.java	Mon Oct 28 17:52:58 2013 -0700
+++ b/components/visual-panels/time/src/java/vpanels/app/time/com/oracle/solaris/vp/panels/time/client/swing/NTPModel.java	Wed Oct 30 16:53:48 2013 -0400
@@ -20,13 +20,14 @@
  */
 
 /*
- * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
  */
 
 package com.oracle.solaris.vp.panels.time.client.swing;
 
 import java.util.*;
-import com.oracle.solaris.rad.ObjectException;
+import com.oracle.solaris.rad.client.RadObjectException;
+import com.oracle.solaris.rad.client.RadPrivilegeException;
 import com.oracle.solaris.scf.common.ScfException;
 import com.oracle.solaris.vp.panel.common.action.*;
 import com.oracle.solaris.vp.panel.common.api.smf_old.SmfState;
@@ -63,13 +64,13 @@
 	// XXX generic NTPModel shouldn't assume a ServicePanelDescriptor
 	enabled_ = getSource().isEnabled();
 	try {
-	    servers_ = getSource().getTimeMXBean().getntpServers();
-	} catch (ObjectException e) {
+	    servers_ = getSource().getTimeBean().getntpServers();
+	} catch (RadObjectException e) {
 	    servers_ = Collections.emptyList();
 	}
 
 	// Read only state
-	ServiceMXBean service = getSource().getService();
+	ServiceBean service = getSource().getService();
 	try {
 	    state_ = service.getState();
 	    nextState_ = service.getNextState();
@@ -83,15 +84,15 @@
 	validate();
 
 	TimePanelDescriptor descriptor = getSource();
-	TimeMXBean bean = descriptor.getTimeMXBean();
+	Time bean = descriptor.getTimeBean();
 
 	try {
 	    bean.setntpServers(servers_);
 
-	} catch (SecurityException e) {
+	} catch (RadPrivilegeException e) {
 	    throw new ActionUnauthorizedException(e);
 
-	} catch (ObjectException e) {
+	} catch (RadObjectException e) {
 	    throw new ActionFailedException(
 		Finder.getString("ntp.error.syserror"), e);
 	}
@@ -102,7 +103,7 @@
 	    smfEnabledProp.setValue(enabled_);
 	    smfEnabledProp.saveToRepo();
 
-	} catch (SecurityException e) {
+	} catch (RadPrivilegeException e) {
 	    throw new ActionUnauthorizedException(e);
 
 	} catch (ScfException e) {