Maximo Dev Plug in Guid
Maximo Dev Plug in Guid
Prerequisites
Maximo 5, Maximo 6 or Maximo 7 has to be installed on the user's machine. Java 1.5 or higher and Eclipse 3.3
or higher are also required. If you have already set default java home on your machine (typically this is java
used for running your application server), you can edit eclipse.ini file, and set the virtual machine used for
running Eclipse in this file, like on the picture below. Another option is to create shortcut (for Windows
system) and define this option in the target fields.
Alternatevly, if you are not able to access update site , you can get plugin jar file on the project site:
http://downloads.sourceforge.net/maximodeveloper
Download the latest release jar file, and put it in <Eclipse installation dir>/plugins directory
---------------------------------------------------------------------------------------------------
Now, create a new Java project, and set JVM to the JVM of the application server you will be
using for running Maximo.You can use existing source, download source from version control
system, or create everything from the scratch, it won't affect Maximo Developer.
Next step is to define project's Maximo installation directory. Once you have defined it, project
will become Maximo project, and Maximo Developer will start working.
Go to Project->Properties->Maximo properties
First text box, Maximo installation folder is self explanatory for versions 5 and 6. For Maximo 7
this is the uppermost folder in hierarchy, "ibm"(For example: E:\ibm). Maximo Developer will
validate entered value, and check if this is really a Maximo folder.
You have to choose correct version of Maximo. Maximo Developer will check property file, and
if it doesn't exist, it will report an error. For Maximo 5 you need to user MXServer.properties,
Maximo Developer will not recognize any other property file.
Package prefix and class suffix properties need some additional explanation. As someone
working with Maximo, you are certainly acquainted with class and package organization in
Maximo. Package psdi is a root package for all business logic and web tier classes. When you
customize some behavior in Maximo, typically you extend the existing class, and attach it to the
object previously used by original class. You have to name a new class, and this name has to be
different from original class. Prefix and suffix properties are designated to help with this and
automatically choose the name that best suit you. Maximo Developer will keep the original
hierarchy of packages for customized classes also, but will use package prefix as a root package
instead of psdi. Class suffix will be amended to the class name, so that you can differentiate it
from original class.
Example: you are extending the MboSet class psdi.app.asset.AssetAncestorSet (how you will do
it will be explained in the rest of the document). You have set prefix and suffix properties as
above. Maximo Developer will automatically create two new classes and two remote interfaces:
"Format created classes" checkbox should be set to true in most cases. Maximo Developer uses Eclipse
formatting of code, and your code should always be formatted according to the formatting standards of your
company, and this can be easily configured in Eclipse.
However, if you extend huge number of Maximo objects, formatting operation can be very slow. Typically,
you would do such thing only for debugging purposes, because Maximo Developer inserts debug statements
automatically. You don't need to format your code in that case, because you will delete it after you discover
the bug. In such case, set this option to no.
Some of the classes that you extend using Maximo Developer have large number of methods. If you choose to
override all methods from the superclass, you will litter your code with unnecessary methods. So, typically
you will uncheck "Override all methods from superclass" checkbox. You will leave it checked when you are
extending classes for debugging purposes, because each extended method will have logging statement
automatically inserted, so you can easily discover where the problem is originating. If you leave this
checkbox blank, only abstract and most commonly used methods will be overridden.
After validation of Maximo directory, Maximo Developer will automatically import all necessary libraries
from Maximo.
On the picture above you can see 3 libraries added automatically, two of them are actually links to Maximo
classes.
On the build path you will see:
That means that build classpath is set and you don't need to set anything by yourself, unless you are using
some other third party libraries.
Navigate to the source folder in your project. Maximo view will then be populated with data
from the Maximo database. If Maximo view appears on some other part of Eclipse workspace,
you can drag and drop it where you want it to be.
Sometimes, you need different view of Maximo mbo and classes data. You can see this data
organized by mbos and not by classes.
Switch to the mbo presentation using the drop-down list on the right side of the Maximo view.
On the toolbar of Maximo view you can see icons for main functionalities. Let's start with one
that you'll be using most often: "Extend existing Maximo class".
You can see that extended class is opened in new editor. Extended class will extend all public
methods of the original class and extend also most commonly used methods from the classes up
in the hierarchy. For example, for all field classes, methods init, action and validate will always
be overridden in the new class.
Take a look at a Maximo view now; you can see that its content has changed after we have
extended the class. Now you can see "*uncommitted" part in the Maximo view, which wasn't
there before. This reminds the user that these classes were not yet committed to the database. If
you right click any element in that part of the tree, you will see popup menu as above. You
should not commit changes to the database until you have made changes that you wanted and
compiled the class. When you commit it to the database, new class is ready for testing.
You can also detach the created class. Attribute will use original class, but the new class is still in
Eclipse, and you can attach it later to the same or any other Maximo object or attribute.
You have to type in the name of the package and class name. You can choose Maximo object
and Maximo attribute. If you leave blank one of these, class will be created, but not attached to
any attribute. You have to choose one of the types of Field class from the radio button list.
You can check now, new stubs and skeletons are created.
Rmicing is an expensive operation and will occur only when no stubs and skeletons are found for
Mbo, or when new remote method is added to Mbo or MboSet.
Another useful way to detach a class is simple deletion from Package explorer or Navigator (if
you delete a class directly from the file system while running Maximo Developer, nothing will
happen). This can be useful if you extend lot of classes by mistake, for example. Another
possible way to use this feature is for debugging. Maximo Developer will generate debug
statement for each extended method. Also, debug level will be on the level of module, like in the
rest of Maximo. For example, if you subclass the class from inventory module, logger will be
maximo.application.INVENTORY. This gives you the power to use this for debugging. Suppose
you have seen some bug in inventory module, and you are not able to find it, because you have
lost the track of order of execution of field and Mbo classes. You would simply extend all
inventory classes, both original psdi, and customized (if class to be created already exist, it will
be used, so you don't need to be afraid that anything will be overwritten). Now change the
logging level of maximo.application.INVENTORY to DEBUG in logging properties, and find
out how calls are being propagated throw all classes in the module. Once you have found where
the root of the problem is, just delete all unnecessary classes, and system will be in the state just
before the massive extension.
As you can see from the picture above, you can attach existing class from the package explorer
to Maximo objects or attributes. You can attach only field classes and MboSet classes, just like
in Maximo Database Configuration. Maximo Developer will automatically recognize what type
of a class is dealt with, and give you list of objects if this is MboSet, or list of object and
attributes if this is field class.