|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.archiviststoolkit.plugin.ATPluginUtils
public class ATPluginUtils
Archivists' Toolkit(TM) Copyright © 2005-2009 Regents of the University of California, New York University, & Five Colleges, Inc. All rights reserved. This software is free. You can redistribute it and / or modify it under the terms of the Educational Community License (ECL) version 1.0 (http://www.opensource.org/licenses/ecl1.php) This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ECL license for more details about permissions and limitations. Archivists' Toolkit(TM) http://www.archiviststoolkit.org info@archiviststoolkit.org Created by IntelliJ IDEA. This is a utility class to make it easier for plugin developers to save data to the AT database and perform validation on AT records.
| Constructor Summary | |
|---|---|
ATPluginUtils()
|
|
| Method Summary | |
|---|---|
static void |
deletePluginData(ATPluginData pluginData)
Method to delete plugin data in the database |
static java.util.Collection |
getData(java.lang.String pluginName)
Method to get all the saved data for a certain plugin |
static java.util.Collection |
getData(java.lang.String pluginName,
java.lang.String dataType)
Method to get all the saved data for a particular plugin and data type |
static java.lang.Object |
getDataByName(java.lang.String pluginName,
java.lang.String dataName)
Method to return a string object or xml encoded object found in the database. |
static java.lang.Object |
getObjectFromPluginData(ATPluginData pluginData)
Method to return an object from plugin data using xstream to convert the saved xml to an object |
static void |
saveData(java.lang.String pluginName,
int dataVersion,
java.lang.String dataName,
java.lang.String dataType,
java.lang.Object dataObject)
Method that first converts a java object to an xml string then save it to the database |
static void |
saveData(java.lang.String pluginName,
int dataVersion,
java.lang.String dataName,
java.lang.String dataType,
java.lang.String dataString)
Method to save text data to the database |
static void |
saveRecordToDatabase(DomainObject record)
Method to save an AT record to the database. |
static void |
saveToDatabase(ATPluginData pluginData)
Saves plugin data object to the database |
static boolean |
validateRecord(java.awt.Component component,
DomainObject record)
Method to valid a AT record. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ATPluginUtils()
| Method Detail |
|---|
public static void saveData(java.lang.String pluginName,
int dataVersion,
java.lang.String dataName,
java.lang.String dataType,
java.lang.String dataString)
throws java.lang.Exception
pluginName - The name of the plugindataVersion - The dataVersiondataName - The name of the datadataType - The type of datadataString - The text data to save
java.lang.Exception - is thrown if there was a problem saving the data
public static void saveData(java.lang.String pluginName,
int dataVersion,
java.lang.String dataName,
java.lang.String dataType,
java.lang.Object dataObject)
throws java.lang.Exception
pluginName - The name of the plugindataVersion - The dataVersiondataName - The name of the datadataType - The type of datadataObject - The object that contains the data or is the data
java.lang.Exception - is thrown if there was a problem saving the data
public static void saveToDatabase(ATPluginData pluginData)
throws java.lang.Exception
pluginData - The plugin data object
java.lang.Exception - If there is any problems saving to the database
public static void deletePluginData(ATPluginData pluginData)
throws java.lang.Exception
pluginData - The plugin data
java.lang.Exception - if there was a problem deleting that data
public static java.util.Collection getData(java.lang.String pluginName)
throws java.lang.Exception
pluginName - The name of the plugin
java.lang.Exception
public static java.util.Collection getData(java.lang.String pluginName,
java.lang.String dataType)
throws java.lang.Exception
pluginName - The name of the plugindataType - The data type of the plugin
java.lang.Exception - is thrown of there is a problem find the data
public static java.lang.Object getDataByName(java.lang.String pluginName,
java.lang.String dataName)
throws java.lang.Exception
pluginName - The name of the plugindataName - The name of the data
java.lang.Exception - If there is a problem finding the data from the databasepublic static java.lang.Object getObjectFromPluginData(ATPluginData pluginData)
pluginData - The ATPluginDataContaining the xml encoded object
public static void saveRecordToDatabase(DomainObject record)
throws java.lang.Exception
record - The AT record to save to the database.
java.lang.Exception - if there is a problem saving the record to the database
public static boolean validateRecord(java.awt.Component component,
DomainObject record)
component - UI component that is requesting validation of the recordrecord - The AT record to validate
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||