org.bitbucket.openisoj.Template Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openisoj-core Show documentation
Show all versions of openisoj-core Show documentation
An extensible framework for creating ISO 8583 messages.
Ported from OpenIso.Net http://code.google.com/p/openiso8583net/
package org.bitbucket.openisoj;
import java.util.HashMap;
import org.bitbucket.openisoj.formatter.Formatters;
import org.bitbucket.openisoj.formatter.IFormatter;
public class Template extends HashMap implements Cloneable {
/**
*
*/
private static final long serialVersionUID = 1L;
private IFormatter _msgTypeFormatter;
private IFormatter _bitmapFormatter;
public Template() {
_msgTypeFormatter = Formatters.getAscii();
_bitmapFormatter = Formatters.getBinary();
}
@Override
public Object clone() {
return super.clone();
}
public String describePacking() throws Exception {
StringBuilder sb = new StringBuilder();
for (java.util.Map.Entry entry : entrySet()) {
int field = entry.getKey();
IFieldDescriptor descriptor = entry.getValue();
sb.append(descriptor.display("", field, null));
}
return sb.toString();
}
public IFormatter getBitmapFormatter() {
return _bitmapFormatter;
}
public IFormatter getMsgTypeFormatter() {
return _msgTypeFormatter;
}
public void setBitmapFormatter(IFormatter _bitmapFormatter) {
this._bitmapFormatter = _bitmapFormatter;
}
public void setMsgTypeFormatter(IFormatter _msgTypeFormatter) {
this._msgTypeFormatter = _msgTypeFormatter;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy