<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>lekkimworld.comapi</title>
    <link>http://lekkimworld.com/tags/api/</link>
    <description>IBM Lotus Notes/Domino, Websphere, IBM Connections, mobile, web, JavaScript, Java...</description>
    <language>en</language>
    <copyright>Mikkel Flindt Heisterberg (mh [at] intravision [dot] dk</copyright>
    <pubDate>Sat, 19 May 2012 06:50:25 GMT</pubDate>
    <dc:creator>Mikkel Flindt Heisterberg (mh [at] intravision [dot] dk</dc:creator>
    <dc:date>2012-05-19T06:50:25Z</dc:date>
    <dc:language>en</dc:language>
    <dc:rights>Mikkel Flindt Heisterberg (mh [at] intravision [dot] dk</dc:rights>
    <image>
      <title>lekkimworld.comapi</title>
      <url>http://lekkimworld.com/tags/api/</url>
    </image>
    <item>
      <title>Notes 8.5.3 and Sametime Web API woes</title>
      <link>http://lekkimworld.com/2012/02/22/notes_8_5_3_and_sametime_web_api_woes.html</link>
      <content:encoded>&lt;p&gt;
For one of our products we are using the Sametime Web API which is a great way to Sametime enable applications outside the Notes client. Basically it uses the web container running within Notes Standard to provide a HTTP API for Sametime awareness. Great. We had an issue however after upgrading from Notes 8.5.2 to Notes 8.5.3 where Sametime awarenss stopped working but thanks to the design partner program and the help of Khuan Hoe Kong from IBM we're now back in the business. As this issue may bite others I thought I would post it here.
&lt;/p&gt;
&lt;p&gt;
Our problem was that we were using the "mystatus" and "getShortStatus" API calls to get awareness status that is we were using local calls like http://localhost:59449/stwebapi/mystatus/ and http://localhost:59449/stwebapi/getShortStatus. These calls returned JSON we could use to get awareness status and as previously mentioned these calls worked fine in Notes 8.5.2 but after going to Notes 8.5.3 (and hence a newer version of the embedded Sametime client) they stopped working. Apparently these calls were considered a security risk so there were blocked and needed to be unblocked in order to work. Below is the response from IBM.
&lt;/p&gt;
&lt;p&gt;
&lt;i&gt;For security reasons, many of the WEBApi functions are disabled by default, including the mentioned two. To enable the function, add a preference to the plugin_customization.ini in the following format:
&lt;pre&gt;
com.ibm.collaboration.realtime.webapi.&amp;lt;function&amp;gt;Enabled=true
&lt;/pre&gt;
For example, to enable the getstatusshort, you would add this preference:
&lt;pre&gt;
com.ibm.collaboration.realtime.webapi
   .getstatusshortEnabled=true
&lt;/pre&gt;
To enabled all the Web API functions you can use the global override:
&lt;pre&gt;
com.ibm.collaboration.realtime.webapi/
   enableAllWebApisOverride=true
&lt;/pre&gt;
The details of this change may be found in ST8.5.1 SDK.
&lt;/i&gt;
&lt;/p&gt;
&lt;p&gt;
While the above solution works it requires the customer to configure the client and hence wont work for us. The funny thing is that while the getstatusshort method is blocked for "security reasons" the getstatus method works just fine. Only difference is that the getstatus method returns &lt;u&gt;more&lt;/u&gt; info. Makes no sense. 
&lt;/p&gt;
&lt;p&gt;
My main reason for considering this a bad approach is that I get an HTTP code 200 back but the response is empty/invalid. That seems wrong. A better REST solution would be to return a 403 Forbidden with an explanation why. What would in my mind have been the correct solution. Hope that can be incorporated into a future release.
&lt;/p&gt;
&lt;p&gt;
But it works now so I will go back under my rock.
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/tags/api/">api</category>
      <category domain="http://lekkimworld.com/tags/ibm/">ibm</category>
      <category domain="http://lekkimworld.com/tags/sametime/">sametime</category>
      <category domain="http://lekkimworld.com/tags/webapi/">webapi</category>
      <pubDate>Wed, 22 Feb 2012 13:18:54 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2012-02-22:default/1329916734734</guid>
      <dc:date>2012-02-22T13:18:54Z</dc:date>
    </item>
    <item>
      <title>Searching Profiles programmatically</title>
      <link>http://lekkimworld.com/2011/12/08/searching_profiles_programmatically.html</link>
      <content:encoded>&lt;p&gt;
As part of IBM Connections you will find a big REST API that allows you to work with almost every part of Connections such as searching for profiles, managing files and working with communities. As part of our new product (see my previous post) I'm doing a lot with this API. Right now one of my favorite wiki documents is "&lt;a href="http://www-10.lotus.com/ldd/lcwiki.nsf/dx/Searching_Profiles_programmatically_ic301"&gt;Searching Profiles programmatically&lt;/a&gt;".
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/tags/api/">api</category>
      <category domain="http://lekkimworld.com/tags/connections/">connections</category>
      <category domain="http://lekkimworld.com/tags/ibm_connections/">ibm_connections</category>
      <category domain="http://lekkimworld.com/tags/lotus_connections/">lotus_connections</category>
      <category domain="http://lekkimworld.com/tags/rest/">rest</category>
      <pubDate>Thu, 08 Dec 2011 18:42:28 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2011-12-08:default/1323369748078</guid>
      <dc:date>2011-12-08T18:42:28Z</dc:date>
    </item>
    <item>
      <title>New version of the Java UI API Exerciser available from OpenNTF</title>
      <link>http://lekkimworld.com/2010/12/07/new_version_of_the_java_ui_api_exerciser_available_from_openntf.html</link>
      <content:encoded>&lt;p&gt;
A new release of the Notes Java UI Exerciser project has been released on OpenNTF (&lt;a href="http://www.openntf.org/blogs/openntf.nsf/d6plinks/NHEF-8BW8JX"&gt;OpenNTF Release: Notes Java UI APIs in 8.5.2&lt;/a&gt;) by our friends on the Java UI team at IBM one of whom I'm lucky enough to co-present with at Lotusphere. Check it out!
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/categories/java/">Java</category>
      <category domain="http://lekkimworld.com/tags/api/">api</category>
      <category domain="http://lekkimworld.com/tags/java/">java</category>
      <category domain="http://lekkimworld.com/tags/ui/">ui</category>
      <pubDate>Tue, 07 Dec 2010 13:27:22 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2010-12-07:default/1291728442843</guid>
      <dc:date>2010-12-07T13:27:22Z</dc:date>
    </item>
    <item>
      <title>Why all the talk about recycle() - how about dispose()?</title>
      <link>http://lekkimworld.com/2010/11/20/why_all_the_talk_about_recycle_how_about_dispose.html</link>
      <content:encoded>&lt;p&gt;
Let me start by saying that I agree that recycle() could and should be handled by the API and there are numerous ways around it. I however also think that the majority of Notes developers out there will never have the need to call recycle() in their Java agents. There is a lot of talk about recycle() this and recycle() that but let's face it - it's not really a problem. If ever there is a problem with the Java API it's not recycle() it is the fact that it has been left to stagnate and that it's not keeping up with the Java language as a whole.
&lt;/p&gt;
&lt;p&gt;
All this being said I wonder why so much talk and energy is being spent on recycle() and how come it is constantly being used as a reason not to move to Java and embrace the language. Looking at other API's there are stuff that needs to be done. In the Java API it's recycle() (whenever it's &lt;u&gt;actually&lt;/u&gt; needed) and in SWT it's dispose(). I never see any SWT discussions on the dispose() method and DisposeListeners and using it as a justification for not choosing SWT and Eclipse as the fundation for an application. You judge a framework on what it does for you and not a single method in an API. Every API and language has quirks. Deal with it!
&lt;/p&gt;
&lt;p&gt;
My post from 2006 (!!) has a lot more information on recycle() and why it's there: &lt;a href="http://lekkimworld.com/2006/04/09/java_in_notes_domino_explained_the_story_on_recycle.html"&gt;Java in Notes/Domino Explained: The story on recycle()&lt;/a&gt;
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/tags/api/">api</category>
      <category domain="http://lekkimworld.com/tags/domino/">domino</category>
      <category domain="http://lekkimworld.com/tags/java/">java</category>
      <category domain="http://lekkimworld.com/tags/notes/">notes</category>
      <category domain="http://lekkimworld.com/tags/recycle/">recycle</category>
      <category domain="http://lekkimworld.com/tags/swt/">swt</category>
      <pubDate>Sat, 20 Nov 2010 18:46:02 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2010-11-20:default/1290278762453</guid>
      <dc:date>2010-11-20T18:46:02Z</dc:date>
    </item>
    <item>
      <title>The technique for building a better Notes Java API</title>
      <link>http://lekkimworld.com/2009/03/12/the_technique_for_building_a_better_notes_java_api.html</link>
      <content:encoded>&lt;p&gt;
This is a followup post to yesterdays post titled &lt;a href="http://lekkimworld.com/2009/03/11/want_to_join_me_in_building_a_better_notes_java_api.html"&gt;Want to join me in building a better Notes Java API?&lt;/a&gt; and here I'll show just how easy it was to build the wrapper API. 
&lt;/p&gt;
&lt;p&gt;
Below is the code from the implementation of the getView(String) method of the lotus.domino.Database interface. As you can see the central element is to get the current thread the method is called on and the thread used for Notes data access. If we're not on the Notes thread execute a blocking request and return the result. If we're on the Notes thread simply go ahead and do the operation. Simple right?
&lt;/p&gt;
&lt;p&gt;
The most difficult part of all this was that I had to write my own Notes thread handler (equivalent of NotesPlatform) as there isn't a method for doing a blocking request on the Notes thread in NotesPlatform class supplied by Lotus.
&lt;/p&gt;
&lt;p&gt;
&lt;pre&gt;
public View getView(final String name) throws NotesException {
  // get threads
  Thread curThread = Thread.currentThread();
  Thread notesThread = NotesPlatform.getInstance().getThread();

  // decide if we're in the Notes thread or not
  if (curThread != notesThread) {
    // we're not on the Notes thread so wrap
    final Holder h = new Holder();
    
    NotesPlatform.getInstance().syncExec(new Runnable() {
      public void run() {
        try {
          h.value = DatabaseWrapper.this.db.getView(name);
          
        } catch (NotesException e) {
          h.throwable = e;
        }
      }
    });
    
    if (null != h.throwable) {
      throw (NotesException)h.throwable;
    } else {
      return new ViewWrapper((View)h.value);
    }
    
  } else {
    // we're on the thread so do request
    return new ViewWrapper(DatabaseWrapper.this.db.getView(name));
  }
}
&lt;/pre&gt;
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/categories/java/">Java</category>
      <category domain="http://lekkimworld.com/categories/ibm_products/">IBM</category>
      <category domain="http://lekkimworld.com/tags/api/">api</category>
      <category domain="http://lekkimworld.com/tags/java/">java</category>
      <category domain="http://lekkimworld.com/tags/notes8/">notes8</category>
      <category domain="http://lekkimworld.com/tags/notes85/">notes85</category>
      <pubDate>Thu, 12 Mar 2009 11:18:26 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2009-03-12:default/1236856706495</guid>
      <dc:date>2009-03-12T11:18:26Z</dc:date>
    </item>
    <item>
      <title>Learning the ropes (pun intended)</title>
      <link>http://lekkimworld.com/2008/02/19/learning_the_ropes_pun_intended.html</link>
      <content:encoded>&lt;p&gt;
I discovered this article through my developerWorks subscription and it was an interesting read. I picked up on the article since I do a lot of String manipulation in LotusScript.doc but hardly in the the 50MB range as described in the article. Still I think you should read the article if you
&lt;ol&gt;
&lt;li&gt;like to learn new API's&lt;/li&gt;
&lt;li&gt;like to think outside the box&lt;/li&gt;
&lt;li&gt;do stuff in Java&lt;/li&gt;
&lt;/ol&gt;
&lt;/p&gt;
&lt;p&gt;
Article abstract:
&lt;/p&gt;
&lt;p&gt;
&lt;i&gt;"Systems that manipulate large quantities of string data are poorly served by the Java language's default String and StringBuilder classes. A rope data structure can be a better alternative. This article introduces Ropes for Java, a rope implementation for the Java platform; explores performance issues; and provides pointers for effective use of the library."&lt;/i&gt;
&lt;/p&gt;
&lt;p&gt;
developerWorks: &lt;a href="http://www.ibm.com/developerworks/library/j-ropes/?S_TACT=105AGX54&amp;S_CMP=B0215&amp;ca=dnw-906"&gt;Ropes: Theory and practice - Why and when to use Ropes for Java for string manipulations&lt;/a&gt;
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/categories/java/">Java</category>
      <category domain="http://lekkimworld.com/tags/api/">api</category>
      <category domain="http://lekkimworld.com/tags/java/">java</category>
      <pubDate>Tue, 19 Feb 2008 07:08:00 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2008-02-19:default/1203404880000</guid>
      <dc:date>2008-02-19T07:08:00Z</dc:date>
    </item>
    <item>
      <title>Effective API Design presentation by Joshua Bloch</title>
      <link>http://lekkimworld.com/2007/09/20/effective_api_design_presentation_by_joshua_bloch.html</link>
      <content:encoded>&lt;p&gt;
Although from JavaPolis 2005 this is still a very nice presentation by one of the gurus in the field of API design, Joshua Bloch. The presentation runs about 70 minutes but is well worth it.
&lt;/p&gt;
&lt;p&gt;
Summary: &lt;i&gt;"A well-written API can be a great asset to the organization that wrote it and to all that use it. Given the importance of good API design, surprisingly little has been written on the subject. In this talk (recorded at Javapolis), Java library designer Joshua Bloch teaches how to design good APIs, with many examples of what good and bad APIs look like."&lt;/i&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.infoq.com/presentations/effective-api-design"&gt;Effective API Design&lt;/a&gt;
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/categories/java/">Java</category>
      <category domain="http://lekkimworld.com/tags/api/">api</category>
      <category domain="http://lekkimworld.com/tags/java/">java</category>
      <category domain="http://lekkimworld.com/tags/presentation/">presentation</category>
      <pubDate>Thu, 20 Sep 2007 20:44:00 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2007-09-20:default/1190321040000</guid>
      <dc:date>2007-09-20T20:44:00Z</dc:date>
    </item>
    <item>
      <title>XML entities when doing XSL transformations using LotusScript</title>
      <link>http://lekkimworld.com/2007/06/06/xml_entities_when_doing_xsl_transformations_using_lotusscript.html</link>
      <content:encoded>&lt;p&gt;
I stumbled over an interesting post on developerWorks on external XML entities and XSL transformations in LotusScript: &lt;a href="http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllThreadedWeb/f43daa4e4d565acb852572f100749ddb?OpenDocument"&gt;XSLT transform-ignoring external entity reference in R7.0.2 - but worked well on R6.5.4&lt;/a&gt;. I was puzzled by the post and looked a bit into it and was unable to find any real LotusScript API support for working with XML entities when processing XML in LotusScript. 
&lt;/p&gt;
&lt;p&gt;
I find it funny that there doesn't appear to be any real API support for XML entities in LotusScript that I can see anyway. Hmmm - gotta go into Sherlock Holmes mode...
&lt;/p&gt;</content:encoded>
      <category domain="http://lekkimworld.com/categories/ls/">LotusScript</category>
      <category domain="http://lekkimworld.com/categories/xml/">XML</category>
      <category domain="http://lekkimworld.com/tags/api/">api</category>
      <category domain="http://lekkimworld.com/tags/dtd/">dtd</category>
      <category domain="http://lekkimworld.com/tags/lotusscript/">lotusscript</category>
      <category domain="http://lekkimworld.com/tags/xml/">xml</category>
      <category domain="http://lekkimworld.com/tags/xml_entities/">xml_entities</category>
      <pubDate>Wed, 06 Jun 2007 08:35:33 GMT</pubDate>
      <guid isPermaLink="false">tag:lekkimworld.com,2007-06-06:default/1181118933999</guid>
      <dc:date>2007-06-06T08:35:33Z</dc:date>
    </item>
  </channel>
</rss>


