Skip to Main Content

Application Development Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is it possible to check-in primary file as attachment?

890683Sep 23 2013 — edited Sep 23 2013

Hi

I got a complex requirement, I'm not sure whether we can achieve this functionality in UCM.

Requirement:

When i check-in any content using DIS(Desktop Integration Suite) or from content console. The checked-in content should not save as primary file, rather it should be saved as attachment for a html file(HTML file need to be generated dynamically, whenever content is checked-in). So, here dynamically generated HTML file should be a "Primary File" and the checked-in content should go as an "Attachment" for that HTML file.

Any help would be helpful. I didn't find any useful content to implement this functionality.

Regards

Raj

Comments

Jiri.Machotka-Oracle

Yes, that's doable via a customization - a filter.

It will grab a checked-in file, generate the html, replace it as the Primary and finally attach the original file.

890683

Thank you.

Could you provide some code examples generating HTML or some file dynamically and setting it as primary file.

Jiri.Machotka-Oracle

Nope, it's your requirement, so you should know what should be in the html. A sample could be a 'Hello-World" Java program that writes a (html) file on a disk - setting it as a primary file simply means redirecting few internal variables during checkin to that file.

I think you should start with a filter. Here I can give you a link to a sample - see How-To Component Samples for Oracle UCM 11g | Bex Huff

890683

Ok sure..

Have a small doubt, Long ago I have used RIDC in my application to check-in or check-out content from UCM. Used,

binder.addFile(String, File) to checkin-primary files and attachments. It works fine.

Now i have created Filter class as you suggested which implements FilterImplementor,

public class CheckinFilter implements FilterImplementor {

    public CheckinFilter() {

        super();

    }

    public int doFilter(Workspace workspace, DataBinder dataBinder,

                        ExecutionContext executionContext){

}

however this dataBinder doesn't have addFile. Then how can i check-in primary file and attachments using binder object, if addFile method is missing. The only difference is RIDC code in my portal application imports import oracle.stellent.ridc.model.DataBinder; and Filter class imports import intradoc.data.DataBinder;. How can i added primary files and attachments from doFilter method ??

Jiri.Machotka-Oracle

I always recommend to perform a use case from GUI and check what services are called (by turning on requestaudit in server-wide tracing).

Basically, you will call the appropriate service from your code. This would work even from RIDC, SOAP/WS, etc.

William Phelps

I'm going to ask for clarification -- define "attachment".  Is this a document that normally would be connected to another document using "related links" functionality, or is this "attachment" idea something totally different?

Jiri.Machotka-Oracle

I know this request for clarification is most likely not a reaction to my post (though, it is placed as such). Either way, the "attachment" story is analyzed in this thread: Attach more than 2 files on 1 doc

1 - 8
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 21 2013
Added on Sep 23 2013
8 comments
625 views