|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--net.jqhome.jwps.ea.EAFactory
This is the factory you should use to create EAs. It contains all the logic that is applicable.
There is only one static method to call, createNewEA and it takes a raw EA object.
Typically this is called by the native method for making new objects. This will try to make a
standard EA for a given raw EA (such the subject EA). If the EA is not a standard EA, it will then try
to create an EA based on the type, such as EAT_MVMT. Failing that, it will return a
byte array EA, consisiting of just the name of the EA and the bytes.
The reason for this is that there is no control exercised by OS/2 for writing EAs.
It is therefore possible for an application to state it is writing, say, a string EA but fill it up
with byte data. If at all possible, this factory will return an EA which you might then have to
laboriously parse.
Note: If no factory is set, the default is to use this factory. Be sure to set
the factory if needed before the first call.
If you are subclassing this factory, you will need to override all of the newEA methods.
These are what control the functionality of this class and therefore the creation of EAs.
| Constructor Summary | |
EAFactory()
|
|
| Method Summary | |
static AbstractEA |
createNewEA(PendingDOMEA pEA)
Wrapper method. |
static AbstractEA |
createNewEA(RawEA rawEA)
Wrapper method. |
static int |
getEAType(java.lang.String eaType)
Returns the EA type from a string, e.g. |
static EAFactory |
getFactory()
Gets the factory to use. |
static java.lang.String |
getTypeString(int type)
Converts the numeric type to a string. |
static AbstractEA |
newEA(PendingDOMEA pEA)
This creates a new EA from a pending one. |
static AbstractEA |
newEA(RawEA rawEA)
The method that is charged with creating EAs from their raw data. |
static void |
setFactory(EAFactory eaFactory)
Setter for the EAFactory or subclass thereof to use. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EAFactory()
| Method Detail |
public static void setFactory(EAFactory eaFactory)
EAFactory or subclass thereof to use. If you do not set a factory before your first calls to
FileEAs then the default factory (this class) will be used.
public static EAFactory getFactory()
public static AbstractEA newEA(RawEA rawEA)
throws JWPException
JWPException
public static AbstractEA newEA(PendingDOMEA pEA)
throws JWPException
JWPException
public static AbstractEA createNewEA(RawEA rawEA)
throws JWPException
newEA method.
JWPException
public static AbstractEA createNewEA(PendingDOMEA pEA)
throws JWPException
newEA method.
JWPException
public static int getEAType(java.lang.String eaType)
throws JWPException
JWPExceptionpublic static java.lang.String getTypeString(int type)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||