Skip to content
Snippets Groups Projects
Commit e8fd8e09 authored by Lofar test build account's avatar Lofar test build account
Browse files

Task #3740 [maven-release-plugin]: copy for tag...

Task #3740 [maven-release-plugin]: copy for tag Maven-Release-nl.astron.lofar.sas.otb.otb-parent-1.8.0
parents
No related branches found
No related tags found
No related merge requests found
Showing
with 492 additions and 0 deletions
/*
* SharedVars.java
*
* Copyright (C) 2002-2007
* ASTRON (Netherlands Foundation for Research in Astronomy)
* P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
*/
package nl.astron.lofar.sas.otb;
import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.util.HashMap;
import nl.astron.lofar.sas.otb.exceptions.ParmDBConfigurationException;
import nl.astron.lofar.sas.otb.jparmfacade.jParmFacadeInterface;
import nl.astron.lofar.sas.otb.util.OtdbRmi;
import nl.astron.lofar.sas.otb.util.ParmDBConfigurationHelper;
import nl.astron.lofar.sas.otbcomponents.OTBInputFieldBuilder;
import org.apache.log4j.Logger;
/**
* Class to hold variables that will be used between panels in the mainframe.
* This ensures that the Mainframe will stay package independend.
*
* Programmers that implement panels for other LOFAR packages can enter variables that need to be known
* between different pannels here. The Mainfram has a method to get this Holder class and so the variabels
* will be accessible between packages.
*
* Please keep the file organised and clean, add vars and their accessors under a tag with the package name they belong to
*
* @created 12-04-2006, 13:37
* @author coolen
* @version $Id$
* @updated
*/
public class SharedVars {
static Logger logger = Logger.getLogger(SharedVars.class);
static String name = "SharedVars";
private MainFrame itsMainFrame=null;
/*
* PACKAGE SAS
*/
// holds the current Tree ID
private int itsCurrentTreeID=0;
// holds the current component ID
private int itsCurrentComponentID=0;
// holds the treeState from the current tree
private int itsTreeState=-1;
// holds the OtdbRmi Object (RMI/JNI access for OTDB)
private static OtdbRmi itsOtdbRmi;
// holds the jParmFacade Object (JNI access for ParmDB)
private static jParmFacadeInterface itsjParmFacade;
// hold current abstract validator
private static OTBInputFieldBuilder itsCurrentInput;
//LogParam
private String itsLogParamStartTime="";
private String itsLogParamEndTime = "";
private boolean setLogParamMostRecent=false;
private int itsLogParamLevel=0;
/*
* PACKAGE SAS
*/
/** gets the Current TreeID */
public int getTreeID() {
return itsCurrentTreeID;
}
/** sets the Current TreeID */
public void setTreeID(int aTreeID) {
itsCurrentTreeID=aTreeID;
setTreeState(aTreeID);
}
/** sets the Current TreeState */
public void setTreeState(int aTreeID) {
try {
itsTreeState=OtdbRmi.getRemoteOTDB().getTreeInfo(aTreeID,false).state;
} catch (RemoteException ex) {
logger.debug("Exception during setTreeState(TreeID: "+aTreeID+")" );
}
}
/** gets the Current TreeState */
public int getTreeState() {
return itsTreeState;
}
/** gets the Current ComponentID */
public int getComponentID() {
return itsCurrentComponentID;
}
/** sets the Current ComponentID */
public void setComponentID(int anID) {
itsCurrentComponentID=anID;
}
/** gets OTDBrmi
* OTBrmi holds all JNI/RMI connections
*
* @return the OtdbRmi object
*/
public static OtdbRmi getOTDBrmi() {
return itsOtdbRmi;
}
public static jParmFacadeInterface getJParmFacade() {
if(itsjParmFacade == null){
try {
//LOAD XML CONFIG FILE
HashMap<String,String> serverConfig = ParmDBConfigurationHelper.getInstance().getParmDBServerInformation();
String aRC="rmi://"+serverConfig.get("rmihostname");
aRC += ":"+serverConfig.get("rmiport")+"/"+jParmFacadeInterface.SERVICENAME;
itsjParmFacade = (jParmFacadeInterface) Naming.lookup(aRC);
} catch (ParmDBConfigurationException | NotBoundException | MalformedURLException | RemoteException e) {
logger.error("jParmFacade could not be loaded : "+e.getMessage());
}
}
return itsjParmFacade;
}
//LogParam
public String getLogParamStartTime() {
return itsLogParamStartTime;
}
public void setLogParamStartTime(String aTime){
itsLogParamStartTime = aTime;
}
public String getLogParamEndTime() {
return itsLogParamEndTime;
}
public void setLogParamEndTime(String aTime){
itsLogParamEndTime = aTime;
}
public boolean getLogParamMostRecent() {
return setLogParamMostRecent;
}
public void setLogParamMostRecent(boolean aMostRecent ) {
setLogParamMostRecent = aMostRecent;
}
public int getLogParamLevel() {
return itsLogParamLevel;
}
public void setLogParamLevel(int aLevel ) {
itsLogParamLevel = aLevel;
}
private int itsLevel=0;
/**
* Creates a new instance of SharedVars
*/
public SharedVars(MainFrame mainFrame) {
itsMainFrame = mainFrame;
//
// SAS
//
itsOtdbRmi = new OtdbRmi(mainFrame);
//LogParam
itsLogParamStartTime = "";
itsLogParamEndTime = "";
setLogParamMostRecent=false;
itsLogParamLevel=0;
itsCurrentTreeID=0;
itsCurrentComponentID=0;
itsTreeState=-1;
}
}
/*
* ConnectionFailedException.java
*
* Copyright (C) 2002-2007
* ASTRON (Netherlands Foundation for Research in Astronomy)
* P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Created on January 17, 2006, 5:28 PM
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package nl.astron.lofar.sas.otb.exceptions;
/**
* @created 20-04-2010, 17:28
* @author coolen
* @version $Id$
* @updated
*/
public class ConnectionFailedException extends Exception {
/** Creates a new instance of ConnectionFailedException */
public ConnectionFailedException() { }
public ConnectionFailedException(String msg) { super(msg); }
}
/*
* NoAccessException.java
*
* Copyright (C) 2002-2007
* ASTRON (Netherlands Foundation for Research in Astronomy)
* P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Created on January 17, 2006, 5:28 PM
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package nl.astron.lofar.sas.otb.exceptions;
/**
* @created 17-01-2006, 17:28
* @author blaakmeer
* @version $Id$
* @updated
*/
public class NoAccessException extends Exception {
/** Creates a new instance of NoAccessException */
public NoAccessException() { }
public NoAccessException(String msg) { super(msg); }
}
/*
* NoDatabaseException.java
*
* Copyright (C) 2002-2007
* ASTRON (Netherlands Foundation for Research in Astronomy)
* P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Created on January 17, 2006, 5:28 PM
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package nl.astron.lofar.sas.otb.exceptions;
/**
* @created 20-04-2010, 17:28
* @author coolen
* @version $Id$
* @updated
*/
public class NoDatabaseException extends Exception {
/** Creates a new instance of NoDatabaseException */
public NoDatabaseException() { }
public NoDatabaseException(String msg) { super(msg); }
}
/*
* NoServerConnectionException.java
*
* Copyright (C) 2002-2007
* ASTRON (Netherlands Foundation for Research in Astronomy)
* P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Created on January 17, 2006, 5:28 PM
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package nl.astron.lofar.sas.otb.exceptions;
/**
* @created 20-04-2010, 17:28
* @author coolen
* @version $Id$
* @updated
*/
public class NoServerConnectionException extends Exception {
/** Creates a new instance of NoServerConnectionException */
public NoServerConnectionException() { }
public NoServerConnectionException(String msg) { super(msg); }
}
/*
* NoLoggedInException.java
*
* Copyright (C) 2002-2007
* ASTRON (Netherlands Foundation for Research in Astronomy)
* P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Created on January 17, 2006, 5:28 PM
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/
package nl.astron.lofar.sas.otb.exceptions;
/**
* @created 20-04-2010, 17:28
* @author coolen
* @version $Id$
* @updated
*/
public class NotLoggedInException extends Exception {
/** Creates a new instance of NotLoggedInException */
public NotLoggedInException() { }
public NotLoggedInException(String msg) { super(msg); }
}
/*
* ParmDBConfigurationException.java
*
* Copyright (C) 2002-2007
* ASTRON (Netherlands Foundation for Research in Astronomy)
* P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package nl.astron.lofar.sas.otb.exceptions;
/**
* This exception can be thrown if a the XML file containing the PARMDB tables and such encounters an exception that will have to
* be logged and/or communicated with the user.
*
* @author pompert
* @version ParmDBConfigurationExceptionaAccessException.java,v 1.5 2006/05/05 13:35:26 pompert Exp $
* @see ParmDBConfigurationHelper
* @created June 08, 2006, 13:22
*/
public class ParmDBConfigurationException extends Exception{
private String message;
/**
*
* Creates a new instance of ParmDBConfigurationException, using the supplied message
*
* @param message A custom string to be added to the exception message
*/
public ParmDBConfigurationException(String message) {
super();
this.message = message;
}
/**
* Returns the exception message that was set in the constructor
* @return the Exception message
*/
@Override
public String getMessage(){
return message;
}
}
OTB/src/nl/astron/lofar/sas/otb/icons/16_add.gif

857 B

OTB/src/nl/astron/lofar/sas/otb/icons/16_addAll.gif

879 B

OTB/src/nl/astron/lofar/sas/otb/icons/16_alarm.gif

552 B

OTB/src/nl/astron/lofar/sas/otb/icons/16_apply.png

458 B

OTB/src/nl/astron/lofar/sas/otb/icons/16_arrow_down.gif

856 B

OTB/src/nl/astron/lofar/sas/otb/icons/16_arrow_down_modern.png

824 B

OTB/src/nl/astron/lofar/sas/otb/icons/16_arrow_left.gif

865 B

OTB/src/nl/astron/lofar/sas/otb/icons/16_arrow_left_modern.png

840 B

OTB/src/nl/astron/lofar/sas/otb/icons/16_arrow_right.gif

868 B

OTB/src/nl/astron/lofar/sas/otb/icons/16_arrow_right_modern.png

821 B

OTB/src/nl/astron/lofar/sas/otb/icons/16_arrow_up.gif

860 B

OTB/src/nl/astron/lofar/sas/otb/icons/16_arrow_up_modern.png

820 B

OTB/src/nl/astron/lofar/sas/otb/icons/16_cancel.png

676 B

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment