First step is creating a POJO that has the following fields
Resouce file name – The values for this field will be “test.txt, baby.jpg, video.flv”. This field is compulsory, meaning you must validate.
Resource descrption – The values for this field will be “nice pic”. This field is optional, meaning no need to validate. User may leave it blank
Resource type – This field is used by the developer in the programming. When the user upload a resource the program identifies its type and update this field automatically. The values for this field will be
- “Image” if the file type is jpeg, jpg, png, gif
- “Audio” if the file type is mp3
- “video” if the file type is flv
- “Document” if the file type is txt, zip and all other
Second step is creating the services
Third step is creating the portlets
And the final step is creating the View Manager Portlet. While doing the view manager portlet retrieve the resources and display them, order by Resource Types. Meaning all Images listed first, followed by Audio files, then Video Files and finally other Documents.
Filed under: Portlet Development | Tagged: Micro Circle, OMNI, Portal, Resources