Software Information Blogs

Do you have more than one applet on a web page? Do you want the applets to share water cooler gossip? Ahem..ahem.. On a more serious note, do you want one applet to invoke methods or set variables of another applet?

Long long ago, you may have accomplished applet communication with the use of static variables. This method of sharing applet data is not fool proof. Different applets may run in different instances of the Java Virtual Machine software. This makes it impossible for an applet to see static variables set by another applet.

An applet can communicate with other applets by using JavaScript functions in the parent web page. JavaScript functions enable communication between applets by receiving messages from one applet and invoking methods of other applets. See the following topics for more information about the interaction between Java code and JavaScript code:

You should avoid using the following mechanisms to find other applets and share data between applets:

  • Avoid using static variables to share data between applets.
  • Do not use the getApplet and getApplets methods of the AppletContext class to find other applets. These methods only find applets that are running in the same instance of the Java Runtime Environment software.

Applets must originate from the same directory on the server in order to communicate with each other.

Consider two applets called Sender and Receiver. When a user clicks the button to increment the counter, the Sender applet invokes a JavaScript function to send a request to the Receiver applet. Upon receiving the request, the Receiver applet increments a counter variable and displays the value of the variable.

To enable communication with another applet, obtain a reference to an instance of the netscape.javascript.JSObject class. Use this instance to invoke JavaScript functions. The Sender applet uses an instance of the netscape.javascript.JSObject class to invoke a JavaScript function called sendMsgToIncrementCounter.

try {
    JSObject window = JSObject.getWindow(this);
    window.eval("sendMsgToIncrementCounter()");
} catch (JSException jse) {
    ...
}

Note: To compile Java code that has a reference to classes in the netscape.javascript package, include <your JDK path>/jre/lib/plugin.jar in your classpath. At runtime, the Java Plug-in software automatically makes these classes available to applets.

Write the JavaScript function that will receive requests from one applet and invoke methods of another applet on the web page. The sendMsgToIncrementCounter JavaScript function invokes the Receiver applet's incrementCounter method.

<script>
    function sendMsgToIncrementCounter() {            
        receiver.incrementCounter();
    }
<script>

Note that the JavaScript code uses the name receiver to obtain a reference to the Receiver applet on the web page. This name should be the same as the value of the id attribute that is specified when you deploy the Receiver applet.

The Receiver applet's incrementCounter method is shown next.

public void incrementCounter() {
    ctr++;
    String text = " Current Value Of Counter: " + (new Integer(ctr)).toString();
    ctrLbl.setText(text);
}

Deploy the applets on the web page as shown in the following code snippet. You can view the Sender and Receiver applets and associated JavaScript code in AppletPage.html in this example's source code..

<!-- Sender Applet -->
<script src="http://www.java.com/js/deployJava.js"></script>
<script> 
    var attributes = { code:'Sender.class',
        archive:'examples/dist/applet_SenderReceiver/applet_SenderReceiver.jar',  width:300, height:50} ;
    var parameters = {};
    deployJava.runApplet(attributes, parameters, '1.6');
</script>

<!-- Receiver Applet -->
<script> 
    var attributes = { id:'receiver', code:'Receiver.class',
        archive:'examples/dist/applet_SenderReceiver/applet_SenderReceiver.jar',  width:300, height:50} ;
    var parameters = {};
    deployJava.runApplet(attributes, parameters, '1.6');

</script>

Download source code for the Sender Receiver Applets example to experiment further.

As always, please don't hesitate to send us your feedback!

-- Sowmya Kannan

Found this today by Fabrizio:

It provides pointers for Java rich client development by someone who spends part of his time as a Swing developer and is the creator of blueMarine, an open source application for digital photo workflows. Lots of interesting topics covered, including NetBeans Lookup class and the update functionality that your application can have too for free, as well as the standard NetBeans objects such as FileObjects, DataObjects, Nodes, Explorer Views, etc.

This week Thursday I'll be at this JUGS event with Toni Epple in Zurich:

To join us, register here!

Experian plc is listed on the London Stock Exchange (EXPN) and is a constituent of the FTSE 100 index. Total revenue for the year ended 31 March 2009 was $3.9 billion.

In Financial Applications on the NetBeans Platform I mentioned that Experian develops applications on the NetBeans Platform. (Their codebase consists of "over 100 NetBeans modules".) An interview done with them, about their work on the NetBeans Platform, some time ago, is being updated and should be ready for publication soon, now that permission has been received to publish it.

Here are two screenshots recently received from Experian, showing yet another NetBeans Platform application that doesn't look like an IDE at all, i.e., the NetBeans Platform is a generic framework for any kind of desktop application:

I especially like how the company-specific icons (within panels) have been integrated into the various components shown above.

In other news. Here's the interview referred to above: Enterprise Financial Management on the NetBeans Platform.

Picture of Toni and me at Devoxx, talking about Lookup as an OSGi service registry, which is available from Kenai (here):

More pics here: http://picasaweb.google.com/JavaPolis.com/Devoxx2009

In other news. Watch a movie I made at the conference about interesting things learned at Devoxx: http://java.dzone.com/one-thing-from-devoxx.

Here are some images from the Sun booth at SC09:

From Portland SC09

Click on the image to see the pictures on Picasaweb

How 'bout some funky soul for today's FBB, with Sharon Jones and the Dap Kings:

We've updated the Single Host Deployment Example for Communications Suite 7. This example describes how to install the entire Sun Java Communications Suite 7 software "stack" on one computer for a functioning deployment. This document is intended for any evaluator, system administrator, or installation technician who wants to install and evaluate the services delivered by these components.

This example describes how to install and configure the following components:

  • Sun Java System Messaging Server 7 Update 3
  • Sun Java System Calendar Server 6.3
  • Sun Java System Calendar Server 7
  • Sun Java System Instant Messaging 8 Update 2
  • Sun Java System Directory Server 6.3.1
  • GlassFish Enterprise Server 2.1 Patch 2 with HADB support
  • Delegated Administrator 7
  • Sun Convergence 1 Update 3
  • Sun Java Indexing and Search Service 1
Give the example a whirl.

Navigation made easy

Here are some tips about navigating your Writer text documents.

How to scroll exactly one page down or up

If you read a long text document, you might want to scroll down page by page.

But if you press the PageDown key or click in the empty space below the slider on the vertical scrollbar, the resulting view will not please you. You look at the bottom of one page and the top of the next page, instead of reading whole pages. The is quite a problem when you set the view to show two pages side by side, as in a book.

Look at the bottom right of the Writer document window. There are three icons which are designed to help you scrolling pages. By default the two icons with arrows scroll one page up or down. The tip help for these two icons is "Previous page" and "Next page". And this is just what you need to do: click the Next page (ArrowDown) icon to scroll by one page.

The Navigation window

In the middle between both arrow icons, you see a third icon that is called Navigation. Click this icon to open the Navigation window.



Initially the fifth icon from the left is enabled. It is the Page icon, and Page is also shown at the bottom of the Navigation window. This means that by clicking the ArrowUp and ArrowDown icons, you move the view to the previous or next page. Note that ArrowUp and ArrowDown icons are also available in the Navigation window. They work exactly like the two icons at the bottom of the right scrollbar. If you have set the Writer window to show multiple pages in a row, the two Arrow icons move the view by whole rows.

Click any other icon in the Navigation window. For example, if you have several tables in your text document, you can click the top left Table icon. Now you can click the Next table (ArrowDown) icon to position the text cursor into the next table. The view gets scrolled automatically to show the position of the text cursor.

Setting and jumping to Reminders

Reminders are a kind of unnamed bookmarks or cursor positions within the text. They are not saved with the document. In every text document you can set up to five reminders. Set a reminder at the current cursor position by clicking the Set Reminder icon in the Navigator. There is no feedback, it just works!

If you click the Reminder icon in the Navigation window - it shows a paper clip - you can jump to the next or previous reminder.

Moving the cursor or moving the view

You can edit, insert, or delete characters only at the cursor position. Click somewhere in the text to set the position of the cursor. Press the PageUp or PageDown key or the Arrow keys on your keyboard to move the cursor to another position. The view always follows the cursor, so that you can see where the next text that you type will be inserted.

Now use the scrollbar at the right border of the text window, or turn the mouse wheel, or click the Next page or Previous page buttons next to the Navigation window, and this moves the view only. The text cursor stays where it is.

These different ways of moving allow to see an overview of the contents of other pages while leaving the cursor where it is, so you can continue writing where you left the cursor.



Hi everyone,

We're running a reader poll over on the JavaFX blog. We'd like to know your thoughts on screencasting vs. written tutorials. Please take a minute to visit that page and leave a comment. We greatly value your opinion!

- Scott Hommel

A new attribute has been added to the Advanced properties to support REST policy calls from the Client SDK to the new Entitlement Service. The com.sun.identity.policy.client.useRESTProtocol property is added to the Advanced -> Custom Properties section of the agent profile with a value of true to enable REST interface calls. If the property is not defined, the value defaults to false. Currently, this property is specific to J2EE agents as web agents do not use REST calls to get policy decisions.

So, yes, I planned to use the new Beyonce song Video Phone (see title) but something about this video (featuring Lady Gaga) is - how shall I say - ridiculous? No music, no melody, no thing - just videeeoooo phone and the same dance moves we've seen in every other Beyonce video. So rather than embedding that trash, here's Annie Golden (of The Shirts and Hair movie) singing Hang Up The Phone. Even in its blurry state this video has more class. And that's the truth.

The following information concerns extending the end user password reset or forgot password feature to include Identity Manager 8.1.0.5 to be released sometime in October. (I wrote this weeks ago but forgot to publish it.) In a deployment that has both products integrated, a user needs the option to change or reset a configured password. To allow for identification, challenge questions should be configured for each user account. Unless these questions are answered correctly, this behavior will not be allowed. The flow diagram below details the process. (Right click it to open it full size in a new tab or window.)

To enable this feature, you will need to configure OpenSSO and then test the configurations. The configurations will work if the user has already configured challenge questions and answers or whether the user needs to configure challenge questions and answers now. The following sections have more information.

Configuring OpenSSO

To configure OpenSSO, you will define Identity Manager URIs as not enforced for the policy agent. You will also need to modify the OpenSSO login page so that it will display a Forgot Password button.

To Define Identity Manager URLs as Not Enforced

  1. Login to the OpenSSO console as administrator.
  2. Click the Access Control tab.
  3. Click the appropriate realm name and navigate to the Agents profile for the policy agent that protects Identity Manager.
  4. Under the agent profile, click the Application tab.
  5. Add the following URIs to the Not Enforced URIs property.
    • /idm/authutil/
    • /idm/authutil/*
    • /idm/authutil/*?*
  6. Click Save.
  7. Logout of OpenSSO.

Modifying the OpenSSO Login Page

There are two options to consider when deciding how to display a Forgot Password button on the OpenSSO login page. You can manually change the deployed Login.jsp file, or you can use the sample Login.jsp included with the opensso.zip download. They are mutually-exclusive so choose only one of these procedures.
To Manually Modify a Deployed Login.jsp
  1. Change to the /web-container-deploy-base/opensso/config/auth/default/ directory to access the deployed Login.jsp page.
  2. Open Login.jsp in an editor and add the five (5) sections of code displayed in yellow in forgot_pwd.html on the OpenSSO web site.
    The URL in one section of this page that ends .../idm/authutil/questionLogin.jsp?accountId= links to the Identity Manager JSP that will be displayed if the user does not have challenge questions configured. Replace the beginning of this URL (http://am-v490-01.red.iplanet.com:6480/idm/authutil/questionLogin.jsp?accountId= in the file) with the specifics of your deployment.
  3. Remove the web containers temporary, compiled JSP to ensure that the changes made are picked up.
    For example, if using Glassfish, the temporary, compiled classes can be found under glassfish-home/domains/your-domain/generated/.
  4. Restart the OpenSSO web container after making the changes.
To Use the Sample Login.jsp

  1. Change to the opensso/integrations/idm/jsps/ directory in the decompressed opensso.zip directory to access the sample Login.jsp.
  2. Change the Identity Manager URL embedded in the sample Login.jsp to reflect the Identity Manager system URL of your architecture.
    You can search for the string /idm to locate the URLs.
  3. Replace your deployed /web-container-deploy-base/opensso/config/auth/default/Login.jsp with the sample Login.jsp.
    If you replace your existing Login.jsp with the sample Login.jsp the following will occur.
    • You will lose any custom changes made to the existing Login.jsp.
    • You will inherit changes that might have been previously made to the sample Login.jsp to incorporate requirements for other use cases related to the OpenSSO integration with Identity Manager.
  4. Remove the web containers temporary, compiled JSP to ensure that the changes made are picked up.
    For example, if using Glassfish, the temporary, compiled classes can be found under glassfish-home/domains/your-domain/generated/.
  5. Restart the OpenSSO web container after making the changes.
Optionally, you can run diff between both files and make the necessary changes manually.

Test The Configurations

  1. Access an Identity Manager URL.
    You will be redirected to the OpenSSO login page.
  2. Enter a username and click the "Forgot Password" button.
    You will be redirected to the Identity Manager questionLogin.jsp.
  3. Enter answers to the challenge questions and click the "Login" button.
    You will be redirected to second page.
  4. Enter your new password on this second page.
    This is a temporary password you would've received from contacting the help desk. See the process flow diagram above.
  5. Select the option to update all resource accounts.
    Ensure that both the Identity Manager and OpenSSO resources are selected.
  6. Select the option in the column "Forgot Old Password?" for the OpenSSO Resource.
  7. Click the "Change Password" button.
    The password is now changed. Use the new password next time you log in.

I had to come up with a video for this older post so I just clicked around and found this Queen video, Don't Stop Me Now. I saw this tour at MSG - leather and all!


We'll be at Supercomputing 09 in Portland this week, at the Sun Booth. Stop by and say hello, if you're attending. 

I hope to have more to say about this years annual event, so stay tuned.

Do you have a desktop application that you'd like to distribute to a wider audience? How about monetizing your application by showcasing it on the Java Store?

Check out the screencast for valuable information about how to accomplish this.

Download the source code for the Menu Application shown in the screencast.

See the following resources for more information:

We would be delighted to hear feedback about the screencast!

-- Sowmya Kannan

Good summary here for Convergence and setting mail quotas.

daBrain is up to it again, this time detailing his installation of the complete Communications Suite 7 on Red Hat Enterprise Linux 5.

Have a read, it's an enlightening experience.

Big Joe Williams and his nine-string guitar doing "Baby Please Don't Go."

 


Some more info on Joe and his guitar:

He played with picks both on his thumb and index finger, plus his guitar was very heavily modified. Williams added a rudimentary electric pick-up, whose wires coiled all over the top of his guitar. He also added three extra strings, creating unison pairs for the first, second and fourth strings. His guitar was usually tuned to Open G, like such: (D2 G2 D3D3 G3 B3B3 D4D4), with a capo placed on the second fret to set the tuning to the key of A. During the 1920s and 1930s, Big Joe had gradually added these extra strings in order to keep other guitar players from being able to play his guitar. In his later years, he would also occasionally use a 12-string guitar with all strings tuned in unison to Open G. It is little known that Big Joe sometimes tuned a six-string guitar to an interesting modification of Open G. In this modified tuning, the bass D string (D2) was replaced with a .08 gauge string and tuned to G4. The resulting tuning was (G4 G2 D3 G3 B3 D4), with the G4 string being used as a melody string by Big Joe. This tuning was used exclusively for slide playing

What better day than Friday the 13th to write about the JavaScript Object Notation (JSON) schema used by the Entitlements Service to write the privilege objects returned by Those Darlin'OpenSSO REST Policy Evaluation Interfaces. JSON is relatively easy to read and understand. According to Introducing JSON, it is easy for machines to parse and generate...and is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data-interchange language. (Check out the link for more information.)

An Entitlements Service privilege object has the following attributes:

  • description is a descriptive string.
  • entitlement is made up of:
    • name (any arbitrary unique String)
    • application name
    • set of action values (String to boolean)
    • list of resource names
    • a list of exclusive resource names
  • subjects can include one or more entitlement subjects; in that case, logical subjects such as OrSubject and AndSubject are used. Please refer to sub section, Sub ject JSON Representation for schema for the support sub jects.
  • conditions can include one or more conditions; in that case, logical conditions such as OrCondition and AndCondition are used. Please refer to sub section, Condition JSON Representation for schema for the support conditions.
  • attributes may include user and static attributes.

There's more information to come but, in the meantime, here's another Jason - the Friday the 13th kind - in He's Back - The Man Behind the Mask. I don't know what's scarier the video (filled somewhat with oozing Karo Syrup) or this 80s-induced track sung by Alice Cooper. Mwahahahahahahahaha!!!!

Hi all,

This is blog entry number 517. It is also my last for my Sun blog. Today is my last day at Sun Microsystems.

The past four years have been fantastic. Sun is a wonderful place to work: a great atmosphere and even greater colleagues. I will miss it very much. To leave Sun was a tough decision to make.

It's now time for me to move on. If you've been reading my blog over the years and still want to, you can. I have a personal blog at http://blog.jambra.net/bc/. I hope to see you there.

So, goodbye for now. See you around, wherever that may be.

Cheers!

--James

Tim Boudreau did a pub-based review (PBR) of the Wicket plugin last night and here are the (somewhat cryptic) notes I took of the session:
  • use treebuilder class
  • enable wicket error annotations
  • suggest next wicket id, based on what is closest
  • import statements should be filled in by template
  • talk to jlahoda about super class call problem
  • HTML editor weird annotation, talk to marek fukala

Told you they were cryptic. But at least I know what it all means. Need to do the above before 6.8 so that the Wicket plugin can be released around the same time.

IAV in Berlin, Germany, "is one of the leading providers of engineering services to the automotive industry." Their core competencies include powertrain, electronics and vehicle development.

The NetBeans team gave a development group from IAV a NetBeans Platform Certified Training, in Prague, a few years ago. We contacted them about the progress of their work and today we got a very cool reply from them:

"Things are going very well so far! Our tool EasyDoE Toolsuite (PDF) has become a real big guy ;-). It provides a workflow for calibration engines (or, better, for its control unit) by using a method called Design of Experiments. The workflow guides the user through the whole process, starting at defining the task, making a test plan, importing data, making a mathematical model from the data, using the model in optimizations and calibrate maps that are directly exported to the engine control units."

They also sent some very cool screenshots (click to enlarge them):

Thanks to Berthold Barzantny and the rest of the IAV development team who created the above really professional looking application!

Vimal P., Sun quality assurance engineer extraordinaire, has joined the blogosphere with his first post (well, second if you count the Hello, World test). Here's Vimal's one line description:

This blog describes how to setup the Single Sign On between Access Manager 7.1+ SAMLv2plugin acting as IDP and OpenSSO fedlet as SP.

So, jump from my part of the blogosphere world to Vimal's entry called How to Use Fedlet with Access Manager 7.1+ to learn how it's done. But first luxuriate in the sanguine tones of Louis Armstrong performing What A Wonderful World.

Just a heads up, in case you get the following messaging when trying to access a page on the Communications Suite wiki:

Controlled Access Area

You cannot view this page

Page level restrictions have been applied that limit access to this page.

Though this message sounds like we are control freaks, it's just to alert you the page is not publicly available. In general, we want our Wiki documentation to be as open and available as possible. But in some cases, where we are working on updating or improving documentation, we will restrict access until that work is done.

As always, if any readers are looking for information that you cannot find, or if you have any Comms documentation-related questions, feel free to drop us a line and we'll do our best to help you out.


The new resource authentication feature (as documented Resource Authentication Type in OpenSSO Express 8) can also be enabled for deployments that use OpenSSO policy agents - either Web Agents or J2EE Agents. To enable resource authentication, a URL in the agent profile must be modified by appending to it the resource=true query parameter. The attribute that contains this URL is dependent upon whether the policy agent is configured in Cross Domain SSO (CDSSO) or not.

The procedure requires appending the "resource=true" query parameter to the "OpenSSO Login URL" or "CDSSO Servlet URL" field as follows:
  1. Log into the OpenSSO console as administrator.
  2. Click the Access Control tab.
  3. Click the name of the appropriate realm.
  4. Click the Agents tab.
  5. Click the appropriate agent tab (Web or J2EE).
  6. Click the name of the agent profile to modify.
  7. Choose the appropriate sub step based on whether the agent is configured in CDSSO mode or not.

    • For an agent running in CDSSO mode, click the SSO tab and append resource=true to the existing value of the CDSSO Servlet URL attribute. For example, http://opensso.sun.com:8080/opensso/cdcservlet?resource=true.
    • For an agent NOT running in CDSSO mode, click the OpenSSO Services tab and append resource=true to the existing value of the OpenSSO Login URL attribute. For example, http://opensso.sun.com:8080/opensso/UI/Login?resource=true.

As Spandau Ballet once sang so beautifully, it's True.

Several years ago we converted the 100+ examples in the Swing Tutorial to NetBeans projects. We have received several reports of people having trouble opening those NetBeans projects and we have learned that, as of NetBeans 6.5, a tag is now required in the project.xml file, even if that tag is empty.

We are working on updating those examples but, until that happens, you have to manually add the following tag to your project.xml file, before the </data> tag:

<test-roots/>

For example, the corrected project.xml file for the TableFilterDemoProject example would read:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
    <type>org.netbeans.modules.java.j2seproject</type>
    <configuration>
        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
            <name>TableFilterDemo</name>
            <minimum-ant-version>1.6.5</minimum-ant-version>
            <source-roots>
                <root id="src.dir"/>
            </source-roots>
            <test-roots/> <!-- ADDED -->
        </data>
    </configuration>
</project>

Thanks for your patience until we fix this problem and thanks, as always, for reading the Java Tutorials.

-- Sharon Zakhour

NetBeans screencasts can be found here, which is where you end up when you type "netbeans.tv" in your browser:

http://channelsun.sun.com/video/open-source/

Once you are there, click "NetBeans". If you click the small scrolling arrow below the thumbnails (look at the mouse pointer in the screenshot below) you can also get to the "Top 10 NetBeans APIs" screencast series.

Or, do it the easy way and simply go to the related page on netbeans.org, where the entire series is collected in one place:

http://platform.netbeans.org/tutorials/nbm-10-top-apis.html

Piggybacking on the information in The OpenSSO REST Interfaces in Black / White, OpenSSO Express 9 will mark the release of the RESTful interfaces for policy evaluation. All of them support both HTTP GET and POST actions, and some of them return JavaScript Object Notation (JSON) objects. The format of the OpenSSO REST URL is:

http://OpenSSO-host:OpenSSO-port/opensso/ws/1/entitlement/OpenSSO-REST-interface?parameter1=value1&parameter2=value2&parameterN=valueN

NOTE: If the value of the parameters (value1, value2, ..., valueN) contains unsafe characters, they need to be URL encoded when forming the REST URL. For example, an equal sign (=) needs to be replaced with %3D or an ampersand (&) needs to be replaced with %26.

The following sections contain information on invoking the available OpenSSO REST policy evaluation interfaces.

Evaluating a Decision for One Resource

The decision RESTful policy evaluation interface returns a plain text string of deny or allow in regards to a request for access. The URL may be populated with the following information.

  • realm defines the realm in which the subject is defined. This is an optional parameter and the default value is /.
  • subject defines the value of the Universal ID attribute in the requesting user's OpenSSO profile.
  • action defines the action to be evaluated.
  • resource defines the resource to be evaluated.
  • application defines the requested service. This is an optional parameter and the default value is iPlanetAMWebAgentService.
  • env defines an optional environment map. This map may contain information such as the date and time or the IP address of the client. Examples might be env=requestIp%3D125.12.133.1 or env=requestTime%3D1248994000000.

For example:

http://OpenSSO-host:OpenSSO-port/opensso/ws/1/entitlement/decision?action=GET&resource=http://www.example.com/index.html&application=iPlanetAMWebAgentService&subject=uid=demo,ou=user,dc=opensso,dc=java,dc=net&env=requestTime%3D1248994000000

Evaluating a More Specific Decision for One Resource

The entitlement RESTful policy evaluation interface returns a list of JSONEntitlement objects in regards to a request for access to a resource. Although similar to the decision interface, it does allow more information to be returned as a JSON privilege object. The URL may be populated with the following information.

  • realm defines the realm in which the subject is defined. This is an optional parameter and the default value is /.
  • subject defines the value of the Universal ID attribute in the requesting user's OpenSSO profile.
  • resource defines the resource to be evaluated.
  • application defines the requested service. This is an optional parameter and the default value is iPlanetAMWebAgentService.
  • env defines an optional environment map. This map may contain information such as the date and time or the IP address of the client. Examples might be env=requestIp%3D125.12.133.1 or env=requestTime%3D1248994000000.

For example:

http://OpenSSO-host:OpenSSO-port/opensso/ws/1/entitlement/entitlement?resource=http://www.example.com&application=iPlanetAMWebAgentService&subject=uid%3Ddemo,ou%3Duser,dc%3Dopensso,dc%3Djava,dc%3Dnet

The following result signifies that the evaluation has approved the request for access. But, demo does not have access permission to http://www.example.com because the IP address does not fall within the range of 192.122.18.1 and 192.122.18.254.
{
   "statusCode":200,
   "statusMessage":"OK",
   "body":{
       "results":[
       {
          "actionsValues":{
          },
          "attributes":{},
          "advices":{
               "com.sun.identity.entitlement.IPCondition": "[
                    \"requestIp=192.122.18.1-192.122.18.254\"
               ]"
          },
          "resourceName":"http://www.example.com"
       }
   }
}

Evaluating a Decision for Multiple Resources

The decisions RESTful policy evaluation interface returns a list in the form of a JSONEntitlements object in regards to a request for access to a set of resources. The URL may be populated with the following information.

  • realm defines the realm in which the subject is defined. This is an optional parameter and the default value is /.
  • subject defines the value of the Universal ID attribute in the requesting user's OpenSSO profile.
  • resources defines the set of resources to be evaluated. More than one resources parameter may be added to the URL.
  • application defines the (application or application type). This is an optional parameter and the default value is iPlanetAMWebAgentService.
  • env defines an optional environment map. This map may contain information such as the date and time or the IP address of the client. Examples might be env=requestIp%3D125.12.133.1 or env=requestTime%3D1248994000000.

For example:

http://OpenSSO-host:OpenSSO-port/opensso/ws/1/entitlement/decision?resources=http%3A//www.example.com/index.html&resources=http%3A//www.example2.com/index.html&application=iPlanetAMWebAgentService&subject=uid%3Ddemo,ou%3Duser,dc%3Dopensso,dc%3Djava,dc%3Dnet

The following result signifies that the evaluation has approved the request for access. Additionally, demo (the OpenSSO demo user) has POST and GET permission for http://www.example.com and GET permission for http://www.example2.com.
{
   "statusCode":200,
   "statusMessage":"OK",
   "body":{
       "results":[
       {
          "actionsValues":{
             "POST":true,
             "GET":true
          },
          "attributes":{},
          "advices":{},
          "resourceName":"http://www.example.com"
       }
       {
          "actionsValues":{
             "GET":true
          },
          "attributes":{},
          "advices":{},
          "resourceName":"http://www.example2.com"
       }
       ]
   }
}

Evaluating a Decision for A Root and Sub Tree Resources

The entitlements RESTful policy evaluation interface returns a list in the form of a JSONEntitlements object in regards to a request for access to root resource and its (multiple) sub resources. For example, given the root resource of http://www.example.com, results for all sub resources (including http://www.example.com/hr/*, http://www.example.com/eng/* and http://www.example.com/sales/*) will be returned. The URL may be populated with the following information.

  • realm defines the realm in which the subject is defined. This is an optional parameter and the default value is /.
  • subject defines the value of the Universal ID attribute in the requesting user's OpenSSO profile.
  • resource defines the root of the set of resources to be evaluated.
  • application defines the requested service. This is an optional parameter and the default value is iPlanetAMWebAgentService.
  • env defines an optional environment map. This map may contain information such as the date and time or the IP address of the client. Examples might be env=requestIp%3D125.12.133.1 or env=requestTime%3D1248994000000.

For example:

http://OpenSSO-host:OpenSSO-port/opensso/ws/1/entitlement/entitlement?resources=http://www.example.com&application=iPlanetAMWebAgentService&subject=uid=demo,ou=user,dc=opensso,dc=java,dc=net&env=requestTime%3D1248994000000

The following result signifies that the evaluation has approved the request for access. But, demo (the OpenSSO demo user) has POST and GET permission only for http://www.example.com/hr/* and http://www.example.com/engr/*.
{
   "statusCode":200,
   "statusMessage":"OK",
   "body":{
       "results":[
       {
          "actionsValues":{
          },
          "attributes":{},
          "advices":{},
          "resourceName":"http://www.example.com"
       }
       {
          "actionsValues":{
             "POST":true
             "GET":true
          },
          "attributes":{},
          "advices":{},
          "resourceName":"http://www.example.com/hr/*"
       }
       {
          "actionsValues":{
             "POST":true
             "GET":true
          },
          "attributes":{},
          "advices":{},
          "resourceName":"http://www.example.com/engr/*"
       }
       {
          "actionsValues":{
          },
          "attributes":{},
          "advices":{
               "com.sun.identity.entitlement.IPCondition": "[
                    \"requestIp=192.122.18.1-192.122.18.254\"
               ]"
          },
          "resourceName":"http://www.example.com/sales/*"
       }
   }
}

Now enjoy the musical and illustrative (?) accomplishments of Those Darlins with Red Light Love. It's dope. And that's a good thing!

dev@platform.netbeans.org is the new e-mail address for questions/answers relating to development on the NetBeans Platform. That means, dev@openide.netbeans.org is dead.

Why? Because NetBeans went through a massive migration process during the past week, during which many obsolete projects have been removed from the site and a lot of restructuring of everything has taken place. The good news is that the whole site is now under the control of the NetBeans team, rather than a third party. The so-so news is that several things still need to be tweaked to get everything working correctly now that the migration itself has come to an end. For example, currently, it's not possible to log into the Plugin Portal yet, though that should change within the next few hours.

New passwords and other info has been sent around to mailing lists as well as individual subscribers.

The complete story with all its ramifications can be found here: http://wiki.netbeans.org/NewNBOrg

If you encounter any problems, please report them to:

https://netbeans.org/bugzilla/enter_bug.cgi?product=www&component=Admin

There'll be several loose ends in the next few days, so please be patient as things are being ironed out. And, remember, from now onwards, use dev@platform.netbeans.org (instead of dev@openide.netbeans.org).

Doc Exchange reports on the proof. Men, you need to listen to the Chairman more:

I mentioned a few days ago the start of a plugin for the Vaadin framework in NetBeans IDE. The sources are found here, with the binary here.

I've added a few small additions to the sources (i.e., not in the binary yet):

First, there are new file templates specifically for Vaadin:

For example, simply by adding "SimpleAddressBook" (which adds one Java file to your source structure), you end up with an address book that includes a search feature in your web application:

Secondly, when you press Alt-Insert, you have a new code generator, named "Vaadin Button":

Press the "Vaadin Button" menu item and you have a new button, together with the implementing class added to the class signature, with a hint in the left sidebar for generating the abstract method that is invoked when the button is pushed:

Most importantly, now that these features have been added to the sources, someone else (e.g., from the Vaadin team) can take those sources and add MORE file templates and code generators to the plugin.