The WebSphere\wp_profile\installedApps\sunpa\wps.ear\wps.war\themes\dojo\portal_dojo\ibm\portal\portlet\portelet.js file has all the source code for the client side API and good things is it has very good inline documentation. The portlet.js has close to 1700 lines of code, but the code is built using Dojo so it very easy to read and well structured.
This screen shot is from my machine which shows documentation for
setPortletStatemethos is part of
ibm.portal.portlet.PortletWindow and allows you to change the portlet state on the client side, if the method is called from page built using the Client Side Aggregation theme then the callback function decides how to react to the state change but in case of Server side aggregation theme it will result in page refresh