From 04c8f1f456f4dd1b2901e2e84bce148d0d07b5a3 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Fri, 15 May 2020 08:24:01 -0400 Subject: [PATCH] LP 1827051: Remove Java Code Since the OpenSRF Java libraries no longer build and are out of date with the latest OpenSRF changes, this commit removes the remaining Java code and build steps from Evergreen as it is now useless. Signed-off-by: Jason Stephenson Signed-off-by: Chris Sharp --- .gitignore | 2 - Open-ILS/src/Makefile.am | 8 +- Open-ILS/src/java/Makefile.am | 49 ----- Open-ILS/src/java/org/open_ils/Event.java | 33 ---- Open-ILS/src/java/org/open_ils/Sys.java | 70 ------- .../src/java/org/open_ils/idl/IDLException.java | 10 - Open-ILS/src/java/org/open_ils/idl/IDLField.java | 46 ----- Open-ILS/src/java/org/open_ils/idl/IDLLink.java | 46 ----- Open-ILS/src/java/org/open_ils/idl/IDLObject.java | 96 --------- Open-ILS/src/java/org/open_ils/idl/IDLParser.java | 218 --------------------- Open-ILS/src/java/org/open_ils/test/TestIDL.java | 20 -- Open-ILS/src/java/org/open_ils/test/TestLogin.java | 29 --- Open-ILS/src/java/org/open_ils/util/Utils.java | 75 ------- configure.ac | 22 +-- docs/modules/development/pages/intro_opensrf.adoc | 9 +- 15 files changed, 6 insertions(+), 727 deletions(-) delete mode 100644 Open-ILS/src/java/Makefile.am delete mode 100644 Open-ILS/src/java/org/open_ils/Event.java delete mode 100644 Open-ILS/src/java/org/open_ils/Sys.java delete mode 100644 Open-ILS/src/java/org/open_ils/idl/IDLException.java delete mode 100644 Open-ILS/src/java/org/open_ils/idl/IDLField.java delete mode 100644 Open-ILS/src/java/org/open_ils/idl/IDLLink.java delete mode 100644 Open-ILS/src/java/org/open_ils/idl/IDLObject.java delete mode 100644 Open-ILS/src/java/org/open_ils/idl/IDLParser.java delete mode 100644 Open-ILS/src/java/org/open_ils/test/TestIDL.java delete mode 100644 Open-ILS/src/java/org/open_ils/test/TestLogin.java delete mode 100644 Open-ILS/src/java/org/open_ils/util/Utils.java diff --git a/.gitignore b/.gitignore index 3e1a995d0b..23d7d99b32 100644 --- a/.gitignore +++ b/.gitignore @@ -48,8 +48,6 @@ Open-ILS/src/extras/.libs/ Open-ILS/src/extras/Makefile Open-ILS/src/extras/Makefile.in Open-ILS/src/extras/oils_requestor -Open-ILS/src/java/Makefile -Open-ILS/src/java/Makefile.in Open-ILS/src/Makefile Open-ILS/src/Makefile.in Open-ILS/src/perlmods/blib/ diff --git a/Open-ILS/src/Makefile.am b/Open-ILS/src/Makefile.am index f31ac85b87..1391e8135d 100644 --- a/Open-ILS/src/Makefile.am +++ b/Open-ILS/src/Makefile.am @@ -109,12 +109,6 @@ reporter_data = @srcdir@/reporter/report-fail \ endif #------------------------------ -# Build EVERGREEN JAVA -#------------------------------ - -if BUILDEGJAVA -OILSJAVA_DIR = java -endif # scripts that are generated from *.in files and can # be deleted by a make clean @@ -150,7 +144,7 @@ doc_DATA = $(gen_docs) # Take care of which subdirectories to build, and which extra files to include in a distribution. -SUBDIRS = $(OILSCORE_DIRS) $(OILSWEB_DIR) $(OILSJAVA_DIR) +SUBDIRS = $(OILSCORE_DIRS) $(OILSWEB_DIR) EXTRA_DIST = @srcdir@/perlmods \ @srcdir@/data \ diff --git a/Open-ILS/src/java/Makefile.am b/Open-ILS/src/java/Makefile.am deleted file mode 100644 index 5b9dc2433e..0000000000 --- a/Open-ILS/src/java/Makefile.am +++ /dev/null @@ -1,49 +0,0 @@ -JAVA_LIBDIR = .lib -JAVAC = javac -J-Xmx256m -JAVA = java -Xmx256m -OSRF_HOME = ../../../../OpenSRF/src/java -OSRFJAVA = $(OSRF_HOME)/opensrf.jar -EXT = $(OSRF_HOME)/deps -JAVA_LIBS = .:$(JAVA_LIBDIR):$(OSRFJAVA):$(EXT)/json.jar:$(EXT)/java_memcached-release_2.0.1.jar -JAVA_SRC = \ - org/open_ils/*.java\ - org/open_ils/idl/*.java\ - org/open_ils/util/*.java\ - org/open_ils/test/*.java - -all-local: jar - -jar: - $(MKDIR_P) $(JAVA_LIBDIR) - $(JAVAC) -d $(JAVA_LIBDIR) -cp $(JAVA_LIBS) $(JAVA_SRC) 2>&1 - rm -f openils.jar - echo "creating openils.jar" - jar cf openils.jar -C .lib org - - -# only prints the first 30 lines of errors -slim: - $(MKDIR_P) $(JAVA_LIBDIR) - $(JAVAC) -d $(JAVA_LIBDIR) -cp $(JAVA_LIBS) $(JAVA_SRC) 2>&1 | head -n 30 - @echo -e "\nTruncating at 30 lines" - -check: - $(MKDIR_P) $(JAVA_LIBDIR) - $(JAVAC) -Xlint:unchecked -d $(JAVA_LIBDIR) -cp $(JAVA_LIBS) $(JAVA_SRC) 2>&1 | head -n 30 - @echo -e "\nTruncating at 30 lines" - -run: - @$(JAVA) -cp $(JAVA_LIBS):openils.jar $(JAVA_EXE) $(JAVA_ARGS) - -deps: - $(MKDIR_P) ext - -docs: - find . -name *.java > files; - javadoc -classpath $(JAVA_LIBS) -d doc @files; - rm files; - -clean: - rm -r $(JAVA_LIBDIR) - - diff --git a/Open-ILS/src/java/org/open_ils/Event.java b/Open-ILS/src/java/org/open_ils/Event.java deleted file mode 100644 index 69a73a1aec..0000000000 --- a/Open-ILS/src/java/org/open_ils/Event.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.open_ils; - -import java.util.Map; -import java.util.HashMap; - -public class Event extends HashMap { - - public Event() { - } - - public Event(Map map) { - super(map); - } - - public static Event parseEvent(Object map) { - if( map != null && map instanceof Map) { - Map m = (Map) map; - if( m.containsKey("ilsevent") && m.containsKey("textcode")) - return new Event(m); - } - - return null; - } - - public String getTextCode() { - return (String) get("textcode"); - } - - public int getCode() { - return Integer.parseInt((String) get("ilsevent")); - } -} - diff --git a/Open-ILS/src/java/org/open_ils/Sys.java b/Open-ILS/src/java/org/open_ils/Sys.java deleted file mode 100644 index 0d66edca88..0000000000 --- a/Open-ILS/src/java/org/open_ils/Sys.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.open_ils; - -import org.opensrf.*; -import org.opensrf.util.*; -import org.open_ils.*; -import org.open_ils.idl.*; -import org.opensrf.util.*; - -import java.util.Map; -import java.util.HashMap; -import java.io.IOException; - - -public class Sys { - - private static IDLParser idlParser = null; - - /** - * Initializes the connection to the OpenSRF network and parses the IDL file. - * @param attrs A map of configuration attributes. Options include:
- *
    - *
  • configFile - The OpenSRF core config file
  • - *
  • configContext - The path to the config chunk in the config XML, typically "opensrf"
  • - *
  • logProtocol - Currently supported option is "file".
  • - *
  • logLevel - The log level. Options are 1,2,3, or 4 (error, warn, info, debug)
  • - *
  • syslogFacility - For future use, when syslog is a supported log option
  • - *
  • idlFile - The path to the IDL file. May be relative or absolute. If this option is - * not provided, the system will ask the OpenSRF Settings server for the IDL file path.
  • - *
- */ - public static void init(Map attrs) throws ConfigException, SessionException, IOException, IDLException { - - String configFile = attrs.get("configFile"); - String configContext = attrs.get("configContext"); - String logProto = attrs.get("logProtocol"); - String logFile = attrs.get("logFile"); - String logLevel = attrs.get("logLevel"); - String syslogFacility = attrs.get("syslogFacility"); - String idlFile = attrs.get("idlFile"); - - - if(idlParser != null) { - /** if we've parsed the IDL file, then all of the global setup has been done. - * We just need to verify this thread is connected to the OpenSRF network. */ - org.opensrf.Sys.bootstrapClient(configFile, configContext); - return; - } - - /** initialize the logging infrastructure */ - if("file".equals(logProto)) - Logger.init(Short.parseShort(logLevel), new FileLogger(logFile)); - - if("syslog".equals(logProto)) - throw new ConfigException("syslog not yet implemented"); - - /** connect to the opensrf network. */ - org.opensrf.Sys.bootstrapClient(configFile, configContext); - - /** Grab the IDL file setting if not explicitly provided */ - if(idlFile == null) { - SettingsClient client = SettingsClient.instance(); - idlFile = client.getString("/IDL"); - } - - /** Parse the IDL if necessary */ - idlParser = new IDLParser(idlFile); - idlParser.parse(); - } -} - diff --git a/Open-ILS/src/java/org/open_ils/idl/IDLException.java b/Open-ILS/src/java/org/open_ils/idl/IDLException.java deleted file mode 100644 index 1b84d2481b..0000000000 --- a/Open-ILS/src/java/org/open_ils/idl/IDLException.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.open_ils.idl; - -public class IDLException extends Exception { - public IDLException(String info) { - super(info); - } - public IDLException(String info, Throwable cause) { - super(info, cause); - } -} diff --git a/Open-ILS/src/java/org/open_ils/idl/IDLField.java b/Open-ILS/src/java/org/open_ils/idl/IDLField.java deleted file mode 100644 index 6955bc5794..0000000000 --- a/Open-ILS/src/java/org/open_ils/idl/IDLField.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.open_ils.idl; - -public class IDLField { - - /** Field name */ - private String name; - - /** Where this field resides in the array when serilized */ - private int arrayPos; - - /** True if this field does not belong in the database */ - private boolean isVirtual; - - public void setName(String name) { - this.name = name; - } - public void setArrayPos(int arrayPos) { - this.arrayPos = arrayPos; - } - public void setIsVirtual(boolean isVirtual) { - this.isVirtual = isVirtual; - } - public String getName() { - return this.name; - } - public int getArrayPos() { - return this.arrayPos; - } - public boolean getIsVirtual() { - return this.isVirtual; - } - - public void toXML(StringBuffer sb) { - sb.append("\t\t\t\n"); - } -} diff --git a/Open-ILS/src/java/org/open_ils/idl/IDLLink.java b/Open-ILS/src/java/org/open_ils/idl/IDLLink.java deleted file mode 100644 index 69a5772c75..0000000000 --- a/Open-ILS/src/java/org/open_ils/idl/IDLLink.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.open_ils.idl; - - -public class IDLLink { - - /**The field on the IDLObject this link extends from */ - private String field; - private String reltype; - private String key; - private String map; - /**The IDL class linked to */ - private String IDLClass; - - - public void setField(String field) { - this.field = field; - } - public void setReltype(String reltype) { - this.reltype = reltype; - } - public void setKey(String key) { - this.key = key; - } - public void setMap(String map) { - this.map = map; - } - public void setIDLClass(String IDLClass) { - this.IDLClass = IDLClass; - } - public String getField() { - return this.field; - } - public String getReltype() { - return this.reltype; - } - public String getKey() { - return this.key; - } - public String getMap() { - return this.map; - } - public String getIDLClass() { - return this.IDLClass; - } -} - diff --git a/Open-ILS/src/java/org/open_ils/idl/IDLObject.java b/Open-ILS/src/java/org/open_ils/idl/IDLObject.java deleted file mode 100644 index aafde6e031..0000000000 --- a/Open-ILS/src/java/org/open_ils/idl/IDLObject.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.open_ils.idl; -import java.util.HashMap; -import java.util.Iterator; - - -public class IDLObject { - - private String IDLClass; - private String fieldMapper; - private String controller; - private String rptLabel; - private HashMap fields; - private HashMap links; - - /** true if this is a virtual object (does not live in the database) */ - private boolean isVirtual; - - public IDLObject() { - fields = new HashMap(); - links = new HashMap(); - } - - public String getIDLClass() { - return IDLClass; - } - - public void addLink(IDLLink link) { - links.put(link.getField(), link); - } - - public void addField(IDLField field) { - fields.put(field.getName(), field); - } - - public IDLField getField(String name) { - return (IDLField) fields.get(name); - } - - public HashMap getFields() { - return fields; - } - - - /** - * Returns the link object found at the given field on - * this IDLObject. - */ - public IDLLink getLink(String fieldName) { - return (IDLLink) links.get(fieldName); - } - - public String getFieldMapper() { - return fieldMapper; - } - - public String getController() { - return controller; - } - - public String getRptLabel() { - return rptLabel; - } - public boolean isVirtual() { - return isVirtual; - } - - public void setIDLClass(String IDLClass) { - this.IDLClass = IDLClass; - } - - public void setFieldMapper(String fm) { - this.fieldMapper = fm; - } - public void setController(String controller) { - this.controller = controller; - } - public void setRptLabel(String label) { - this.rptLabel = label; - } - public void setIsVirtual(boolean isVirtual) { - this.isVirtual = isVirtual; - } - - - public void toXML(StringBuffer sb) { - - sb.append("\t\t"); - Iterator itr = fields.keySet().iterator(); - IDLField field; - while(itr.hasNext()) { - field = fields.get((String) itr.next()); - field.toXML(sb); - } - sb.append("\t\t"); - } -} diff --git a/Open-ILS/src/java/org/open_ils/idl/IDLParser.java b/Open-ILS/src/java/org/open_ils/idl/IDLParser.java deleted file mode 100644 index 059aeb78f8..0000000000 --- a/Open-ILS/src/java/org/open_ils/idl/IDLParser.java +++ /dev/null @@ -1,218 +0,0 @@ -package org.open_ils.idl; - -import org.opensrf.util.*; - -import java.util.HashMap; -import java.util.Set; -import java.util.Iterator; - -import java.io.InputStream; -import java.io.FileInputStream; -import java.io.IOException; - -import javax.xml.stream.*; -import javax.xml.stream.events.* ; -import javax.xml.namespace.QName; - - -public class IDLParser { - - public static final String OILS_NS_BASE="http://opensrf.org/spec/IDL/base/v1"; - public static final String OILS_NS_OBJ="http://open-ils.org/spec/opensrf/IDL/objects/v1"; - public static final String OILS_NS_OBJ_PREFIX="oils_obj"; - public static final String OILS_NS_PERSIST="http://open-ils.org/spec/opensrf/IDL/persistence/v1"; - public static final String OILS_NS_PERSIST_PREFIX="oils_persist"; - public static final String OILS_NS_REPORTER="http://open-ils.org/spec/opensrf/IDL/reporter/v1"; - public static final String OILS_NS_REPORTER_PREFIX="reporter"; - - /** The source for the IDL XML */ - InputStream inStream; - HashMap IDLObjects; - IDLObject current; - private int fieldIndex; - - /** If true, we retain the full set of IDL objects in memory. This is true by default. */ - private boolean keepIDLObjects; - - private int parsedObjectCount; - - public IDLParser() { - IDLObjects = new HashMap(); - keepIDLObjects = true; - parsedObjectCount = 0; - fieldIndex = 0; - } - - public IDLParser(String fileName) throws IOException { - this(new FileInputStream(fileName)); - } - - public IDLParser(InputStream inStream) { - this(); - this.inStream = inStream; - } - - - /** - * Parses the IDL XML - */ - public void parse() throws IOException, IDLException { - - try { - XMLInputFactory factory = XMLInputFactory.newInstance(); - - /** disable as many unused features as possible to speed up the parsing */ - factory.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, Boolean.FALSE); - factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE); - factory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, Boolean.TRUE); - factory.setProperty(XMLInputFactory.IS_COALESCING, Boolean.FALSE); - factory.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.FALSE); - - - /** create the stream reader */ - XMLStreamReader reader = factory.createXMLStreamReader(this.inStream); - int eventType; - - while(reader.hasNext()) { - /** cycle through the XML events */ - - eventType = reader.next(); - - switch(eventType) { - - case XMLEvent.START_ELEMENT: - handleStartElement(reader); - break; - - case XMLEvent.END_ELEMENT: - handleEndElement(reader); - break; - } - } - - } catch(javax.xml.stream.XMLStreamException se) { - throw new IDLException("Error parsing IDL XML", se); - } - } - - /** - * Returns the IDLObject with the given IDLClass - */ - public IDLObject getObject(String IDLClass) { - return (IDLObject) IDLObjects.get(IDLClass); - } - - /** - * Returns the full set of IDL objects as a hash from classname to object. - * If keepIDLObjects is false, the map will be empty. - */ - public HashMap getIDLObjects() { - return IDLObjects; - } - - /** - * Returns the number of parsed objects, regardless of the keepIDLObjects setting. - */ - public int getObjectCount() { - return parsedObjectCount; - } - - - public void handleStartElement(XMLStreamReader reader) { - - if(!OILS_NS_BASE.equals(reader.getNamespaceURI())) return; - String localpart = reader.getLocalName(); - - if( "class".equals(localpart) ) { - fieldIndex = 0; - current = new IDLObject(); - current.setIDLClass(reader.getAttributeValue(null, "id")); - current.setController(reader.getAttributeValue(null, "controller")); - String persist = reader.getAttributeValue(OILS_NS_PERSIST, "virtual"); - current.setIsVirtual("persist".equals(reader.getAttributeValue(OILS_NS_PERSIST, "virtual"))); - return; - } - - if( "field".equals(localpart) ) { - IDLField field = new IDLField(); - field.setName(reader.getAttributeValue(null, "name")); - field.setArrayPos(fieldIndex++); - field.setIsVirtual("true".equals(reader.getAttributeValue(OILS_NS_PERSIST, "virtual"))); - current.addField(field); - } - - if( "link".equals(localpart) ) { - IDLLink link = new IDLLink(); - link.setField(reader.getAttributeValue(null, "field")); - link.setReltype(reader.getAttributeValue(null, "reltype")); - link.setKey(reader.getAttributeValue(null, "key")); - link.setMap(reader.getAttributeValue(null, "map")); - link.setIDLClass(reader.getAttributeValue(null, "class")); - current.addLink(link); - } - } - - public void handleEndElement(XMLStreamReader reader) throws IDLException { - - if(!OILS_NS_BASE.equals(reader.getNamespaceURI())) return; - String localpart = reader.getLocalName(); - - if("class".equals(localpart)) { - - String[] vfields = {"isnew", "ischanged", "isdeleted"}; - for (String fieldName : vfields) { - IDLField field = new IDLField(); - field.setName(fieldName); - field.setArrayPos(fieldIndex++); - field.setIsVirtual(true); - current.addField(field); - } - - if(keepIDLObjects) - IDLObjects.put(current.getIDLClass(), current); - - HashMap fields = current.getFields(); - String fieldNames[] = new String[fields.size()]; - - for(Iterator itr = fields.keySet().iterator(); itr.hasNext(); ) { - String key = (String) itr.next(); - IDLField field = (IDLField) fields.get(key); - try { - fieldNames[ field.getArrayPos() ] = field.getName(); - } catch(ArrayIndexOutOfBoundsException E) { - String msg = "class="+current.getIDLClass()+";field="+key+ - ";fieldcount="+fields.size()+";currentpos="+field.getArrayPos(); - throw new IDLException(msg, E); - } - } - - OSRFRegistry.registerObject( - current.getIDLClass(), OSRFRegistry.WireProtocol.ARRAY, fieldNames); - - parsedObjectCount++; - - current = null; - } - } - - - public String toXML() { - StringBuffer sb = new StringBuffer(); - Set keys = IDLObjects.keySet(); - Iterator itr = IDLObjects.keySet().iterator(); - String IDLClass; - IDLObject obj; - while(itr.hasNext()) { - IDLClass = (String) itr.next(); - obj = IDLObjects.get(IDLClass); - obj.toXML(sb); - } - return sb.toString(); - } -} - - - - - - diff --git a/Open-ILS/src/java/org/open_ils/test/TestIDL.java b/Open-ILS/src/java/org/open_ils/test/TestIDL.java deleted file mode 100644 index c50ad62ba4..0000000000 --- a/Open-ILS/src/java/org/open_ils/test/TestIDL.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.open_ils.test; -import org.open_ils.idl.*; -import org.opensrf.*; -import org.opensrf.util.*; - -public class TestIDL { - public static void main(String args[]) throws Exception { - String idlFile = args[0]; - IDLParser parser = new IDLParser(idlFile); - parser.parse(); - //System.out.print(parser.toXML()); - - OSRFObject bre = new OSRFObject("bre"); - bre.put("id", new Integer(1)); - bre.put("isnew", new Boolean(false)); - bre.put("isdeleted", new Boolean(true)); - System.out.println(bre); - System.out.println(new JSONWriter(bre).write()); - } -} diff --git a/Open-ILS/src/java/org/open_ils/test/TestLogin.java b/Open-ILS/src/java/org/open_ils/test/TestLogin.java deleted file mode 100644 index 265fa37e02..0000000000 --- a/Open-ILS/src/java/org/open_ils/test/TestLogin.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.open_ils.test; -import org.open_ils.util.Utils; -import org.open_ils.Event; -import org.opensrf.*; -import java.util.Map; -import java.util.HashMap; - - -public class TestLogin { - public static void main(String args[]) { - try { - - if(args.length < 3) { - System.err.println("usage: java org.open_ils.test.TestLogin "); - return; - } - - Sys.bootstrapClient(args[0], "/config/opensrf"); - Map params = new HashMap(); - params.put("username", args[1]); - params.put("password", args[2]); - Event evt = Utils.login(params); - System.out.println(evt); - } catch(Exception e) { - System.err.println(e); - } - } -} - diff --git a/Open-ILS/src/java/org/open_ils/util/Utils.java b/Open-ILS/src/java/org/open_ils/util/Utils.java deleted file mode 100644 index 6982d16cab..0000000000 --- a/Open-ILS/src/java/org/open_ils/util/Utils.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.open_ils.util; -import org.open_ils.*; -import org.opensrf.*; -import org.opensrf.util.*; -import java.util.Map; -import java.util.HashMap; -import java.security.MessageDigest; - -public class Utils { - - /** - * Logs in. - * @param params Login arguments, which may consist of
- * username
- * barcode - if username is provided, barcode will be ignored
- * password
- * workstation - name of the workstation where the login is occuring
- * type - type of login, currently "opac", "staff", and "temp"
- * org - optional org ID to provide login context when no workstation is used. - * @return An Event object. On success, the event 'payload' will contain - * 'authtoken' and 'authtime' fields, which represent the session key and - * session inactivity timeout, respectively. - */ - public static Event login(Map params) throws MethodException { - - Map initMap = new HashMap(); - String init = (params.get("username") != null) ? - params.get("username").toString() : params.get("barcode").toString(); - - Object resp = ClientSession.atomicRequest( - "open-ils.auth", - "open-ils.auth.authenticate.init", new Object [] {init}); - - /** see if the server responded with some type of unexpected event */ - Event evt = Event.parseEvent(resp); - if(evt != null) return evt; - - params.put("password", md5Hex(resp + md5Hex(params.get("password").toString()))); - - resp = ClientSession.atomicRequest( - "open-ils.auth", - "open-ils.auth.authenticate.complete", new Object[]{params}); - - return Event.parseEvent(resp); - } - - - /** - * Generates the hex md5sum of a string. - * @param s The string to md5sum - * @return The 32-character hex md5sum - */ - public static String md5Hex(String s) { - StringBuffer sb = new StringBuffer(); - MessageDigest md; - try { - md = MessageDigest.getInstance("MD5"); - } catch(Exception e) { - return null; - } - - md.update(s.getBytes()); - byte[] digest = md.digest(); - for (int i = 0; i < digest.length; i++) { - int b = digest[i] & 0xff; - String hex = Integer.toHexString(b); - if (hex.length() == 1) sb.append("0"); - sb.append(hex); - } - return sb.toString(); - } -} - - - diff --git a/configure.ac b/configure.ac index e0baeb9c74..f7da01416f 100644 --- a/configure.ac +++ b/configure.ac @@ -153,20 +153,6 @@ esac], AM_CONDITIONAL([BUILDILSCLIENT], [test x$openils_client = xtrue]) -# build evergreen java ? - -AC_ARG_ENABLE([java], -[ --enable-java enables installation of the Evergreen Java components ], -[case "${enableval}" in - yes) evergreen_java=true ;; - no) evergreen_java=false ;; - *) AC_MSG_ERROR([please choose another value for --enable-java (supported values are yes or no]) -esac], -[evergreen_java=false]) - -AM_CONDITIONAL([BUILDEGJAVA], [test x$evergreen_java = xtrue]) - - #----------------------------------- # Check for dependencies #----------------------------------- @@ -350,8 +336,7 @@ if test "x$openils_core" = "xtrue"; then AC_CONFIG_FILES([Open-ILS/examples/Makefile Open-ILS/src/c-apps/Makefile Open-ILS/src/c-apps/tests/Makefile - Open-ILS/src/extras/Makefile - Open-ILS/src/java/Makefile]) + Open-ILS/src/extras/Makefile]) fi if test "x$build_apachemods" = "xtrue"; then @@ -423,11 +408,6 @@ AC_MSG_RESULT([Evergreen Staff Client: yes]) else AC_MSG_RESULT([Evergreen Staff Client: no]) fi - if test "$evergreen_java" = "true" ; then -AC_MSG_RESULT([Evergreen Java Components: yes]) - else -AC_MSG_RESULT([Evergreen Java Components: no]) -fi AC_MSG_RESULT([]) AC_MSG_RESULT([-------- Installation Directories --------]) AC_MSG_RESULT(Installation directory prefix: ${prefix}) diff --git a/docs/modules/development/pages/intro_opensrf.adoc b/docs/modules/development/pages/intro_opensrf.adoc index dd79863eb2..19797b9173 100644 --- a/docs/modules/development/pages/intro_opensrf.adoc +++ b/docs/modules/development/pages/intro_opensrf.adoc @@ -1040,11 +1040,10 @@ retrieve the value directly. In practice, OpenSRF includes convenience libraries in all of its client language bindings to simplify access to configuration values. C offers -osrfConfig.c, Perl offers `OpenSRF::Utils::SettingsClient`, Java offers -`org.opensrf.util.SettingsClient`, and Python offers `osrf.set`. These -libraries locally cache the configuration file to avoid network roundtrips for -every request and enable the developer to request specific values without -having to manually construct XPath expressions. +osrfConfig.c, Perl offers `OpenSRF::Utils::SettingsClient`, and Python offers +`osrf.set`. These libraries locally cache the configuration file to avoid +network roundtrips for every request and enable the developer to request +specific values without having to manually construct XPath expressions. == Getting under the covers with OpenSRF == Now that you have seen that it truly is easy to create an OpenSRF service, we -- 2.11.0