Sun Java System Access Manager version 7 2005Q4

Administration Console Samples - Move User Sample

    1. Purpose

    Build a user interface to move a user from one organization to
    another. This is done by adding a Move button in the User
    Navigation page. The Move User page shall be shown after this
    button is clicked.
    

    2. Files

    2.1 UMRelocateUserViewBean.java
    2.2 model/UMRelocateUserModelImpl.java
    2.3 model/UMRelocateUserModel.java
    2.4 jsp/UMRelocateUser.jsp



    3. Directions

    3.1 Copy all the JSP files to
        $AM_INSTALL_DIR/web-src/applications/console/user.
    
    3.2 Edit
        $AM_INSTALL_DIR/web-src/applications/console/user/UMUserNav.jsp
        and add the following HTML after the delete button entry:
        [existing HTML for delete button]
        
	<td width="1%">
            <console:button name="btnDelete" type="mini"
                onClick="clearDataView(); highlight(null);" />
        </td>
        
        [new HTML to add]
        
	<td width="1%">
        <table border="0" cellpadding="1" cellspacing="0"
            class="mini-button-frame-enabled">
            <tr>
            <td>
                <table border="0" cellpadding="0" cellspacing="0" width="100%"
                    class="mini-button-content-enabled">
                    <tr>
                    <td align="center" valign="middle" nowrap>
                        <a href="../user/UMRelocateUser" class="button-link"
                            target="dataFrame" extraParam="reload=true"
                            onClick="highlight(null);"<
                        <div class="mini-button-link-enabled-text"> &nbsp; Move... &nbsp;</div></a>
                    </td>
                    </tr>
                </table>
            </td>
            </tr>
	</table>
        </td>
	
	[existing HTML]
	
	<td width="96%">&nbsp;</td>
            <td width="1%">
            <jato:textField name="txtFilter" size="10"
                extraHtml="id='UMUserNav.txtFilter'" />
        </td>
	
    
    3.3 Add the required resource strings to the console properties
        file $AM_INSTALL_DIR/locale/amAdminModuleMsgs.properties
        
        uid.label=User DN:
        userdn_example.label=(for example:
        uid=user1,ou=people,dc=sun,dc=com)
        newOrgDn_example.label=(for example:
        ou=people,o=airius,dc=sun,dc=com)
        newOrgDN.label=New People Container DN:
        moveuser.title=Move User
        
    
    3.4 Compile the Java files
        
        cd $AM_INSTALL_DIR/samples/console/MoveUser
        gmake all
        
    
    3.5 Create a new jar with the sample class files.
        
	cd $AM_INSTALL_DIR/samples/console
	jar cf am_console_sample.jar com
	
    
    3.6 Copy the am_console_sample.jar into
        $AM_INSTALL_DIR/web-src/applications/WEB-INF/lib
    
    3.7 Redeploy the console
        Set the DEPLOY_LEVEL to 22 in the silent file
        For web server: run amws61config -s <silent file>
        For application server: run amas70config -s <silent file>
    
    3.8 Login to the console, select Users from the View menu, and
        select the Move button in the navigation page.
    



End of Sample

