Uploading static file (image) in webcenter portal for template

Requirement – I have seen many people asking in OTN forum regarding, how to upload with page template or with skin in webcenter. Today sharing with you all.

In wcp 11.1.1.8 normally you don’t have check box to upload content directory with images, javascript or some static file in portal. If you export some asset in WCP from jdeveloper,
Normally template is uploaded but not image.I will take an example of images in this. I created an custom template with some image for mobile.I want to upload back in WCP using round trip
development.

Normally in old wcp version in shared folder , we have all static files or images.Oracle says about this

Legacy directory in MDS for images and content used by assets, such as, icons, images, and so on.Oracle recommends that you relocate all such artifacts to
your content server and that you use a folder structure on your content server specifically for asset artifacts so that content is easy to identify and move, if required.
If you choose not to move artifacts stored in MDS, your administrator can use the MDS WLST commands exportMetadata/importMetadata to migrate content to and from MDS.

So there are two option

1) – Upload in WCC (Webcenter content) – You can upload these document in wcc with some marking and use in webcenter portal. You can use images in WCP as by my previous article.
Display UCM files in ADF/Webcenter application as images or link

– I uploaded techartifact logo in wcc

WCCCheckIn

– I created custom template and added image in that. Source of image is like below

#{WCAppContext.applicationURL}/content/conn/ucmserver/uuid/dDocName%3aAPPLOGO1

imgeSource

APPLOGO1 – content id of document. Read my previous article

That’s it. In this way you can use images in template or skin.

2) – Upload manually in MDS using exportMetadata/importMetadata command – These command is very helpful in working metadata in weblogic. Read my previous article

While creating assest for WCP in jdeveloper, if you put images in shared folder and in below structure

jdeveloperStructure

Then you can use importMetadata command to import image in MDS. for exmaple

importMetadata(application=’webcenter’, server=’WC_Spaces’,fromLocation=’/home/oracle/temp’,docs=’/**’)

– /home/oracle/temp= On this location there is same folder structure like ‘oracle\webcenter\siteresources\scopedMD\shared\images’ . inside image folder , you can put your all images.
and run it

Steps

– run wlst.sh or wlst.cmd under webcenter installtion location
– connect(‘weblogic’,’pwd’,’t3://:7001′)
– importMetadata(application=’webcenter’, server=’WC_Spaces’,fromLocation=’/home/oracle/temp’,docs=’/**’)

Note:In this case, image source in jdeveloper will point to oracle\webcenter\siteresources\scopedMD\shared\images folder and so on..

Final output of template is as below

phone template

That’s it.. By this way you can upload your images.

Happy Learning with Vinay in techartifact…..

Adding user in specific Space in Webcenter

Small tip – To add user in space with some specified or custom role

Solution -If you are using PS6, this code will help you doing that.

    public void addMemberInSpace(String SpaceName, String userid) throws GroupSpaceWSException {
        
      
        logger.fine("Entering AddMember");
        try {
            GroupSpaceWSClient Gsclient = new GroupSpaceWSClient(contextData);

            String userRole = "CustomRole"; // You can define default role as admin, viewer, Moderator or some custom role as well
            GroupSpaceWSMembers memberData = new GroupSpaceWSMembers(userid, userRole);
            
            //Approval code will be added
            List<GroupSpaceWSMembers> addMem = new ArrayList<GroupSpaceWSMembers>();
            addMem.add(memberData);
            Gsclient.addMember(SpaceName, addMem);
            
        } catch (oracle.webcenter.spaces.ws.client.GroupSpaceWSException gsException) {
          
            throw gsException;
        } catch (Exception exception) {
          
            throw new GroupSpaceWSException("Exception caught during addMembership ", null, null, exception, null);
        }
       
    }

 

Happy Coding with techartifact….

Oracle open world 2014 summary

Oracle open world 2014 went few days back.It held in 28 September to 3rd October 2014. OpenWorld 2014 was dominated by jet lag. Apart from jet lag, main focus on this OOW is cloud. Every one talking about the cloud.Talking about updates from OOW.I will more focus on OOW on ADF/webcenter side.

First day (Sunday) – Day started with Larry Ellison key not.The following important updated for each day

Day for ADF EMG
– Alexi Lopes on ADF essential tips and tricks.
– Advance ADF binding by Sten Vesteri
– Create Stunning UI with Oracle ADF faces and SASS by Amr Gawish (I liked this session)
– Real-World Oracle ADF Performance Tuning
– In the evening , I attended Oracle ACE dinner with several ACEs and ACE director.It was really amazing to meeting some awesome people.

10700279_10152405599643947_5194484225458279944_o

10633348_10152405599958947_8025393707779395310_o

Second day (Monday)
– Developing Applications with the Core Oracle ADF Stack by Peter Koletzke.
– Using Oracle Cloud to Power Your Application Development Lifecycle
– Scalability and High-Availability Offerings in Oracle ADF by Jobinesh Purushothaman
– Visited booths of various companies in exhibition hall.
– ADF EMG developer meeting .Met with many ADF developer.Enjoyed..

Third day (Tuesday)
– Oracle WebCenter Sites Strategy and Vision
– Delivering Oracle ADF Projects: Modern Techniques
– Oracle ADF Enterprise Architects Birds-of-a-Feather Meeting by Frank and Chris

Fourth day (Wednesday)
– Modern UI Design: Implementing Oracle’s Best Practices in Your Applications
– The Picture That Paints a Thousand Words: Data Visualization on Web and Mobile
– Guide to Team Development in the Cloud with Oracle Developer Cloud Service
– Oracle ADF Development and Deployment to Oracle Cloud by Andrejus Baranovskis
– Programming Steps in Oracle ADF: Beyond Drag and Drop By Grant Roland

– In the evening Oracle launch Oracle Appreciation event in treasure Island.Its a great party. Aerosmith had performed. Below are few clicks

10517931_10152405600203947_5772367527251482396_o

10379724_10152405599353947_8774964800141703707_o

Fifth day (last)
– Oracle ADF Business Components REST Services with Oracle Mobile Application Framework
– Provisioning Oracle Fusion Middleware Environments with Chef and Puppet by Edwin Biemond
– A Hybrid of Responsive and Adaptive Designin webcenter portal
– Bootcamp on Developing Web and Mobile Dashboards with Oracle ADF by Frank

Its an great event to meet oracle champs in ADF/webcenter/SOA.As usual, it was fun to catch up with the members of my Oracle developer community, my ODTUG buddies and fellow ACEs. Cloud was definitely the hot topic on everyone’s mind this year, especially because Oracle announced their upcoming Oracle Mobile Cloud Services and released their Oracle Developer Cloud Service to production a few weeks before the conference.

The most interesting topic for me was the upcoming Oracle Mobile Cloud Service. This solution includes everything a development team will need to build mobile backends from any datasource or enterprise system. The Mobile Cloud Service can insulate Mobile Developers from complex infrastructure while allowing them to focus on creating killer apps. Oracle Mobile Cloud Service provides built-ins for push notifications, object storage, user management, analytics and an API designer and catalog.

Another cool thing released by Oracle was the Atla UI. These are a set of pre-built design patterns for building modern applications for multiple channels with a focus on user experience not only user interface. With mobile becoming everyone’s primary way of accessing information users are beginning to demand better user interfaces. In response to this, Oracle developed Alta UI to allow developers to create simple and modern UIs across web-based and mobile applications. Alta UI includes a new skin and samples to demonstrate how to make UIs like the ones Oracle has created for their own modern cloud based interfaces. You can see an example of the Oracle Atla UI style in this demo of Forms running on from an Oracle Mobile Framework with Alta UI Style:

macBk-HelpCenter-homepage

Even with all this cool technology, I think the highlight for me had to be the ADF EMG / MAF / Oracle Forms developers meet-up on Tuesday night sponsored by ODTUG.There were attendees from all over the world and it was amazing to see many new faces .

I’d like to give big THANK YOU to the Oracle ACE program for ACE dinner.I hope everyone enjoyed as much I did.Hopefully I can attend next year too.

Overall

ADF- New version can come mid of next year with some more amazing features. This year they launch new Alta UI.Saw demo with product team.Look really good.
Webcenter Portal – Real support for Webcenter content folders. No big update as , I was expecting.New version can expect next year with more responsiveness in Webcenter portal with really amazing new features.
Webcenter content– Oracle Documents Cloud Service is the future.

Cheers
Vinay

Happy learning with Vinay & techartifact