public class ManagerSql extends AbstractSql
| Modifier and Type | Class and Description |
|---|---|
static class |
ManagerSql.Confirm
Transfers users from the local database to stellausers in Tenerife.
|
static class |
ManagerSql.Fork
Adds a new forking to the template possibilities.
|
static class |
ManagerSql.Mirror
Reads proposal template files and updates the confirmed and proposal
tables accordingly.
|
static class |
ManagerSql.Reset
Transfers users from the local database to stellausers in Tenerife.
|
AbstractSql.Columns, AbstractSql.ExtractPropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFABSTRACTKEY |
private static String |
DEFACKFIELD
The default acknowledged field.
|
private static String |
DEFACTIVEFIELD
The default column name.
|
private static String |
DEFACTIVEKEY |
private static String |
DEFAFFILFIELD
The key to the object name in the database.
|
private static String |
DEFCOLORFIELD
The key to the object name in the database.
|
private static String |
DEFCONFIRMEDHOST |
private static String |
DEFCONFIRMEDPATH |
private static String |
DEFCONFIRMEDTABLE
The default table.
|
private static String |
DEFDESCRIPTIONFIELD
The key to the object name in the database.
|
private static long |
DEFDISCOVERTIMEOUT |
private static String |
DEFEMAILFIELD
The default column name.
|
private static String |
DEFFORKTABLE
The key to the name of the fork table.
|
private static String |
DEFHASHFIELD
The key to the object name in the database.
|
private static String |
DEFLOCALTABLE
The default table.
|
private static long |
DEFNAG
Default no resend of e-mail.
|
private static String |
DEFNAMEFIELD
The default column name.
|
private static String |
DEFNOTIFYFIELD
The key to the object name in the database.
|
private static String |
DEFPASSWDFIELD
The key to the object name in the database.
|
private static String |
DEFPATHFIELD
The default column name.
|
private static String |
DEFPENDINGTABLE
The default table.
|
private static String |
DEFPIKEY |
private static String |
DEFPROPIDFIELD
The key to the object name in the database.
|
private static String |
DEFPROPIDKEY |
private static String |
DEFPUBKEYFIELD
The key to the object name in the database.
|
private static String |
DEFSCP |
private static String |
DEFSSH |
private static String |
DEFSUPPLIEDTABLE
The default table.
|
private static String |
DEFTEMPLATEFIELD
The key to the object name in the database.
|
private static long |
DEFTENERIFETIMEOUT |
private static String |
DEFTITLEKEY |
private static String |
DEFTMPDIR |
private static String |
DEFURLHOST |
private static String |
DEFURLPROTOCOL |
private static String |
DEFWHERE |
private static String |
DEFWHEREEXE |
private static String |
DEFWHEREPATH |
private static String |
DEFWHO |
static String |
KEY_ABSTRACTKEY |
static String |
KEY_ACKFIELD
The key to the field name for acknowledged boolean.
|
static String |
KEY_ACTIVEFIELD
The key to the active-until field of confirmed proposals.
|
static String |
KEY_ACTIVEKEY |
static String |
KEY_AFFILFIELD
The key to the object name in the database.
|
static String |
KEY_COLORFIELD
The key to the object name in the database.
|
static String |
KEY_CONFIRMEDHOST |
static String |
KEY_CONFIRMEDPATH |
static String |
KEY_CONFIRMEDTABLE
The table of confirmed proposals.
|
static String |
KEY_DESCRIPTIONFIELD
The key to the object name in the database.
|
static String |
KEY_DISCOVERTIMEOUT |
static String |
KEY_EMAILFIELD
The key to the field name for acknowledged boolean.
|
static String |
KEY_FORKTABLE
The key to the name of the fork table.
|
static String |
KEY_HASHFIELD
The key to the object name in the database.
|
static String |
KEY_IMMEDIATE
Targets containing these strings are selected for immediate transfer.
|
static String |
KEY_LOCALTABLE
The key to the field name for acknowledged boolean.
|
static String |
KEY_NAG
The default nagging period (resend e-mail if scknowledge is older).
|
static String |
KEY_NAMEFIELD
The key to the field name for acknowledged boolean.
|
static String |
KEY_NOTIFYFIELD
The key to the object name in the database.
|
static String |
KEY_PASSWDFIELD
The key to the object name in the database.
|
static String |
KEY_PATHFIELD
The key to the field name for acknowledged boolean.
|
static String |
KEY_PENDINGTABLE
The key to the field name for acknowledged boolean.
|
static String |
KEY_PIKEY |
static String |
KEY_PROPIDFIELD
The key to the object name in the database.
|
static String |
KEY_PROPIDKEY |
static String |
KEY_PUBKEYFIELD
The key to the object name in the database.
|
static String |
KEY_SCP |
static String |
KEY_SSH |
static String |
KEY_SUPPLIEDTABLE
The key to the field name for acknowledged boolean.
|
static String |
KEY_TEMPLATEFIELD
The key to the object name in the database.
|
static String |
KEY_TENERIFETIMEOUT |
static String |
KEY_TITLEKEY |
static String |
KEY_TMPDIR |
static String |
KEY_URLHOST |
static String |
KEY_URLPROTOCOL |
static String |
KEY_WHERE |
static String |
KEY_WHEREEXE |
static String |
KEY_WHEREPATH |
static String |
KEY_WHO |
KEY_TABLE, SQLBATCHDIR, SQLFAILDIRKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOMECONFIG, KEY_CLASS| Constructor and Description |
|---|
ManagerSql(Map<String,String> prop) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acknowledgeAll(String table) |
private boolean |
addFork(String propid,
String template,
String description)
Adds a fork, i.e.
|
private boolean |
deleteDownloadedTemplate(String name) |
private boolean |
deleteDownloadedTemplate(String name,
File local) |
private boolean |
download(String match)
Downloads all proposal-templates found on stella.aip.de using ssh/scp.
|
private boolean |
download(String host,
String path,
String match,
File local)
Downloads all proposal-templates found on stella.aip.de using ssh/scp.
|
private List<String> |
getAllConfirmedProposalIds() |
private List<String> |
getAllProposalIds() |
Map<String,String> |
getConfirmedTargetTemplate(String toprop) |
private static Map<String,String> |
getDefaultProperties() |
List<Object> |
getLocalUsers(long nag) |
List<Object> |
getPasswordReset(long nag) |
List<Object> |
getSuppliedTargets(long nag) |
private List<Object> |
getUnAcknowledged(String table,
String unique,
long nag)
Checks a table for none-acknowledged entries.
|
static void |
main(String[] arg) |
private List<Object> |
pushImmediately(Map<Object,String> immediate)
Takes the list of targets, copies them to the local tmp and further to
the appropriate Tenerife machine, where it is immediately added to the
running master.
|
private Map<Object,String> |
requestImmediateUpload(List<Object> targets) |
private Collection<Map<String,String>> |
retainNewConfirmed(Collection<Map<String,String>> scan)
Retains only the new resource files that have no entry in the confirmed
table.
|
private Collection<Map<String,String>> |
retainNewProposals(Collection<Map<String,String>> scan)
Retains only the new resource files that have no entries in the proposal
table.
|
private Map<String,Map<String,String>> |
scanDonwloadedTemplates(String ma)
Scans the local dir for downloaded templates.
|
private Map<String,Map<String,String>> |
scanDonwloadedTemplates(String match,
File local)
Scans the local dir for downloaded templates.
|
boolean |
sendOperatorEmail(long nag) |
private boolean |
updateConfirmed(Map<String,String> template,
String name) |
private boolean |
updateConfirmed(Map<String,String> template,
String path,
String name) |
private boolean |
updateProposals(Map<String,String> template) |
delete, distinct, distinct, exit, getAccess, getDefaultArchive, getDefaultFormat, getTable, init, insert, isEntry, release, release, replace, retrieve, retrieve, retrieve, single, singleclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiespublic static final String KEY_ACKFIELD
public static final String KEY_AFFILFIELD
public static final String KEY_NAMEFIELD
public static final String KEY_EMAILFIELD
public static final String KEY_COLORFIELD
public static final String KEY_NOTIFYFIELD
public static final String KEY_HASHFIELD
public static final String KEY_PASSWDFIELD
public static final String KEY_PUBKEYFIELD
public static final String KEY_PATHFIELD
public static final String KEY_LOCALTABLE
public static final String KEY_PENDINGTABLE
public static final String KEY_SUPPLIEDTABLE
public static final String KEY_CONFIRMEDTABLE
public static final String KEY_FORKTABLE
public static final String KEY_PROPIDFIELD
public static final String KEY_TEMPLATEFIELD
public static final String KEY_DESCRIPTIONFIELD
public static final String KEY_ACTIVEFIELD
public static final String KEY_NAG
public static final String KEY_PROPIDKEY
public static final String KEY_CONFIRMEDPATH
public static final String KEY_CONFIRMEDHOST
public static final String KEY_URLHOST
public static final String KEY_SCP
public static final String KEY_SSH
public static final String KEY_WHO
public static final String KEY_WHERE
public static final String KEY_WHEREPATH
public static final String KEY_WHEREEXE
public static final String KEY_DISCOVERTIMEOUT
public static final String KEY_TENERIFETIMEOUT
public static final String KEY_URLPROTOCOL
public static final String KEY_ACTIVEKEY
public static final String KEY_PIKEY
public static final String KEY_TITLEKEY
public static final String KEY_ABSTRACTKEY
public static final String KEY_TMPDIR
public static final String KEY_IMMEDIATE
private static final String DEFACKFIELD
private static final String DEFNAMEFIELD
private static final String DEFAFFILFIELD
private static final String DEFEMAILFIELD
private static final String DEFCOLORFIELD
private static final String DEFNOTIFYFIELD
private static final String DEFHASHFIELD
private static final String DEFPASSWDFIELD
private static final String DEFPUBKEYFIELD
private static final String DEFPATHFIELD
private static final String DEFLOCALTABLE
private static final String DEFPENDINGTABLE
private static final String DEFSUPPLIEDTABLE
private static final String DEFCONFIRMEDTABLE
private static final String DEFFORKTABLE
private static final String DEFPROPIDFIELD
private static final String DEFTEMPLATEFIELD
private static final String DEFDESCRIPTIONFIELD
private static final String DEFACTIVEFIELD
private static final String DEFPROPIDKEY
private static final String DEFCONFIRMEDPATH
private static final String DEFCONFIRMEDHOST
private static final String DEFURLHOST
private static final String DEFSCP
private static final String DEFSSH
private static final String DEFWHO
private static final String DEFWHERE
private static final String DEFWHEREPATH
private static final String DEFWHEREEXE
private static final long DEFDISCOVERTIMEOUT
private static final long DEFTENERIFETIMEOUT
private static final String DEFURLPROTOCOL
private static final String DEFACTIVEKEY
private static final String DEFPIKEY
private static final String DEFTITLEKEY
private static final String DEFABSTRACTKEY
private static final String DEFTMPDIR
private static final long DEFNAG
private List<Object> getUnAcknowledged(String table, String unique, long nag) throws SQLException
SQLExceptionpublic boolean acknowledgeAll(String table) throws SQLException
SQLExceptionpublic List<Object> getLocalUsers(long nag) throws SQLException
SQLExceptionpublic List<Object> getPasswordReset(long nag) throws SQLException
SQLExceptionpublic List<Object> getSuppliedTargets(long nag) throws SQLException
SQLExceptionpublic boolean sendOperatorEmail(long nag)
private List<String> getAllConfirmedProposalIds() throws SQLException
SQLExceptionprivate List<String> getAllProposalIds() throws SQLException, InitException
SQLExceptionInitExceptionpublic Map<String,String> getConfirmedTargetTemplate(String toprop) throws SQLException, MalformedURLException
SQLExceptionMalformedURLExceptionprivate boolean download(String match) throws IOException, TimeoutException
TimeoutExceptionIOExceptionprivate List<Object> pushImmediately(Map<Object,String> immediate) throws IOException, TimeoutException
immediate - TimeoutExceptionIOExceptionprivate boolean download(String host, String path, String match, File local) throws IOException, TimeoutException
TimeoutExceptionIOExceptionprivate Map<String,Map<String,String>> scanDonwloadedTemplates(String ma)
private Map<String,Map<String,String>> scanDonwloadedTemplates(String match, File local)
private boolean deleteDownloadedTemplate(String name)
private boolean updateConfirmed(Map<String,String> template, String name) throws SQLException
SQLExceptionprivate boolean updateConfirmed(Map<String,String> template, String path, String name) throws SQLException
SQLExceptionprivate Collection<Map<String,String>> retainNewConfirmed(Collection<Map<String,String>> scan) throws SQLException
SQLExceptionprivate Collection<Map<String,String>> retainNewProposals(Collection<Map<String,String>> scan) throws SQLException, InitException
SQLExceptionInitExceptionprivate boolean addFork(String propid, String template, String description) throws SQLException
SQLExceptionpublic static void main(String[] arg) throws InitException
arg - Only if non-standard properties have to be used.InitException