From: <rob...@us...> - 2010-12-28 15:09:39
|
Revision: 14610 http://dcm4che.svn.sourceforge.net/dcm4che/?rev=14610&view=rev Author: robertdavid Date: 2010-12-28 15:09:31 +0000 (Tue, 28 Dec 2010) Log Message: ----------- [#WEB-226] One minimal WebConfigService for each standalone component Added Paths: ----------- dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/pom.xml dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/filesystem/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/filesystem/Availability.java dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/filesystem/FileSystemStatus.java dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/mbean/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/mbean/DashboardDelegator.java dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/mbean/DashboardService.java dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/model/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/model/ReportModel.java dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/model/SystemPropertyModel.java dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/resources/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/resources/META-INF/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/resources/META-INF/jboss-service.xml dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/resources/META-INF/xmdesc/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/resources/META-INF/xmdesc/DashboardService-xmbean.xml dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/pom.xml dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/src/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/src/main/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/src/main/java/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/src/main/java/org/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/src/main/java/org/dcm4chee/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/src/main/java/org/dcm4chee/dashboard/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/src/main/java/org/dcm4chee/dashboard/service/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/src/main/java/org/dcm4chee/dashboard/service/webcfg/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/src/main/java/org/dcm4chee/dashboard/service/webcfg/WebCfgService.java dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/src/main/resources/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/src/main/resources/META-INF/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/src/main/resources/META-INF/jboss-service.xml dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/src/main/resources/META-INF/xmdesc/ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/src/main/resources/META-INF/xmdesc/webcfg-xmbean.xml dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/pom.xml Added: dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/pom.xml =================================================================== --- dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/pom.xml (rev 0) +++ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/pom.xml 2010-12-28 15:09:31 UTC (rev 14610) @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <groupId>dcm4che.dcm4chee</groupId> + <artifactId>dcm4chee-dashboard-sar</artifactId> + <version>3.0.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>dcm4che.dcm4chee</groupId> + <artifactId>dcm4chee-dashboard-sar-config</artifactId> + <version>3.0.0-SNAPSHOT</version> + <packaging>jboss-sar</packaging> + <name>Service Components for DASHBOARD</name> + <dependencies> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.6.1</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>jboss</groupId> + <artifactId>jboss-system</artifactId> + <version>4.0.2</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>jboss</groupId> + <artifactId>jboss-jmx</artifactId> + <version>4.0.2</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>net.sf.json-lib</groupId> + <artifactId>json-lib</artifactId> + <version>2.3</version> + <classifier>jdk15</classifier> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>jboss-packaging-maven-plugin</artifactId> + <version>2.0</version> + <extensions>true</extensions> + <configuration> + <archive> + <manifest> + <addDefaultImplementationEntries>true</addDefaultImplementationEntries> + </manifest> + </archive> + </configuration> + </plugin> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.6</source> + <target>1.6</target> + </configuration> + </plugin> + </plugins> + </build> +</project> Added: dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/filesystem/Availability.java =================================================================== --- dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/filesystem/Availability.java (rev 0) +++ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/filesystem/Availability.java 2010-12-28 15:09:31 UTC (rev 14610) @@ -0,0 +1,71 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is part of dcm4che, an implementation of DICOM(TM) in + * Java(TM), available at http://sourceforge.net/projects/dcm4che. + * + * The Initial Developer of the Original Code is + * TIANI Medgraph AG. + * Portions created by the Initial Developer are Copyright (C) 2003-2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Gunter Zeilinger <gun...@ti...> + * Franz Willer <fra...@gw...> + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +package org.dcm4chee.dashboard.filesystem; + +import java.util.Arrays; + +/** + * @author gun...@ti... + * @version $Revision: 9429 $ $Date: 2005-11-22 15:01:24 +0100 (Tue, 22 Nov + * 2005) $ + * @since 06.10.2004 + * + */ +public class Availability { + + public static final int ONLINE = 0; + public static final int NEARLINE = 1; + public static final int OFFLINE = 2; + public static final int UNAVAILABLE = 3; + + private static final String[] AVAILABILITY = { "ONLINE", "NEARLINE", + "OFFLINE", "UNAVAILABLE" }; + + public static final String toString(int value) { + return AVAILABILITY[value]; + } + + public static final int toInt(String s) { + final int index = Arrays.asList(AVAILABILITY).indexOf(s); + if (index == -1) + throw new IllegalArgumentException(s); + return index; + } +} \ No newline at end of file Added: dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/filesystem/FileSystemStatus.java =================================================================== --- dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/filesystem/FileSystemStatus.java (rev 0) +++ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/filesystem/FileSystemStatus.java 2010-12-28 15:09:31 UTC (rev 14610) @@ -0,0 +1,72 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is part of dcm4che, an implementation of DICOM(TM) in + * Java(TM), available at http://sourceforge.net/projects/dcm4che. + * + * The Initial Developer of the Original Code is + * TIANI Medgraph AG. + * Portions created by the Initial Developer are Copyright (C) 2003-2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Gunter Zeilinger <gun...@ti...> + * Franz Willer <fra...@gw...> + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +package org.dcm4chee.dashboard.filesystem; + +/** + * + * @author gun...@ti... + * @version $Revision: 2501 $ $Date: 2006-05-31 14:44:23 +0200 (Mit, 31. Mai 2006) $ + * @since Jan 25, 2006 + */ +public class FileSystemStatus { + + private static final String[] ENUM = { + "PENDING", + "RW+", + "RW", + "RO" + }; + + public static final int PENDING = -1; + public static final int DEF_RW = 0; + public static final int RW = 1; + public static final int RO = 2; + + public static final String toString(int value) { + return ENUM[++value]; + } + + public static final int toInt(String s) { + for ( int i = 0 ; i < ENUM.length ; i++) { + if ( ENUM[i].equals(s) ) return --i; + } + throw new IllegalArgumentException(s); + } +} Added: dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/mbean/DashboardDelegator.java =================================================================== --- dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/mbean/DashboardDelegator.java (rev 0) +++ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/mbean/DashboardDelegator.java 2010-12-28 15:09:31 UTC (rev 14610) @@ -0,0 +1,195 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is part of dcm4che, an implementation of DICOM(TM) in + * Java(TM), available at http://sourceforge.net/projects/dcm4che. + * + * The Initial Developer of the Original Code is + * Agfa HealthCare. + * Portions created by the Initial Developer are Copyright (C) 2006-2008 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * See listed authors below. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +package org.dcm4chee.dashboard.mbean; + +import java.io.File; +import java.util.List; +import java.util.Map; + +import javax.management.AttributeNotFoundException; +import javax.management.InstanceNotFoundException; +import javax.management.MBeanException; +import javax.management.MBeanServer; +import javax.management.MalformedObjectNameException; +import javax.management.ObjectName; +import javax.management.ReflectionException; + +import org.dcm4chee.dashboard.model.ReportModel; +import org.dcm4chee.dashboard.model.SystemPropertyModel; +import org.jboss.mx.util.MBeanServerLocator; + +/** + * @author Robert David <rob...@ag...> + * @version $Revision$ $Date$ + * @since 25.11.2009 + */ +public final class DashboardDelegator { + + private static final long serialVersionUID = 1L; + + private static DashboardDelegator dashboardDelegator; + + private final MBeanServer server = MBeanServerLocator.locate(); + private ObjectName objectName; + + private String newline = System.getProperty("line.separator"); + + private DashboardDelegator(String objectName) throws MalformedObjectNameException, NullPointerException { + this.objectName = new ObjectName(objectName); + } + + public static synchronized DashboardDelegator getInstance(String objectName) throws MalformedObjectNameException, NullPointerException { + if (dashboardDelegator == null) + dashboardDelegator = new DashboardDelegator(objectName); + return dashboardDelegator; + } + + public String[] listAllFileSystemGroups() throws MalformedObjectNameException, NullPointerException, InstanceNotFoundException, ReflectionException, MBeanException { + return (String[]) this.server.invoke( + this.objectName, + "listAllFileSystemGroups", null, null); + } + + public File[] listFileSystemsOfGroup(String groupname) throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException { + return (File[]) server.invoke( + this.objectName, + "listFileSystemsOfGroup", + new Object[] { groupname }, + new String[] { String.class.getName() }); + } + + public long getMinimumFreeDiskSpaceOfGroup(String groupname) throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException, AttributeNotFoundException { + return ((Long) server.invoke( + this.objectName, + "getMinimumFreeDiskSpaceOfGroup", + new Object[] { groupname }, + new String[] { String.class.getName() })) + .longValue(); + } + + public long getExpectedDataVolumePerDay(String groupname) throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException, AttributeNotFoundException { + return ((Long) server.invoke( + this.objectName, + "getExpectedDataVolumePerDay", + new Object[] { groupname }, + new String[] { String.class.getName() })) + .longValue(); + } + + public String getDefaultRetrieveAETitle(String groupname) throws AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException { + return ((String) server.invoke( + this.objectName, + "getDefaultRetrieveAETitle", + new Object[] { groupname }, + new String[] { String.class.getName() })); + } + + public String[] listOtherFileSystems() throws InstanceNotFoundException, ReflectionException, MBeanException { + return (String[]) this.server.invoke( + this.objectName, + "listOtherFileSystems", null, null); + } + + @SuppressWarnings("unchecked") + public Map<String, List<SystemPropertyModel>> getSystemProperties() throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException { + return (Map<String, List<SystemPropertyModel>>) server.invoke( + this.objectName, + "getSystemProperties", null, null); + } + + public ReportModel[] listAllReports(boolean groups) throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException { + return (ReportModel[]) server.invoke( + this.objectName, + "listAllReports", + new Object[] { groups }, + new String[] { boolean.class.getName() }); + } + + public void createReport(ReportModel report, boolean isGroup) throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException { + server.invoke( + this.objectName, + "createReport", + new Object[] { report, isGroup }, + new String[] { ReportModel.class.getName(), boolean.class.getName()}); + } + + public void updateReport(ReportModel report) throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException { + server.invoke( + this.objectName, + "updateReport", + new Object[] { report }, + new String[] { ReportModel.class.getName() }); + } + + public void deleteReport(ReportModel report, boolean isGroup) throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException { + server.invoke( + this.objectName, + "deleteReport", + new Object[] { report, isGroup }, + new String[] { ReportModel.class.getName(), boolean.class.getName() }); + } + + public String[] getDataSources() throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException, AttributeNotFoundException { + return (String[]) server.getAttribute( + this.objectName, + "dataSourceList") + .toString() + .split(this.newline); + } + + public String[] listQueueNames() throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException, AttributeNotFoundException { + return (String[]) server.invoke( + this.objectName, + "listQueueNames", null, null); + } + + public int[] listQueueAttributes(String queueName) throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException, AttributeNotFoundException { + return (int[]) server.invoke( + this.objectName, + "listQueueAttributes", + new Object[] { queueName }, + new String[] { java.lang.String.class.getName() }); + } + + public int getReportTablePagesize() throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException, AttributeNotFoundException { + return (Integer) server.getAttribute( + this.objectName, + "reportTablePagesize"); + } +} Added: dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/mbean/DashboardService.java =================================================================== --- dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/mbean/DashboardService.java (rev 0) +++ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/mbean/DashboardService.java 2010-12-28 15:09:31 UTC (rev 14610) @@ -0,0 +1,385 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is part of dcm4che, an implementation of DICOM(TM) in + * Java(TM), available at http://sourceforge.net/projects/dcm4che. + * + * The Initial Developer of the Original Code is + * Agfa HealthCare. + * Portions created by the Initial Developer are Copyright (C) 2006-2008 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * See listed authors below. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +package org.dcm4chee.dashboard.mbean; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.StringTokenizer; +import java.util.UUID; + +import javax.management.AttributeNotFoundException; +import javax.management.InstanceNotFoundException; +import javax.management.MBeanException; +import javax.management.MalformedObjectNameException; +import javax.management.ObjectInstance; +import javax.management.ObjectName; +import javax.management.ReflectionException; + +import net.sf.json.JSONNull; +import net.sf.json.JSONObject; + +import org.dcm4chee.dashboard.model.ReportModel; +import org.dcm4chee.dashboard.model.SystemPropertyModel; +import org.jboss.system.ServiceMBeanSupport; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @author Robert David <rob...@ag...> + * @version $Revision$ $Date$ + * @since 25.11.2009 + */ +public class DashboardService extends ServiceMBeanSupport { + + private static Logger log = LoggerFactory.getLogger(DashboardService.class); + + private String domainName; + private String[] jbossSystemTypesToQuery = new String[] {"Server", "ServerConfig", "ServerInfo"}; + private String newline = System.getProperty("line.separator"); + + private String[] dataSourceList = new String[0]; + private String[] groupList = new String[0]; + private String[] otherList = new String[0]; + private String[] propertyList = new String[0]; + + private String reportFilename = ""; + private String groupFilename = ""; + + private int reportTablePagesize; + + public void setDomainName(String domainName) { + this.domainName = domainName; + } + + public String getDomainName() { + return domainName; + } + + public void setDataSourceList(String dataSourceList) { + this.dataSourceList = tokenize(dataSourceList); + } + + public String getDataSourceList() { + return arrayToString(this.dataSourceList); + } + + public void setGroupList(String groupList) { + this.groupList = tokenize(groupList); + } + + public String getGroupList() { + return arrayToString(this.groupList); + } + + public void setOtherList(String otherList) { + this.otherList = tokenize(otherList); + } + + public String getOtherList() { + return arrayToString(otherList); + } + + public void setPropertyList(String propertyList) { + this.propertyList = tokenize(propertyList); + } + + public String getPropertyList() { + return arrayToString(this.propertyList); + } + + public void setReportFilename(String reportFilename) { + this.reportFilename = reportFilename; + } + + public String getReportFilename() { + return reportFilename; + } + + public void setGroupFilename(String groupFilename) { + this.groupFilename = groupFilename; + } + + public String getGroupFilename() { + return groupFilename; + } + + public int getReportTablePagesize() { + return reportTablePagesize; + } + + public void setReportTablePagesize(int reportTablePagesize) { + this.reportTablePagesize = reportTablePagesize; + } + + public String[] listAllFileSystemGroups() throws MalformedObjectNameException, NullPointerException { + return this.groupList; + } + + public File[] listFileSystemsOfGroup(String groupname) throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException { + return (File[]) this.server.invoke( + new ObjectName(groupname), + "listFileSystemDirectories", null, null); + } + + public long getMinimumFreeDiskSpaceOfGroup(String groupname) throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException, AttributeNotFoundException { + return ((Long) this.server.getAttribute( + new ObjectName(groupname), + "MinimumFreeDiskSpaceBytes")).longValue(); + } + + public long getExpectedDataVolumePerDay(String groupname) throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException, AttributeNotFoundException { + return ((Long) this.server.getAttribute( + new ObjectName(groupname), + "ExpectedDataVolumePerDayBytes")).longValue(); + } + + public String getDefaultRetrieveAETitle(String groupname) throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException, AttributeNotFoundException { + return ((String) server.getAttribute( + new ObjectName(groupname), + "DefaultRetrieveAETitle")); + } + + public String[] listOtherFileSystems() throws MalformedObjectNameException, NullPointerException { + return this.otherList; + } + + public Map<String, List<SystemPropertyModel>> getSystemProperties() throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException, MBeanException, NullPointerException { + + Map<String, List<SystemPropertyModel>> propertyMap = new HashMap<String, List<SystemPropertyModel>>(); + for (String property : this.propertyList) { + try { + String[] attributes = property.split(";"); + SystemPropertyModel propertyModel = new SystemPropertyModel( + attributes[0], + attributes[1], + attributes[2], + (String) this.server.invoke(new ObjectName("jboss:name=SystemProperties,type=Service"), + "get", + new Object[] {attributes[2]}, new String[] {"java.lang.String"})); + if (propertyModel.getValue() == null) { + for (String type : this.jbossSystemTypesToQuery) { + try { + propertyModel.setValue((String) this.server.getAttribute( + new ObjectName("jboss.system:type=" + type), + attributes[2])); + break; + } catch (AttributeNotFoundException e) {} + } + } + if (!propertyMap.containsKey(attributes[0])) + propertyMap.put(attributes[0], new ArrayList<SystemPropertyModel>()); + propertyMap.get(attributes[0]).add(propertyModel); + } catch (Exception ignore) { + } + } + return propertyMap; + } + + public ReportModel[] listAllReports(boolean groups) { + try { + List<ReportModel> reportList = new ArrayList<ReportModel>(); + if (new File(groups ? this.groupFilename : this.reportFilename).exists()) { + String line; + BufferedReader reader = new BufferedReader(new FileReader(groups ? this.groupFilename : this.reportFilename)); + while ((line = reader.readLine()) != null) + reportList.add((ReportModel) JSONObject.toBean(JSONObject.fromObject(line), ReportModel.class)); + } + return reportList.toArray(new ReportModel[reportList.size()]); + } catch (Exception e) { + log.debug("Exception: ", e); + return null; + } + } + + public void createReport(ReportModel report, boolean isGroup) { + try { + if (report.getUuid() == null) + report.setUuid(UUID.randomUUID().toString()); + + BufferedWriter writer = new BufferedWriter(new FileWriter(isGroup ? this.groupFilename : this.reportFilename, true)); + JSONObject jsonObject = JSONObject.fromObject(report); + if (isGroup) jsonObject.put("groupUuid", JSONNull.getInstance()); + if (report.getDiagram() == null) jsonObject.put("diagram", JSONNull.getInstance()); + writer.write(jsonObject.toString()); + writer.newLine(); + writer.close(); + + sort(this.groupFilename); + sort(this.reportFilename); + } catch (IOException e) { + log.debug("Exception: ", e); + } + } + + public void updateReport(ReportModel report) { + modifyReport(report, false, false); + } + + public void deleteReport(ReportModel report, boolean isGroup) { + modifyReport(report, true, isGroup); + } + + private void modifyReport(ReportModel report, boolean delete, boolean isGroup) { + try { + BufferedReader reader = new BufferedReader(new FileReader(isGroup ? this.groupFilename : this.reportFilename)); + File reportFile = new File(isGroup ? this.groupFilename : this.reportFilename); + String tempFilename = reportFile.getAbsolutePath().substring(0, reportFile.getAbsolutePath().length() - reportFile.getName().length()) + + UUID.randomUUID().toString(); + BufferedWriter writer = new BufferedWriter(new FileWriter(tempFilename, true)); + String line; + while ((line = reader.readLine()) != null) { + if (!((ReportModel) JSONObject.toBean(JSONObject.fromObject(line), ReportModel.class)).getUuid().equals(report.getUuid())) { + writer.write(line); + writer.newLine(); + } else { + if (!delete) { + JSONObject jsonObject = JSONObject.fromObject(report); + if (report.getGroupUuid() == null) jsonObject.put("groupUuid", JSONNull.getInstance()); + if (report.getDiagram() == null) jsonObject.put("diagram", JSONNull.getInstance()); + writer.write(jsonObject.toString()); + writer.newLine(); + } + } + } + reader.close(); + writer.close(); + reportFile.delete(); + new File(tempFilename).renameTo(reportFile); + + sort(this.groupFilename); + sort(this.reportFilename); + } catch (IOException e) { + log.debug("Exception: ", e); + } + } + + private void sort(String filename) { + try { + BufferedReader reader = new BufferedReader(new FileReader(filename)); + File reportFile = new File(filename); + String tempFilename = reportFile.getAbsolutePath().substring(0, reportFile.getAbsolutePath().length() - reportFile.getName().length()) + + UUID.randomUUID().toString(); + BufferedWriter writer = new BufferedWriter(new FileWriter(tempFilename, true)); + String line; + + // store here + List<ReportModel> reports = new ArrayList<ReportModel>(); + while ((line = reader.readLine()) != null) { + reports.add((ReportModel) JSONObject.toBean(JSONObject.fromObject(line), ReportModel.class)); + + } + Collections.sort(reports, new Comparator<ReportModel>() { + + @Override + public int compare(ReportModel rm1, ReportModel rm2) { + return (rm1.getTitle().toUpperCase().compareTo(rm2.getTitle().toUpperCase())); + } + }); + for (ReportModel rm : reports) { + JSONObject jsonObject = JSONObject.fromObject(rm); + if (rm.getGroupUuid() == null) jsonObject.put("groupUuid", JSONNull.getInstance()); + if (rm.getDiagram() == null) jsonObject.put("diagram", JSONNull.getInstance()); + writer.write(jsonObject.toString()); + writer.newLine(); + } + reader.close(); + writer.close(); + reportFile.delete(); + new File(tempFilename).renameTo(reportFile); + } catch (IOException e) { + log.debug("Exception: ", e); + } + } + + public String[] listQueueNames() throws MalformedObjectNameException, NullPointerException { + List<String> queueNameList = new ArrayList<String>(); + for (ObjectInstance oi : + (Set<ObjectInstance>) this.server.queryMBeans( + new ObjectName(this.domainName + ":service=Queue,*"), null)) { + queueNameList.add(oi.getObjectName().getKeyProperty("name")); + } + return queueNameList.toArray(new String[queueNameList.size()]); + } + + public int[] listQueueAttributes(String queueName) throws MalformedObjectNameException, NullPointerException { + int[] queueAttributesList = new int[4]; + try { + ObjectName queueON = new ObjectName(this.domainName + ":service=Queue,name="+queueName); + queueAttributesList[0] = new Integer(server.getAttribute(queueON, "MessageCount").toString()).intValue(); + queueAttributesList[1] = new Integer(server.getAttribute(queueON, "DeliveringCount").toString()).intValue(); + queueAttributesList[2] = new Integer(server.getAttribute(queueON, "ScheduledMessageCount").toString()).intValue(); + queueAttributesList[3] = new Integer(server.getAttribute(queueON, "ConsumerCount").toString()).intValue(); + } catch (Exception ignore) { + log.error("Cant get Queue attributes!", ignore); + return null; + } + return queueAttributesList; + } + + private String[] tokenize(String sourceString) { + StringTokenizer st = new StringTokenizer(sourceString, newline); + List<String> tokens = new ArrayList<String>(); + while (st.hasMoreTokens()) { + String token = st.nextToken(); + if (token.endsWith("\t") || + token.endsWith("\r") || + token.endsWith("\n")) + token = token.substring(0, token.length() - 1); + if (token.length() > 0) tokens.add(token); + } + return tokens.toArray(new String[tokens.size()]); + } + + private String arrayToString(String[] array) { + String arrayString = ""; + for (String string : array) arrayString += (newline + string); + return (arrayString.length() <= 0 ? arrayString : arrayString.substring(1)) + newline; + } +} Added: dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/model/ReportModel.java =================================================================== --- dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/model/ReportModel.java (rev 0) +++ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/model/ReportModel.java 2010-12-28 15:09:31 UTC (rev 14610) @@ -0,0 +1,139 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is part of dcm4che, an implementation of DICOM(TM) in + * Java(TM), available at http://sourceforge.net/projects/dcm4che. + * + * The Initial Developer of the Original Code is + * Agfa HealthCare. + * Portions created by the Initial Developer are Copyright (C) 2006-2008 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * See listed authors below. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +package org.dcm4chee.dashboard.model; + +import java.io.Serializable; +import java.util.Calendar; + +/** + * @author Robert David <rob...@ag...> + * @version $Revision$ $Date$ + * @since 25.11.2009 + */ +public class ReportModel implements Serializable { + + private static final long serialVersionUID = 1L; + + private String uuid; + private String title; + private String dataSource; + private String statement; + private Integer diagram; + private boolean table; + private String groupUuid; + private Calendar created = Calendar.getInstance(); + + public ReportModel() { + } + + public ReportModel(String uuid, String title, String dataSource, String statement, Integer diagram, boolean table, String groupUuid, Long created) { + this.uuid = uuid; + this.title = title; + this.dataSource = dataSource; + this.statement = statement; + this.diagram = diagram; + this.table = table; + this.groupUuid = groupUuid; + if (created != null) this.created.setTimeInMillis(created); + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getUuid() { + return uuid; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getTitle() { + return title; + } + + public void setDataSource(String dataSource) { + this.dataSource = dataSource; + } + + public String getDataSource() { + return dataSource; + } + + public void setStatement(String statement) { + this.statement = statement; + } + + public String getStatement() { + return statement; + } + + public void setDiagram(Integer diagram) { + this.diagram = diagram; + } + + public Integer getDiagram() { + return diagram; + } + + public void setTable(boolean table) { + this.table = table; + } + + public boolean getTable() { + return table; + } + + public void setGroupUuid(String groupUuid) { + this.groupUuid = groupUuid; + } + + public String getGroupUuid() { + return groupUuid; + } + + public void setCreated(Long created) { + if (created != null) this.created.setTimeInMillis(created); + } + + public Long getCreated() { + return this.created != null ? created.getTimeInMillis() : null; + } +} Added: dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/model/SystemPropertyModel.java =================================================================== --- dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/model/SystemPropertyModel.java (rev 0) +++ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/java/org/dcm4chee/dashboard/model/SystemPropertyModel.java 2010-12-28 15:09:31 UTC (rev 14610) @@ -0,0 +1,98 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is part of dcm4che, an implementation of DICOM(TM) in + * Java(TM), available at http://sourceforge.net/projects/dcm4che. + * + * The Initial Developer of the Original Code is + * Agfa HealthCare. + * Portions created by the Initial Developer are Copyright (C) 2006-2008 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * See listed authors below. + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +package org.dcm4chee.dashboard.model; + +import java.io.Serializable; + +/** + * @author Robert David <rob...@ag...> + * @version $Revision$ $Date$ + * @since 25.11.2009 + */ +public class SystemPropertyModel implements Serializable { + + private static final long serialVersionUID = 1L; + + private String group; + private String label; + private String name; + private String value; + + public SystemPropertyModel() { + } + + public SystemPropertyModel(String group, String label, String name, String value) { + this.setGroup(group); + this.setLabel(label); + this.setName(name); + this.setValue(value); + } + + public void setGroup(String group) { + this.group = group; + } + + public String getGroup() { + return group; + } + + public void setLabel(String label) { + this.label = label; + } + + public String getLabel() { + return label; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setValue(String value) { + this.value = value; + } + + public String getValue() { + return value; + } +} \ No newline at end of file Added: dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/resources/META-INF/jboss-service.xml =================================================================== --- dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/resources/META-INF/jboss-service.xml (rev 0) +++ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/resources/META-INF/jboss-service.xml 2010-12-28 15:09:31 UTC (rev 14610) @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE server PUBLIC + "-//JBoss//DTD MBean Service 4.0//EN" + "http://www.jboss.org/j2ee/dtd/jboss-service_4_0.dtd"> +<server> + <mbean code="org.dcm4chee.dashboard.mbean.DashboardService" + name="dcm4chee.dashboard:service=DashboardService" + xmbean-dd="resource:META-INF/xmdesc/DashboardService-xmbean.xml"> + </mbean> +</server> Added: dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/resources/META-INF/xmdesc/DashboardService-xmbean.xml =================================================================== --- dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/resources/META-INF/xmdesc/DashboardService-xmbean.xml (rev 0) +++ dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-config/src/main/resources/META-INF/xmdesc/DashboardService-xmbean.xml 2010-12-28 15:09:31 UTC (rev 14610) @@ -0,0 +1,203 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mbean PUBLIC + "-//JBoss//DTD JBOSS XMBEAN 1.2//EN" + "http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_2.dtd"> +<mbean> + <description>Management Bean.</description> + <descriptors> + <persistence persistPolicy="OnUpdate" /> + <persistence-manager value="org.jboss.mx.persistence.DelegatingPersistenceManager" /> + </descriptors> + <class>org.dcm4chee.dashboard.mbean.DashboardService</class> + <constructor> + <description>MBean Constructor.</description> + <name>org.dcm4chee.dashboard.mbean.DashboardService</name> + </constructor> + <attribute access="read-write" getMethod="getDomainName" setMethod="setDomainName"> + <description> + Represents the xmbean domain name + </description> + <name>domainName</name> + <type>java.lang.String</type> + <descriptors> + <value>dcm4chee.archive</value> + </descriptors> + </attribute> + <attribute access="read-write" getMethod="getDataSourceList" setMethod="setDataSourceList"> + <description> + Represents the jndi names for the configured data sources + </description> + <name>dataSourceList</name> + <type>java.lang.String</type> + <descriptors> + <value>java:pacsDS</value> + </descriptors> + </attribute> + <attribute access="read-write" getMethod="getGroupList" setMethod="setGroupList"> + <description> + Represents the configured file system groups, + as strings, separated by newline + </description> + <name>groupList</name> + <type>java.lang.String</type> + <descriptors> + <value>dcm4chee.archive:service=FileSystemMgt,group=ONLINE_STORAGE</value> + </descriptors> + </attribute> + <attribute access="read-write" getMethod="getOtherList" setMethod="setOtherList"> + <description> + Represents configured additional file systems to display, + as strings, separated by newline + </description> + <name>otherList</name> + <type>java.lang.String</type> + </attribute> + <attribute access="read-write" getMethod="getPropertyList" setMethod="setPropertyList"> + <description> + Represents the system properties to display, + as strings, separated by newline + format is group;label;property + </description> + <name>propertyList</name> + <type>java.lang.String</type> + <descriptors> + <value>Operating system;Name;os.name +Operating system;Architecture;os.arch +Operating system;Version;os.version +Java;Version;java.version</value> + </descriptors> + </attribute> + <attribute access="read-write" getMethod="getGroupFilename" setMethod="setGroupFilename"> + <description> + Full path of file to contain the group declarations + </description> + <name>groupFilename</name> + <type>java.lang.String</type> + <descriptors> + <value>dashboard.groups</value> + </descriptors> + </attribute> + <attribute access="read-write" getMethod="getReportFilename" setMethod="setReportFilename"> + <description> + Full path of file to contain the report declarations + </description> + <name>reportFilename</name> + <type>java.lang.String</type> + <descriptors> + <value>dashboard.reports</value> + </descriptors> + </attribute> + <attribute access="read-write" getMethod="getReportTablePagesize" setMethod="setReportTablePagesize"> + <description> + Size of the table page (number of rows) for the pagination of the report result table + </description> + <name>reportTablePagesize</name> + <type>int</type> + <descriptors> + <value>20</value> + </descriptors> + </attribute> + <operation> + <description>MBean Operation.</description> + <name>listAllFileSystemGroups</name> + <return-type>[Ljava.lang.String;</return-type> + </operation> + <operation> + <description>MBean Operation.</description> + <name>listFileSystemsOfGroup</name> + <parameter> + <name>groupname</name> + <type>java.lang.String</type> + </parameter> + <return-type>[Ljava.io.File;</return-type> + </operation> + <operation> + <description>MBean Operation.</description> + <name>getMinimumFreeDiskSpaceOfGroup</name> + <parameter> + <name>groupname</name> + <type>java.lang.String</type> + </parameter> + <return-type>long</return-type> + </operation> + <operation> + <description>MBean Operation.</description> + <name>getExpectedDataVolumePerDay</name> + <parameter> + <name>groupname</name> + <type>java.lang.String</type> + </parameter> + <return-type>long</return-type> + </operation> + <operation> + <description>MBean Operation.</description> + <name>getDefaultRetrieveAETitle</name> + <parameter> + <name>groupname</name> + <type>java.lang.String</type> + </parameter> + <return-type>java.lang.String</return-type> + </operation> + <operation> + <description>MBean Operation.</description> + <name>listOtherFileSystems</name> + <return-type>[Ljava.lang.String;</return-type> + </operation> + <operation> + <description>MBean Operation.</description> + <name>getSystemProperties</name> + <return-type>java.util.Map</return-type> + </operation> + <operation> + <description>MBean Operation.</description> + <name>listAllReports</name> + <parameter> + <name>groups</name> + <type>boolean</type> + </parameter> + <return-type>[Lorg.dcm4chee.dashboard.model.ReportModel;</return-type> + </operation> + <operation> + <name>createReport</name> + <parameter> + <name>report</name> + <type>org.dcm4chee.dashboard.model.ReportModel</type> + </parameter> + <parameter> + <name>isGroup</name> + <type>boolean</type> + </parameter> + </operation> + <operation> + <name>updateReport</name> + <parameter> + <name>report</name> + <type>org.dcm4chee.dashboard.model.ReportModel</type> + </parameter> + </operation> + <operation> + <name>deleteReport</name> + <parameter> + <name>report</name> + <type>org.dcm4chee.dashboard.model.ReportModel</type> + </parameter> + <parameter> + <name>isGroup</name> + <type>boolean</type> + </parameter> + </operation> + <operation> + <description>MBean Operation.</description> + <name>listQueueNames</name> + <return-type>[Ljava.lang.String;</return-type> + </operation> + <operation> + <description>MBean Operation.</description> + <name>listQueueAttributes</name> + <parameter> + <name>queueName</name> + <type>java.lang.String</type> + </parameter> + <return-type>[I</return-type> + </operation> +</mbean> Added: dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/pom.xml =================================================================== --- dcm4chee/dcm4chee-dashboard/trunk/dcm4chee-dashboard-sar/dcm4chee-dashboard-sar-webcfg/pom.xml (rev 0) +++ dcm4chee/dcm4chee-dashbo... [truncated message content] |