01-16-2013 10:33 PM
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
03-11-2013 06:53 AM
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);