Saturday, June 21, 2008

LDAP Sharing knowledge :)

Several days ago, I read a book about LDAP. Understanding the schema and understanding components inside it, is part of my purpos e on reading it. The following are the points that I got from the book. I hope this blog help any visitors of this blog to understand LDAP.

I would like to start with the schema. What actually schema is used for? The schema is used for defining the structure of your organization in LDAP. The schema is defining 2 components to build the structure of your organization. They are:
1. Object class
Object classes define what entries are possible in an LDAP directory. Please have a look at the following example:

objectclass ( NAME 'organization' DESC 'RFC2256: an organization' SUP top STRUCTURAL MUST o MAY ( userPassword $ searchGuide $ seeAlso $ businessCategory $ x121Address $ registeredAddress $ destinationIndicator $ preferredDeliveryMethod $ telexNumber $ teletexTerminalIdentifier $ telephoneNumber $ internationaliSDNNumber $ facsimileTelephoneNumber $ street $ postOfficeBox $ postalCode $ postalAddress $ physicalDeliveryOfficeName $ st $ l $ description ) )

You may be often to see the above object class defined in your ldif file when you are trying to update or add an entry to your LDAP. The above piece of code, is defining objectClass named organization. The thing that you need to put your attention on is keyword NAME, SUP, MAY and MUST.

What are those things mean?
NAME means the name of your object, it should be unique among all of the object defined.
SUP means that from which class it is derived.
MUST means the compulsory attribute that should exist when you add an entry to which class it belongs to.
May means a not compulsory attribute.

For your information, actually, there are 3 classes that is provided by LDAP (read: OpenLDAP) they are: abstract classes, auxiliary classes, and structural classes. As a lot of cases, people more often to use structural class, in the above example, I am using structural class as you can see from the above example.

2. Attribute
Attribute is defining attribute that objectClass has. For better understanding, I would like to give an example. Below is the example declaration of attribute o and the above example in objectClass organization is the example usage (Please have a look):

dn: dc=atlassian,dc=com objectClass: dcObject objectClass: organization dc: atlassian o: Kia Huat

Please have a look at the following messy picture:

From the above picture, we can see that objectClasses defined are department, sales and IT. ObjectClass sales has several attribute which are name, age and hobby. so does IT.

In attribute, you can define it as a text, image or any sort of data. Howeve, I wont cover up all of those things. It would be better to see it by yourself as it should not be a big problem to understand it.

If you have any comments or advise, I would appreciate it. Please do not hesitate to give it to this blog.

Have a nice day !!!

Monday, June 9, 2008

Learning SAP R/3

This morning, just after wake up from a nice sleep, I read the book that I had downloaded yesterday. This book is about SAP. One thing that was coming from my mind just before I read the book is what actually R/3 stands for. After reading this book (only chapter), R originally stands for Real time which means that every changes on one module will update all of the affected modules in SAP.

Regarding SAP's module, SAP contains a lot of modules (I dont want to mention it as it is too many) such as FI (this stands for Financial Accounting, and it contains several modules... ) and HR. errmm quite a lot but unlucky me i can not see it directly the SAP modules. It makes me a bit difficult to learn by myself.

Regarding SAP R/3, This application consists of 3 layer, which is Presentation layer, middle layer and basis layer. Middle layer actually, is the core of SAP. why? because kernel is located at that layer. Besides, additional functionalities which we can create it using ABAP, is located in the same layer as kernel. The book says that all of the thing we can do in this layer. we can provide many functionalities created using ABAP. Errrmm, I think this is the most interesting point on SAP currently (at least for me).

Another interesting point on SAP is its capability to integrate with other external applications. This application provides a way to integrate with many application developed using many languages, such as Java (this is a must), C, VB etc. From now, I seem to focus on learning this application. I hope there will be a lot of people or resource that I can get to learn this tool.

Sunday, June 8, 2008

JFreechart and JIRA

One of the features on my plugin is creating a chart based on the specified parameter. Actually, this plugin is completely the same as report but the different is the representation. If report plugin is using text but this portlet plugin (I put my chart onto portlet) is using chart to represent the data.

The tricky thing on this plugin is on how to generate chart on the fly. As you know, JIRA is built on several frameworks. Even in plugin creation, you can not be as free as you create common servlet. Thus, creating plugin in JIRA is similar with creating a feature or functionality in the box. There are a lot of limitations.

Lucky me, since version 3.xx (I forget since what version), JIRA (and Confluence) provides you a way to create servlet. Isnt it very cool? It seems that JIRA provides you a way to get a freedom to add an additional functionalities as free as you create common servlet. Moreover, JIRA provides you an injection mechanism so that whenever you need JIRA's object, you can grab it using ComponentManager object. The following is as example of it.

public ServletImage() {
this.searchProvider = ComponentManager.getInstance().getSearchProvider();
this.authenticationContext = ComponentManager.getInstance().getJiraAuthenticationContext();

By using servlet, you can create any file on the fly and you do not need to worry about temporary directory to put your file.