How to search the sas objects in the meta server by using XMLSelect in the customized IDP portlet

Reply
N/A
Posts: 1

How to search the sas objects in the meta server by using XMLSelect in the customized IDP portlet

Hi all,

I am working on the customized IDP portlet and it enable users to search the sas objects (in this case search by file name and keywork).

I got a example which is java application to do this searching function in sas support web site (SAS(R) 9.2 Open Metadata Interface: Reference and Usage).  Its make use of  MdFactory.getOMIUtil().getMetadataObjectsSubset and passing the xmlselect string to do so.

However, the method, getMetadataObjectsSubset , cannot be used in the customized IDP portlet, as I cannot get the Mdfactory Connection due to impossible to get the IDP login user password from the UserContextInterface.

would you guys share some of your thought, any idea to let me make use of XMLSelect in the IDP Portlet, or any alternative ways

SAS Employee
Posts: 1

Re: How to search the sas objects in the meta server by using XMLSelect in the customized IDP portlet

Hi pal!

If you're trying to search into metadata object on portlet you don't necessary have to instantiate a MdFactory object. You can use the InformationService object:

infoService = ServicesFacade.getInformationService();
// Get the session context using the key, which is probably com.sas.services.session.SessionContextInterface
SessionContextInterface localSessionContext = (SessionContextInterface)request.getSession().getAttribute(com.sas.web.keys.CommonKeys.SESSION_CONTEXT);
userContext = localSessionContext.getUserContext();
....
Filter reportFilter = new Filter("Name", FilterComponent.EQUALS, objName);
List res = infoService.search(userContext, reportFilter);
...

Christian

Ask a Question
Discussion stats
  • 1 reply
  • 182 views
  • 0 likes
  • 2 in conversation