You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by sm...@apache.org on 2014/11/11 21:35:12 UTC
[02/27] directory-fortress-commander git commit: change package
structure and names, pom improvements, license
http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/547b9ccd/src/main/resources/org/openldap/commander/panel/UserDetailPanel.html
----------------------------------------------------------------------
diff --git a/src/main/resources/org/openldap/commander/panel/UserDetailPanel.html b/src/main/resources/org/openldap/commander/panel/UserDetailPanel.html
deleted file mode 100644
index af18984..0000000
--- a/src/main/resources/org/openldap/commander/panel/UserDetailPanel.html
+++ /dev/null
@@ -1,378 +0,0 @@
-<!--
- ~ This work is part of OpenLDAP Software <http://www.openldap.org/>.
- ~
- ~ Copyright 1998-2014 The OpenLDAP Foundation.
- ~ All rights reserved.
- ~
- ~ Redistribution and use in source and binary forms, with or without
- ~ modification, are permitted only as authorized by the OpenLDAP
- ~ Public License.
- ~
- ~ A copy of this license is available in the file LICENSE in the
- ~ top-level directory of the distribution or, alternatively, at
- ~ <http://www.OpenLDAP.org/license.html>.
- -->
-
-<html xmlns:wicket="http://wicket.apache.org/">
-<body>
-<wicket:panel>
-<form wicket:id="editFields">
-<fieldset>
- <legend>Detail Operations</legend>
-
- <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="add" value="add" name="add"/>
- <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="commit" value="commit" name="commit"/>
- <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="delete" value="delete" name="delete"/>
- <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="cancel" value="clear" name="clear"/>
-</fieldset>
-<div id="accordion">
-<h3><img wicket:id="jpegPhoto" width="25" height="25"/> <span wicket:id="userDetailLabel"/></h3>
-
-<div>
- <table id="inputFormTable">
- <tr>
- <td>
- <label for="userId">UserId</label>
- </td>
- <td>
- <input type="text" wicket:id="userId" id="userId" class="formLarge" style="width: 250px"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="pswdField">Password</label>
-
- </td>
- <td>
- <input wicket:id="pswdField" id="pswdField" type="password" style="width: 250px"/>
-
- </td>
- </tr>
- <tr>
- <td>
- <label for="ou">User Organization</label>
- </td>
- <td>
- <input type="text" wicket:id="ou" id="ou" class="formLarge" style="width: 250px"/>
- <button wicket:id="ou.search" name="ou.search">search</button>
- <div wicket:id="ousmodal"></div>
- </td>
- </tr>
- <tr>
- <td>
- <label for="pwPolicy">PW Policy</label>
- </td>
- <td>
- <input type="text" wicket:id="pwPolicy" id="pwPolicy" class="formLarge" style="width: 250px"/>
- <button wicket:id="policy.search" name="policy.search">search</button>
- <div wicket:id="policiesmodal"></div>
- </td>
- </tr>
- <tr>
- <td>
- <label for="reset">Reset</label>
- </td>
- <td>
- <input type="checkbox" wicket:id="reset" id="reset"/>
- <button wicket:id="resetbtn" name="resetbtn">Reset</button>
- </td>
- </tr>
- <tr>
- <td>
- <label for="locked">Locked</label>
- </td>
- <td>
- <input type="checkbox" wicket:id="locked" id="locked"/>
- <button wicket:id="lockbtn" name="lockbtn"><span wicket:id="lockLabel" id="lockLabel"/></button>
- </td>
- </tr>
- </table>
-</div>
-
-<h3><span wicket:id="roleAssignmentsLabel" id="roleAssignmentsLabel"/></h3>
-
-<div>
- <table id="inputRoleAssignmentsTable">
- <fieldset>
- <legend>RBAC Role Assignment Operations</legend>
- <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="assign" name="assign" value="assign"/>
- <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="deassign" name="deassign" value="deassign"/>
- </fieldset>
- <tr>
- <td>
- <label for="roles">RBAC Roles</label>
- </td>
- <td>
- <input type="text" wicket:id="roles" id="roles" style="width: 250px;display:block"/>
- <button wicket:id="roles.search" name="roles.search">search</button>
- <div wicket:id="rolesmodal"></div>
- </td>
- </tr>
- </table>
- <div wicket:id="roleconstraintpanel"></div>
-</div>
-<h3><span wicket:id="adminRoleAssignmentsLabel" id="adminRoleAssignmentsLabel"/></h3>
-
-<div>
- <table id="inputAdminRoleAssignmentsTable">
- <fieldset>
- <legend>Admin Role Assignment Operations</legend>
- <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="assignAdminRole" name="assignAdminRole" value="assign"/>
- <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="deassignAdminRole" name="deassignAdminRole" value="deassign"/>
- </fieldset>
- <tr>
- <td>
- <label for="adminRoles">Admin Roles</label>
- </td>
- <td>
- <input type="text" wicket:id="adminRoles" id="adminRoles" style="width: 250px;display:inline"/>
- <button wicket:id="adminRoles.search" name="adminRoles.search">search</button>
- <div wicket:id="adminrolesmodal"></div>
- </td>
- </tr>
- </table>
- <div wicket:id="adminroleconstraintpanel"></div>
-</div>
-<h3><span wicket:id="contactInformationLabel" id="contactInformationLabel"/></h3>
-
-<div>
- <table id="contactInfoTable">
- <tr>
- <td>
- <label for="displayName">Display Name</label>
- </td>
- <td>
- <input type="text" wicket:id="displayName" id="displayName" class="formLarge"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="description">Description</label>
- </td>
- <td>
- <input type="text" wicket:id="description" id="description" class="formLarge" style="width: 250px"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="employeeType">Employee Type</label>
- </td>
- <td>
- <input type="text" wicket:id="employeeType" id="employeeType" class="formLarge" style="width: 250px"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="title">Title</label>
- </td>
- <td>
- <input type="text" wicket:id="title" id="title" class="formLarge" style="width: 250px"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="emails">Emails</label>
- </td>
- <td>
- <input type="text" wicket:id="emails" id="emails" style="width: 250px"/>
- <button wicket:id="emails.delete" name="emails.delete">remove</button>
- </td>
- </tr>
- <tr>
- <td>
- <label for="phones">Phones</label>
- </td>
- <td>
- <input type="text" wicket:id="phones" id="phones" style="width: 250px"/>
- <button wicket:id="phones.delete" name="phones.delete">remove</button>
- </td>
- </tr>
- <tr>
- <td>
- <label for="mobiles">Mobiles</label>
- </td>
- <td>
- <input type="text" wicket:id="mobiles" id="mobiles" style="width: 250px"/>
- <button wicket:id="mobiles.delete" name="mobiles.delete">remove</button>
- </td>
- </tr>
- </table>
-</div>
-<h3><span wicket:id="addressAssignmentsLabel" id="addressAssignmentsLabel"/></h3>
-
-<div>
- <table id="inputAddressTable">
- <tr>
- <td>
- <label for="addresses">Addresses</label>
- </td>
- <td>
- <input type="text" wicket:id="addresses" id="addresses" style="width: 250px"/>
- <button wicket:id="address.delete" name="address.delete">remove</button>
- </td>
- </tr>
- <tr>
- <td>
- <label for="address.city">City</label>
- </td>
- <td>
- <input type="text" wicket:id="address.city" id="address.city"
- class="formLarge" style="width: 250px"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="address.state">State</label>
- </td>
- <td>
- <input type="text" wicket:id="address.state" id="address.state"
- class="formLarge" style="width: 250px"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="address.country">Country</label>
- </td>
- <td>
- <input type="text" wicket:id="address.country" id="address.country"
- class="formLarge" style="width: 250px"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="address.postalCode">Postal Code</label>
- </td>
- <td>
- <input type="text" wicket:id="address.postalCode" id="address.postalCode"
- class="formLarge" style="width: 250px"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="address.postOfficeBox">Post Office Box</label>
- </td>
- <td>
- <input type="text" wicket:id="address.postOfficeBox" id="address.postOfficeBox"
- class="formLarge" style="width: 250px"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="address.building">Building #</label>
- </td>
- <td>
- <input type="text" wicket:id="address.building" id="address.building"
- class="formLarge" style="width: 250px"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="address.departmentNumber">Department #</label>
- </td>
- <td>
- <input type="text" wicket:id="address.departmentNumber" id="address.departmentNumber"
- class="formLarge" style="width: 250px"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="address.roomNumber">Room #</label>
- </td>
- <td>
- <input type="text" wicket:id="address.roomNumber" id="address.roomNumber"
- class="formLarge" style="width: 250px"/>
- </td>
- </tr>
- </table>
-</div>
-
-<h3><span wicket:id="temporalConstraintsLabel" id="temporalConstraintsLabel"/></h3>
-
-<div>
- <div wicket:id="constraintpanel" id="constraintpanel"></div>
-</div>
-
-<h3><span wicket:id="systemInfoLabel" id="systemInfoLabel"/></h3>
-
-<div>
- <table id="systemInfoTable">
- <tr>
- <td>
- <label for="system">System:</label>
- </td>
- <td>
- <input type="checkbox" wicket:id="system" id="system"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="internalId">Internal ID</label>
- </td>
- <td>
- <span wicket:id="internalId"></span>
- </td>
- </tr>
- <tr>
- <td>
- <label for="cn">CN</label>
- </td>
- <td>
- <input type="text" wicket:id="cn" id="cn" class="formLarge" style="width: 250px"/>
- </td>
- </tr>
- <tr>
- <td>
- <label for="dn">DN</label>
- </td>
- <td>
- <span wicket:id="dn"></span>
- </td>
- </tr>
- <tr>
- <td>
- <label for="sn">SN</label>
- </td>
- <td>
- <input type="text" wicket:id="sn" id="sn" class="formLarge" style="width: 250px"/>
- </td>
- </tr>
- </table>
-</div>
-
-<h3><span wicket:id="importPhotoLabel" id="importPhotoLabel"/></h3>
-
-<div>
- <table id="inputJpegPhotoTable">
- <tr>
- <td>
- <input type="file" wicket:id="upload" id="upload"/>
- </td>
- </tr>
- <tr>
- <td>
- <input type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="save" name="save" value="save"/>
- </td>
- </tr>
- <tr>
- <td>
- <img wicket:id="jpegPhoto2" width="125" height="125"/>
- </td>
- </tr>
- </table>
-</div>
-
-</div>
-
-</form>
-</wicket:panel>
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/547b9ccd/src/main/resources/org/openldap/commander/panel/UserListPanel.html
----------------------------------------------------------------------
diff --git a/src/main/resources/org/openldap/commander/panel/UserListPanel.html b/src/main/resources/org/openldap/commander/panel/UserListPanel.html
deleted file mode 100644
index 1b14c2f..0000000
--- a/src/main/resources/org/openldap/commander/panel/UserListPanel.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!--
- ~ This work is part of OpenLDAP Software <http://www.openldap.org/>.
- ~
- ~ Copyright 1998-2014 The OpenLDAP Foundation.
- ~ All rights reserved.
- ~
- ~ Redistribution and use in source and binary forms, with or without
- ~ modification, are permitted only as authorized by the OpenLDAP
- ~ Public License.
- ~
- ~ A copy of this license is available in the file LICENSE in the
- ~ top-level directory of the distribution or, alternatively, at
- ~ <http://www.OpenLDAP.org/license.html>.
- -->
-
-<html xmlns:wicket="http://wicket.apache.org/">
-<body>
-<wicket:panel>
- <form wicket:id="userlistform">
- <fieldset>
- <legend>User Search Operations</legend>
-
- <div wicket:id="userformsearchfields">
-
- <table id="inputFormTable">
- <tr>
- <div wicket:id="rolesearchmodal"></div>
- <div wicket:id="adminrolesearchmodal"></div>
- <div wicket:id="ousearchmodal"></div>
- <div wicket:id="permsearchmodal"></div>
-
-
- <span wicket:id="searchOptions">
- <input type="radio" wicket:id="userRb" id="userRb">UserId</input>
- <input type="radio" wicket:id="roleRb" id="roleRb"><a href="#" wicket:id="roleAssignLinkLbl"
- id="roleAssignLinkLbl">RBAC
- Role</a></input>
- <input type="radio" wicket:id="adminRoleRb" id="adminRoleRb"><a href="#"
- wicket:id="adminRoleAssignLinkLbl"
- id="adminRoleAssignLinkLbl">Admin
- Role</a></input>
- <input type="radio" wicket:id="ouRb" id="ouRb"><a href="#" wicket:id="ouAssignLinkLbl"
- id="ouAssignLinkLbl">User
- Organization</a></input>
- <input type="radio" wicket:id="permRb" id="permRb"><a href="#" wicket:id="permLinkLbl"
- id="permLinkLbl">Permission</a></input>
- </span>
-
- </tr>
-
- <tr>
- <div wicket:id="searchfields">
- <fieldset>
- <legend><label wicket:id="searchFieldslabel">Search Fields</label></legend>
- <!--<label wicket:id="searchFieldslabel">Search Fields</label>-->
- <label for="field1" wicket:id="field1label">Field1</label>
- <input type="text" wicket:id="field1" id="field1" class="formLarge"
- style="width: 300px"/>
-   
- <label for="field2" wicket:id="field2label">Field2</label>
- <input type="text" wicket:id="field2" id="field2" class="formLarge"
- style="width: 300px"/>
- </fieldset>
- </div>
-
- </tr>
-
- <tr>
- <input type="button"
- class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="search" value="search" name="search"/>
-   
- <input type="button"
- class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
- wicket:id="clear" value="clear" name="clear"/>
- </tr>
- </table>
- </div>
-
- </fieldset>
- <div wicket:id="usertreegrid" id="usertreegrid">
- </div>
- </form>
-</wicket:panel>
-</body>
-</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/547b9ccd/src/main/resources/org/openldap/commander/panel/UserSearchModalPanel.html
----------------------------------------------------------------------
diff --git a/src/main/resources/org/openldap/commander/panel/UserSearchModalPanel.html b/src/main/resources/org/openldap/commander/panel/UserSearchModalPanel.html
deleted file mode 100644
index 344827d..0000000
--- a/src/main/resources/org/openldap/commander/panel/UserSearchModalPanel.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!--
- ~ This work is part of OpenLDAP Software <http://www.openldap.org/>.
- ~
- ~ Copyright 1998-2014 The OpenLDAP Foundation.
- ~ All rights reserved.
- ~
- ~ Redistribution and use in source and binary forms, with or without
- ~ modification, are permitted only as authorized by the OpenLDAP
- ~ Public License.
- ~
- ~ A copy of this license is available in the file LICENSE in the
- ~ top-level directory of the distribution or, alternatively, at
- ~ <http://www.OpenLDAP.org/license.html>.
- -->
-
-<?xml version="1.0" encoding="UTF-8" ?>
-<wicket:panel xmlns:wicket="http://wicket.apache.org">
- <div style="margin: 1em">
- <div class="boxContent">
- <table class="table">
- <thead>
- <tr>
- <th>Select</th>
- <th>User ID</th>
- <th>Description</th>
- <th>Name</th>
- <th>Organization</th>
- <th>Title</th>
- <th>Photo</th>
-
- </tr>
- </thead>
- <tbody>
- <tr valign="top" wicket:id="userdataview">
- <!--
- "userId",
- "description",
- "name",
- "internalId",
- "ou",
- "pwPolicy",
- "sn",
- "cn",
- "dn",
- "employeeType",
- "title",
- "address",
- "phones",
- "mobiles",
- "emails",
- "props",
- "locked",
- "reset",
- "system",
- "beginTime",
- "endTime",
- "beginDate",
- "endDate",
- "beginLockDate",
- "endLockDate",
- "dayMask",
- "timeout",
- "roles",
- "adminRoles",
- "password",
- "newPassword",
- "jpegPhoto"
- -->
-
- <td><a href="#" wicket:id="select">select</a></td>
- <td><img wicket:id="jpegPhoto" width="50" height="50"/></td>
- <td><span wicket:id="userId"></span></td>
- <td><span wicket:id="name"></span></td>  
- <td><span wicket:id="title"></span></td>
- <td><span wicket:id="description"></span></td>
- <td><span wicket:id="ou"></span></td>
- </tr>
- </tbody>
- </table>
- <span class="pagination" wicket:id="usernavigator"></span>
- </div>
- </div>
-</wicket:panel>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/547b9ccd/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 398cc92..a32a1ca 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -1,17 +1,21 @@
<!--
- ~ This work is part of OpenLDAP Software <http://www.openldap.org/>.
- ~
- ~ Copyright 1998-2014 The OpenLDAP Foundation.
- ~ All rights reserved.
- ~
- ~ Redistribution and use in source and binary forms, with or without
- ~ modification, are permitted only as authorized by the OpenLDAP
- ~ Public License.
- ~
- ~ A copy of this license is available in the file LICENSE in the
- ~ top-level directory of the distribution or, alternatively, at
- ~ <http://www.OpenLDAP.org/license.html>.
- -->
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
@@ -46,7 +50,7 @@
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
<param-name>applicationClassName</param-name>
- <param-value>org.openldap.commander.HomePageApplication</param-value>
+ <param-value>org.apache.directory.fortress.web.HomePageApplication</param-value>
</init-param>
</filter>
http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/547b9ccd/src/main/webapp/login/error.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/login/error.html b/src/main/webapp/login/error.html
index 16d2936..a100e05 100644
--- a/src/main/webapp/login/error.html
+++ b/src/main/webapp/login/error.html
@@ -1,28 +1,32 @@
<!--
- ~ This work is part of OpenLDAP Software <http://www.openldap.org/>.
- ~
- ~ Copyright 1998-2014 The OpenLDAP Foundation.
- ~ All rights reserved.
- ~
- ~ Redistribution and use in source and binary forms, with or without
- ~ modification, are permitted only as authorized by the OpenLDAP
- ~ Public License.
- ~
- ~ A copy of this license is available in the file LICENSE in the
- ~ top-level directory of the distribution or, alternatively, at
- ~ <http://www.OpenLDAP.org/license.html>.
- -->
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <link rel="stylesheet" type="text/css" href="/commander/css/camo-style.css" media="all"/>
- <title> Commander RBAC Administration </title>
+ <link rel="stylesheet" type="text/css" href="/fortress-web/css/camo-style.css" media="all"/>
+ <title> Fortress Web RBAC Administration </title>
</head>
<body>
<h3>Invalid userid or password detected</h3>
-<FORM METHOD=POST ACTION="/commander/wicket/bookmarkable/org.openldap.commander.LaunchPage">
+<FORM METHOD=POST ACTION="/fortress-web/wicket/bookmarkable/org.apache.directory.fortress.web.LaunchPage">
<p>
<font size="2">Click the button to re-authenticate.</font>
<BR><BR>
@@ -30,6 +34,6 @@
</p>
</form>
-Copyright (c) 1998-2014, The OpenLDAP Foundation. All Rights Reserved.
+Copyright (c) 2003-2014, The Apache Software Foundation. All Rights Reserved.
</body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/547b9ccd/src/main/webapp/login/login.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/login/login.html b/src/main/webapp/login/login.html
index 2e9e2f3..a54bd3b 100644
--- a/src/main/webapp/login/login.html
+++ b/src/main/webapp/login/login.html
@@ -1,24 +1,28 @@
<!--
- ~ This work is part of OpenLDAP Software <http://www.openldap.org/>.
- ~
- ~ Copyright 1998-2014 The OpenLDAP Foundation.
- ~ All rights reserved.
- ~
- ~ Redistribution and use in source and binary forms, with or without
- ~ modification, are permitted only as authorized by the OpenLDAP
- ~ Public License.
- ~
- ~ A copy of this license is available in the file LICENSE in the
- ~ top-level directory of the distribution or, alternatively, at
- ~ <http://www.OpenLDAP.org/license.html>.
- -->
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <link rel="stylesheet" type="text/css" href="/commander/css/camo-style.css" media="all"/>
- <title> Commander RBAC Administration </title>
- <h3> Commander Login Form </h3>
+ <link rel="stylesheet" type="text/css" href="/fortress-web/css/camo-style.css" media="all"/>
+ <title> Fortress Web RBAC Administration </title>
+ <h3> Fortress Web Login Form </h3>
</head>
<body>
<FORM METHOD=POST ACTION="j_security_check">
@@ -50,6 +54,6 @@
</table>
</fieldset>
</form>
-Copyright (c) 1998-2014, The OpenLDAP Foundation. All Rights Reserved.
+Copyright (c) 2003-2014, The Apache Software Foundation. All Rights Reserved.
</body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/547b9ccd/src/main/webapp/login/pagenotfound.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/login/pagenotfound.html b/src/main/webapp/login/pagenotfound.html
index 1033601..8f0b632 100644
--- a/src/main/webapp/login/pagenotfound.html
+++ b/src/main/webapp/login/pagenotfound.html
@@ -1,28 +1,32 @@
<!--
- ~ This work is part of OpenLDAP Software <http://www.openldap.org/>.
- ~
- ~ Copyright 1998-2014 The OpenLDAP Foundation.
- ~ All rights reserved.
- ~
- ~ Redistribution and use in source and binary forms, with or without
- ~ modification, are permitted only as authorized by the OpenLDAP
- ~ Public License.
- ~
- ~ A copy of this license is available in the file LICENSE in the
- ~ top-level directory of the distribution or, alternatively, at
- ~ <http://www.OpenLDAP.org/license.html>.
- -->
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <link rel="stylesheet" type="text/css" href="/commander/css/camo-style.css" media="all"/>
- <title> Commander RBAC Administration </title>
+ <link rel="stylesheet" type="text/css" href="/fortress-web/css/camo-style.css" media="all"/>
+ <title> Fortress Web RBAC Administration </title>
</head>
<body>
<h3>Page not found</h3>
-<FORM METHOD=POST ACTION="/commander/wicket/bookmarkable/org.openldap.commander.LaunchPage">
+<FORM METHOD=POST ACTION="/fortress-web/wicket/bookmarkable/org.apache.directory.fortress.web.LaunchPage">
<p>
<font size="2">Click the button to return to home page.</font>
<BR><BR>
@@ -30,6 +34,6 @@
</p>
</form>
-Copyright (c) 1998-2014, The OpenLDAP Foundation. All Rights Reserved.
+Copyright (c) 2003-2014, The Apache Software Foundation. All Rights Reserved.
</body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/547b9ccd/src/main/webapp/login/unauthorized.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/login/unauthorized.html b/src/main/webapp/login/unauthorized.html
index b7b1746..5ac332c 100644
--- a/src/main/webapp/login/unauthorized.html
+++ b/src/main/webapp/login/unauthorized.html
@@ -1,28 +1,32 @@
<!--
- ~ This work is part of OpenLDAP Software <http://www.openldap.org/>.
- ~
- ~ Copyright 1998-2014 The OpenLDAP Foundation.
- ~ All rights reserved.
- ~
- ~ Redistribution and use in source and binary forms, with or without
- ~ modification, are permitted only as authorized by the OpenLDAP
- ~ Public License.
- ~
- ~ A copy of this license is available in the file LICENSE in the
- ~ top-level directory of the distribution or, alternatively, at
- ~ <http://www.OpenLDAP.org/license.html>.
- -->
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <link rel="stylesheet" type="text/css" href="/commander/css/camo-style.css" media="all"/>
- <title> Commander RBAC Administration </title>
+ <link rel="stylesheet" type="text/css" href="/fortress-web/css/camo-style.css" media="all"/>
+ <title> Fortress Web RBAC Administration </title>
</head>
<body>
<h3>Unauthorized access attempt detected</h3>
-<FORM METHOD=POST ACTION="/commander/wicket/bookmarkable/org.openldap.commander.LaunchPage">
+<FORM METHOD=POST ACTION="/fortress-web/wicket/bookmarkable/org.apache.directory.fortress.web.LaunchPage">
<p>
<font size="2">Click the button to return to home page.</font>
<BR><BR>
@@ -30,6 +34,6 @@
</p>
</form>
-Copyright (c) 1998-2014, The OpenLDAP Foundation. All Rights Reserved.
+Copyright (c) 2003-2014, The Apache Software Foundation. All Rights Reserved.
</body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/547b9ccd/src/main/webapp/login/unexpected.html
----------------------------------------------------------------------
diff --git a/src/main/webapp/login/unexpected.html b/src/main/webapp/login/unexpected.html
index f76adc7..1cd85bc 100644
--- a/src/main/webapp/login/unexpected.html
+++ b/src/main/webapp/login/unexpected.html
@@ -1,28 +1,32 @@
<!--
- ~ This work is part of OpenLDAP Software <http://www.openldap.org/>.
- ~
- ~ Copyright 1998-2014 The OpenLDAP Foundation.
- ~ All rights reserved.
- ~
- ~ Redistribution and use in source and binary forms, with or without
- ~ modification, are permitted only as authorized by the OpenLDAP
- ~ Public License.
- ~
- ~ A copy of this license is available in the file LICENSE in the
- ~ top-level directory of the distribution or, alternatively, at
- ~ <http://www.OpenLDAP.org/license.html>.
- -->
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
<!DOCTYPE HTML PUBLIC "-//W3C/DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <link rel="stylesheet" type="text/css" href="/commander/css/camo-style.css" media="all"/>
- <title> Commander RBAC Administration </title>
+ <link rel="stylesheet" type="text/css" href="/fortress-web/css/camo-style.css" media="all"/>
+ <title> Fortress Web RBAC Administration </title>
</head>
<body>
<h3>Unexpected error occurred</h3>
-<FORM METHOD=POST ACTION="/commander/wicket/bookmarkable/org.openldap.commander.LaunchPage">
+<FORM METHOD=POST ACTION="/fortress-web/wicket/bookmarkable/org.apache.directory.fortress.web.LaunchPage">
<p>
<font size="2">Click the button to return to home page.</font>
<BR><BR>
@@ -30,6 +34,6 @@
</p>
</form>
-Copyright (c) 1998-2014, The OpenLDAP Foundation. All Rights Reserved.
+Copyright (c) 2003-2014, The Apache Software Foundation. All Rights Reserved.
</body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/547b9ccd/src/test/java/org/apache/directory/fortress/web/StartExamples.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/web/StartExamples.java b/src/test/java/org/apache/directory/fortress/web/StartExamples.java
new file mode 100644
index 0000000..6e31f41
--- /dev/null
+++ b/src/test/java/org/apache/directory/fortress/web/StartExamples.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.directory.fortress.web;
+
+import java.lang.management.ManagementFactory;
+import javax.management.MBeanServer;
+
+import org.eclipse.jetty.jmx.MBeanContainer;
+import org.eclipse.jetty.security.HashLoginService;
+import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.bio.SocketConnector;
+import org.eclipse.jetty.webapp.WebAppContext;
+
+/**
+ * Separate startup class for people that want to run the examples directly. Use parameter
+ * -Dcom.sun.management.jmxremote to startup JMX (and e.g. connect with jconsole).
+ */
+public class StartExamples
+{
+ /**
+ * Used for logging.
+ */
+
+ /**
+ * Main function, starts the jetty server.
+ *
+ * @param args
+ */
+ public static void main(String[] args)
+ {
+ Server server = new Server();
+ SocketConnector connector = new SocketConnector();
+
+ System.setProperty("version", "1.0-RC39");
+
+ // Set some timeout options to make debugging easier.
+ connector.setMaxIdleTime(1000 * 60 * 60);
+ connector.setSoLingerTime(-1);
+ connector.setPort(8081);
+ server.setConnectors(new Connector[] { connector });
+
+ WebAppContext bb = new WebAppContext();
+ bb.setServer(server);
+ //bb.setContextPath("/rbac");
+ bb.setContextPath("/commander");
+ bb.setWar("src/main/webapp");
+
+ // Setup the test security realm, its name must match what's in the web.xml's 'realm-name' tag:
+ HashLoginService dummyLoginService = new HashLoginService(
+ "SentrySecurityRealm");
+ dummyLoginService.setConfig("src/test/resources/jetty-users.properties");
+ bb.getSecurityHandler().setLoginService( dummyLoginService );
+ server.setHandler(bb);
+
+ MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
+ MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
+ server.getContainer().addEventListener(mBeanContainer);
+
+ try
+ {
+ mBeanContainer.start();
+ server.start();
+ server.join();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ System.exit(100);
+ }
+ }
+
+ /**
+ * Construct.
+ */
+ StartExamples()
+ {
+ super();
+ }
+}
http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/547b9ccd/src/test/java/org/apache/directory/fortress/web/integration/FortressWebSeleniumITCase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/web/integration/FortressWebSeleniumITCase.java b/src/test/java/org/apache/directory/fortress/web/integration/FortressWebSeleniumITCase.java
new file mode 100644
index 0000000..9c3c443
--- /dev/null
+++ b/src/test/java/org/apache/directory/fortress/web/integration/FortressWebSeleniumITCase.java
@@ -0,0 +1,837 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.directory.fortress.web.integration;
+
+import java.io.File;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.log4j.Logger;
+import org.junit.*;
+import static org.junit.Assert.*;
+
+import org.openqa.selenium.*;
+import org.openqa.selenium.firefox.FirefoxDriver;
+import org.openqa.selenium.firefox.FirefoxProfile;
+import org.openqa.selenium.remote.LocalFileDetector;
+import org.apache.directory.fortress.web.GlobalIds;
+
+/**
+ * This class uses apache selenium firefox driver to drive commander web ui
+ */
+public class FortressWebSeleniumITCase
+{
+ private WebDriver driver;
+ private String baseUrl;
+ private boolean acceptNextAlert = true;
+ private StringBuffer verificationErrors = new StringBuffer();
+ private static final Logger log = Logger.getLogger( FortressWebSeleniumITCase.class.getName() );
+
+ @Before
+ public void setUp() throws Exception
+ {
+ FirefoxProfile ffProfile = new FirefoxProfile();
+ ffProfile.setPreference( "browser.safebrowsing.malware.enabled", false );
+ driver = new FirefoxDriver( ffProfile );
+ driver.manage().window().maximize();
+
+ // Use test local default:
+ //baseUrl = "http://localhost:8081";
+ //baseUrl = "http://192.168.1.101:8080";
+ //baseUrl = "http://192.168.1.104:8080";
+
+ // tomcat default:
+ baseUrl = "http://localhost:8080";
+ //baseUrl = "http://fortressdemo2.com:8080";
+ // tomcat SSL:
+ //baseUrl = "https://localhost:8443";
+ //baseUrl = "https://fortressdemo2.com:8443";
+ driver.manage().timeouts().implicitlyWait( 5, TimeUnit.SECONDS );
+ }
+
+ @Test
+ public void testCase1() throws Exception
+ {
+ log.info( "Begin FortressWebSeleniumITCase" );
+ driver.get( baseUrl + "/fortress-web" );
+ login();
+ TUtils.sleep( 1 );
+
+ boolean skipFirstHalf = false;
+ //boolean skipFirstHalf = true;
+ boolean skipSecondHalf = false;
+ //boolean skipSecondHalf = true;
+ if ( !skipFirstHalf )
+ {
+ users();
+ roles();
+ pobjs();
+ perms();
+ ssds();
+ dsds();
+ ouusers();
+ ouperms();
+ }
+
+ if ( !skipSecondHalf )
+ {
+ admrles();
+ admobjs();
+ admperms();
+ plcys();
+ //groups();
+ binds();
+ authzs();
+ mods();
+ }
+
+
+ /*****
+ * LOGOUT
+ */
+ driver.findElement( By.linkText( "LOGOUT" ) ).click();
+ log.info( "End FortressWebSeleniumITCase" );
+ //driver.findElement( By.linkText( "glob:search*" ) ).click();
+ }
+
+ private void login()
+ {
+ driver.findElement( By.id( GlobalIds.USER_ID ) ).clear();
+ driver.findElement( By.id( GlobalIds.USER_ID ) ).sendKeys( "test" );
+ driver.findElement( By.id( GlobalIds.PSWD_FIELD ) ).clear();
+ driver.findElement( By.id( GlobalIds.PSWD_FIELD ) ).sendKeys( "password" );
+ driver.findElement( By.name( GlobalIds.LOGIN ) ).click();
+ }
+
+ private void users()
+ {
+ /*****
+ * USERS_PAGE TESTS
+ */
+ driver.findElement( By.linkText( "USERS" ) ).click();
+ //driver.findElement( By.id( "roleRb" ) ).click();
+ driver.findElement( By.id( "roleAssignLinkLbl" ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( ">" ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.name( "userformsearchfields:" + GlobalIds.SEARCH ) ).click();
+ driver.findElement( By.id( GlobalIds.FIELD_1 ) ).clear();
+ driver.findElement( By.id( GlobalIds.FIELD_1 ) ).sendKeys( "dev1" );
+ driver.findElement( By.id( "ouAssignLinkLbl" ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.name( "userformsearchfields:" + GlobalIds.SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ WebElement table = driver.findElement(By.id("usertreegrid"));
+ List<WebElement> allRows = table.findElements(By.tagName("tr"));
+ allRows.get( 4 ).findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 1 );
+ allRows.get( 5 ).findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 1 );
+ allRows.get( 6 ).findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.name( GlobalIds.CLEAR ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.id( GlobalIds.USER_ID ) ).sendKeys( "selTestU1" );
+ driver.findElement( By.id( GlobalIds.PSWD_FIELD ) ).clear();
+ driver.findElement( By.id( GlobalIds.PSWD_FIELD ) ).sendKeys( "password" );
+ driver.findElement( By.id( GlobalIds.OU ) ).clear();
+ driver.findElement( By.id( GlobalIds.OU ) ).sendKeys( "dev1" );
+ driver.findElement( By.name( GlobalIds.OU_SEARCH ) ).click();
+ TUtils.sleep( 2 );
+ driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.name( GlobalIds.POLICY_SEARCH ) ).click();
+ TUtils.sleep( 2 );
+ driver.findElement( By.linkText( ">" ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.name( GlobalIds.ADD ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.id( GlobalIds.ROLE_ASSIGNMENTS_LABEL ) ).click();
+ ( ( JavascriptExecutor ) driver ).executeScript( "$(document.getElementById('roles')).val('role1');" );
+ driver.findElement( By.id( GlobalIds.BEGIN_TIME_RC ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_TIME_RC ) ).sendKeys( "8:00 AM" );
+ driver.findElement( By.id( GlobalIds.END_TIME_RC ) ).clear();
+ driver.findElement( By.id( GlobalIds.END_TIME_RC ) ).sendKeys( "5:00 PM" );
+ driver.findElement( By.id( GlobalIds.BEGIN_DATE_RC ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_DATE_RC ) ).sendKeys( "1/1/2013" );
+ driver.findElement( By.id( GlobalIds.END_DATE_RC ) ).clear();
+ driver.findElement( By.id( GlobalIds.END_DATE_RC ) ).sendKeys( "1/1/2099" );
+ driver.findElement( By.id( GlobalIds.BEGIN_LOCK_DATE_RC ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_LOCK_DATE_RC ) ).sendKeys( "6/1/2013" );
+ driver.findElement( By.id( GlobalIds.END_LOCK_DATE_RC ) ).clear();
+ driver.findElement( By.id( GlobalIds.END_LOCK_DATE_RC ) ).sendKeys( "6/15/2013" );
+ driver.findElement( By.id( GlobalIds.TIMEOUT_RC ) ).clear();
+ driver.findElement( By.id( GlobalIds.TIMEOUT_RC ) ).sendKeys( "120" );
+ driver.findElement( By.id( GlobalIds.SUNDAY_RC ) ).click();
+ driver.findElement( By.id( GlobalIds.MONDAY_RC ) ).click();
+ driver.findElement( By.id( GlobalIds.TUESDAY_RC ) ).click();
+ driver.findElement( By.id( GlobalIds.WEDNESDAY_RC ) ).click();
+ driver.findElement( By.id( GlobalIds.THURSDAY_RC ) ).click();
+ driver.findElement( By.id( GlobalIds.FRIDAY_RC ) ).click();
+ driver.findElement( By.id( GlobalIds.SATURDAY_RC ) ).click();
+ driver.findElement( By.name( GlobalIds.ASSIGN ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.id( GlobalIds.ROLE_ASSIGNMENTS_LABEL ) ).click();
+ driver.findElement( By.name( GlobalIds.ROLES_SEARCH ) ).click();
+ TUtils.sleep( 2 );
+ driver.findElement( By.linkText( "6" ) ).click();
+ TUtils.sleep( 2 );
+ driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
+ TUtils.sleep( 2 );
+ driver.findElement( By.name( GlobalIds.ASSIGN ) ).click();
+ TUtils.sleep( 2 );
+ driver.findElement( By.id( "adminRoleAssignmentsLabel" ) ).click();
+ /*
+ if(driver.findElement( By.name( "adminRoles" ) ).isDisplayed())
+ {
+ System.out.println("adminRoles is displayed!!!");
+ }
+ else
+ {
+ System.out.println("adminRoles is NOT displayed!!!");
+ }
+ */
+ ( ( JavascriptExecutor ) driver ).executeScript( "$(document.getElementById('adminRoles')).val" +
+ "('DemoAdminUsers');" );
+ driver.findElement( By.id( GlobalIds.BEGIN_TIME_ARC ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_TIME_ARC ) ).sendKeys( "8:00 AM" );
+ driver.findElement( By.id( GlobalIds.END_TIME_ARC ) ).clear();
+ driver.findElement( By.id( GlobalIds.END_TIME_ARC ) ).sendKeys( "5:00 PM" );
+ driver.findElement( By.id( GlobalIds.BEGIN_DATE_ARC ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_DATE_ARC ) ).sendKeys( "1/1/2013" );
+ driver.findElement( By.id( GlobalIds.END_DATE_ARC ) ).clear();
+ driver.findElement( By.id( GlobalIds.END_DATE_ARC ) ).sendKeys( "1/1/2099" );
+ driver.findElement( By.id( GlobalIds.BEGIN_LOCK_DATE_ARC ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_LOCK_DATE_ARC ) ).sendKeys( "6/1/2013" );
+ driver.findElement( By.id( GlobalIds.END_LOCK_DATE_ARC ) ).clear();
+ driver.findElement( By.id( GlobalIds.END_LOCK_DATE_ARC ) ).sendKeys( "6/15/2013" );
+ driver.findElement( By.id( GlobalIds.TIMEOUT_ARC ) ).clear();
+ driver.findElement( By.id( GlobalIds.TIMEOUT_ARC ) ).sendKeys( "180" );
+ driver.findElement( By.id( GlobalIds.MONDAY_ARC ) ).click();
+ driver.findElement( By.id( GlobalIds.TUESDAY_ARC ) ).click();
+ driver.findElement( By.id( GlobalIds.WEDNESDAY_ARC ) ).click();
+ driver.findElement( By.id( GlobalIds.THURSDAY_ARC ) ).click();
+ driver.findElement( By.id( GlobalIds.FRIDAY_ARC ) ).click();
+ driver.findElement( By.name( GlobalIds.ASSIGN_ADMIN_ROLE ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.id( "adminRoleAssignmentsLabel" ) ).click();
+ driver.findElement( By.name( "adminRoles.search" ) ).click();
+ TUtils.sleep( 2 );
+ driver.findElement( By.linkText( ">" ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( ">" ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
+ TUtils.sleep( 2 );
+ driver.findElement( By.name( GlobalIds.ASSIGN_ADMIN_ROLE ) ).click();
+ TUtils.sleep( 2 );
+ driver.findElement( By.id( "contactInformationLabel" ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.id( GlobalIds.DESCRIPTION ) ).clear();
+ driver.findElement( By.id( GlobalIds.DESCRIPTION ) ).sendKeys( "Selenium Test User" );
+ driver.findElement( By.id( GlobalIds.EMPLOYEE_TYPE ) ).clear();
+ driver.findElement( By.id( GlobalIds.EMPLOYEE_TYPE ) ).sendKeys( "Test User" );
+ driver.findElement( By.id( GlobalIds.TITLE ) ).clear();
+ driver.findElement( By.id( GlobalIds.TITLE ) ).sendKeys( "TestUser" );
+ ( ( JavascriptExecutor ) driver ).executeScript( "$(document.getElementById('emails')).show();" );
+ driver.findElement( By.id( GlobalIds.EMAILS ) ).clear();
+ driver.findElement( By.id( GlobalIds.EMAILS ) ).sendKeys( "joeuser@selenium.com" );
+ ( ( JavascriptExecutor ) driver ).executeScript( "$(document.getElementById('phones')).show();" );
+ driver.findElement( By.id( GlobalIds.PHONES ) ).clear();
+ driver.findElement( By.id( GlobalIds.PHONES ) ).sendKeys( "555-555-5555" );
+ ( ( JavascriptExecutor ) driver ).executeScript( "$(document.getElementById('mobiles')).show();" );
+ driver.findElement( By.id( GlobalIds.MOBILES ) ).clear();
+ driver.findElement( By.id( GlobalIds.MOBILES ) ).sendKeys( "222-222-2222" );
+ driver.findElement( By.id( GlobalIds.ADDRESS_ASSIGNMENTS_LABEL ) ).click();
+ TUtils.sleep( 1 );
+ ( ( JavascriptExecutor ) driver ).executeScript( "$(document.getElementById('addresses')).show();" );
+ driver.findElement( By.id( GlobalIds.ADDRESSES ) ).clear();
+ driver.findElement( By.id( GlobalIds.ADDRESSES ) ).sendKeys( "9 Vantage Pt" );
+ driver.findElement( By.id( GlobalIds.ADDRESS_CITY ) ).clear();
+ driver.findElement( By.id( GlobalIds.ADDRESS_CITY ) ).sendKeys( "Maumelle" );
+ driver.findElement( By.id( GlobalIds.ADDRESS_STATE ) ).clear();
+ driver.findElement( By.id( GlobalIds.ADDRESS_STATE ) ).sendKeys( "AR" );
+ driver.findElement( By.id( GlobalIds.ADDRESS_COUNTRY ) ).clear();
+ driver.findElement( By.id( GlobalIds.ADDRESS_COUNTRY ) ).sendKeys( "US" );
+ driver.findElement( By.id( GlobalIds.ADDRESS_POSTAL_CODE ) ).clear();
+ driver.findElement( By.id( GlobalIds.ADDRESS_POSTAL_CODE ) ).sendKeys( "72113" );
+ driver.findElement( By.id( GlobalIds.ADDRESS_POST_OFFICE_BOX ) ).clear();
+ driver.findElement( By.id( GlobalIds.ADDRESS_POST_OFFICE_BOX ) ).sendKeys( "422" );
+ driver.findElement( By.id( GlobalIds.ADDRESS_BUILDING ) ).clear();
+ driver.findElement( By.id( GlobalIds.ADDRESS_BUILDING ) ).sendKeys( "2929" );
+ driver.findElement( By.id( GlobalIds.ADDRESS_DEPARTMENT_NUMBER ) ).clear();
+ driver.findElement( By.id( GlobalIds.ADDRESS_DEPARTMENT_NUMBER ) ).sendKeys( "2222" );
+ driver.findElement( By.id( GlobalIds.ADDRESS_ROOM_NUMBER ) ).clear();
+ driver.findElement( By.id( GlobalIds.ADDRESS_ROOM_NUMBER ) ).sendKeys( "555" );
+ driver.findElement( By.id( GlobalIds.TEMPORAL_CONSTRAINTS_LABEL ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.id( GlobalIds.BEGIN_TIME_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_TIME_P ) ).sendKeys( "8:00 AM" );
+ driver.findElement( By.id( GlobalIds.END_TIME_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.END_TIME_P ) ).sendKeys( "5:00 PM" );
+ driver.findElement( By.id( GlobalIds.BEGIN_DATE_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_DATE_P ) ).sendKeys( "1/1/2013" );
+ driver.findElement( By.id( GlobalIds.END_DATE_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.END_DATE_P ) ).sendKeys( "1/1/2099" );
+ driver.findElement( By.id( GlobalIds.BEGIN_LOCK_DATE_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_LOCK_DATE_P ) ).sendKeys( "6/1/2013" );
+ driver.findElement( By.id( GlobalIds.END_LOCK_DATE_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.END_LOCK_DATE_P ) ).sendKeys( "6/15/2013" );
+ driver.findElement( By.id( GlobalIds.TIMEOUT_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.TIMEOUT_P ) ).sendKeys( "0" );
+ driver.findElement( By.id( GlobalIds.SUNDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.MONDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.TUESDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.WEDNESDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.THURSDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.FRIDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.SATURDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.SYSTEM_INFO_LABEL ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.id( GlobalIds.SYSTEM ) ).click();
+ driver.findElement( By.id( GlobalIds.CN ) ).clear();
+ driver.findElement( By.id( GlobalIds.CN ) ).sendKeys( "Firstname Lastname" );
+ driver.findElement( By.id( GlobalIds.SN ) ).clear();
+ driver.findElement( By.id( GlobalIds.SN ) ).sendKeys( "Lastname" );
+ driver.findElement( By.id( GlobalIds.IMPORT_PHOTO_LABEL ) ).click();
+ TUtils.sleep( 1 );
+ WebElement element = driver.findElement( By.name( "upload" ) );
+ LocalFileDetector detector = new LocalFileDetector();
+ String path = "./src/test/resources/p1.jpeg";
+ File f = detector.getLocalFile( path );
+ element.sendKeys( f.getAbsolutePath() );
+ driver.findElement( By.name( GlobalIds.SAVE ) ).click();
+ TUtils.sleep( 3 );
+ driver.findElement( By.name( GlobalIds.COMMIT ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.id( GlobalIds.IMPORT_PHOTO_LABEL ) ).click();
+ TUtils.sleep( 2 );
+ driver.findElement( By.name( GlobalIds.DELETE ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.id( GlobalIds.SYSTEM_INFO_LABEL ) ).click();
+ driver.findElement( By.id( GlobalIds.SYSTEM ) ).click();
+ driver.findElement( By.name( GlobalIds.COMMIT ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.name( GlobalIds.DELETE ) ).click();
+ TUtils.sleep( 1 );
+ }
+
+ private void roles()
+ {
+ driver.findElement( By.linkText( "ROLES" ) ).click();
+ driver.findElement( By.id( GlobalIds.SEARCH_VAL ) ).clear();
+ driver.findElement( By.id( GlobalIds.SEARCH_VAL ) ).sendKeys( "oamt13" );
+ driver.findElement( By.name( GlobalIds.SEARCH ) ).click();
+ driver.findElement( By.id( GlobalIds.NAME ) ).clear();
+ driver.findElement( By.id( GlobalIds.NAME ) ).sendKeys( "SelTestRole" );
+ driver.findElement( By.id( GlobalIds.DESCRIPTION ) ).clear();
+ driver.findElement( By.id( GlobalIds.DESCRIPTION ) ).sendKeys( "Selenium Test Role" );
+ driver.findElement( By.name( GlobalIds.PARENTROLES_SEARCH ) ).click();
+ TUtils.sleep( 2 );
+ driver.findElement( By.linkText( ">" ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( ">" ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
+ TUtils.sleep( 2 );
+ driver.findElement( By.name( GlobalIds.ADD ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.id( GlobalIds.TEMPORAL_CONSTRAINTS_LABEL ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.id( GlobalIds.BEGIN_TIME_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_TIME_P ) ).sendKeys( "8:00 AM" );
+ driver.findElement( By.id( GlobalIds.END_TIME_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.END_TIME_P ) ).sendKeys( "5:00 PM" );
+ driver.findElement( By.id( GlobalIds.BEGIN_DATE_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_DATE_P ) ).sendKeys( "1/1/2013" );
+ driver.findElement( By.id( GlobalIds.END_DATE_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.END_DATE_P ) ).sendKeys( "1/1/2099" );
+ driver.findElement( By.id( GlobalIds.BEGIN_LOCK_DATE_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_LOCK_DATE_P ) ).sendKeys( "6/1/2013" );
+ driver.findElement( By.id( GlobalIds.END_LOCK_DATE_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.END_LOCK_DATE_P ) ).sendKeys( "6/15/2013" );
+ driver.findElement( By.id( GlobalIds.TIMEOUT_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.TIMEOUT_P ) ).sendKeys( "0" );
+ driver.findElement( By.id( GlobalIds.SUNDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.MONDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.TUESDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.WEDNESDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.THURSDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.FRIDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.SATURDAY_P ) ).click();
+ driver.findElement( By.name( GlobalIds.COMMIT ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.name( GlobalIds.DELETE ) ).click();
+ TUtils.sleep( 1 );
+ }
+
+ private void pobjs()
+ {
+ driver.findElement( By.linkText( "POBJS" ) ).click();
+ driver.findElement( By.id( GlobalIds.SEARCH_VAL ) ).sendKeys( "t" );
+ driver.findElement( By.name( GlobalIds.SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ }
+
+ private void perms()
+ {
+ driver.findElement( By.linkText( "PERMS" ) ).click();
+ driver.findElement( By.id( "permObject" ) ).sendKeys( "/cal" );
+ driver.findElement( By.name( GlobalIds.SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ }
+
+ private void ssds()
+ {
+ driver.findElement( By.linkText( "SSDS" ) ).click();
+ driver.findElement( By.id( "roleRb" ) ).click();
+ driver.findElement( By.id( GlobalIds.SEARCH_VAL ) ).sendKeys( "oamT16SDR6" );
+ driver.findElement( By.name( GlobalIds.SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ }
+
+ private void dsds()
+ {
+ driver.findElement( By.linkText( "DSDS" ) ).click();
+ driver.findElement( By.id( "roleRb" ) ).click();
+ driver.findElement( By.id( GlobalIds.SEARCH_VAL ) ).sendKeys( "oamT13DSD6" );
+ driver.findElement( By.name( GlobalIds.SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ }
+
+ private void ouusers()
+ {
+ driver.findElement( By.linkText( "OUSERS" ) ).click();
+ driver.findElement( By.id( GlobalIds.SEARCH_VAL ) ).sendKeys( "d" );
+ driver.findElement( By.name( GlobalIds.SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ }
+
+ private void ouperms()
+ {
+ driver.findElement( By.linkText( "OUPRMS" ) ).click();
+ driver.findElement( By.id( GlobalIds.SEARCH_VAL ) ).sendKeys( "a" );
+ driver.findElement( By.name( GlobalIds.SEARCH ) ).click();
+ }
+
+ private void admrles()
+ {
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( "ADMRLES" ) ).click();
+ driver.findElement( By.id( GlobalIds.SEARCH_VAL ) ).clear();
+ driver.findElement( By.id( GlobalIds.SEARCH_VAL ) ).sendKeys( "t" );
+ driver.findElement( By.name( GlobalIds.SEARCH ) ).click();
+ driver.findElement( By.id( GlobalIds.NAME ) ).clear();
+ driver.findElement( By.id( GlobalIds.NAME ) ).sendKeys( "SelTestAdminRole" );
+ driver.findElement( By.id( GlobalIds.DESCRIPTION ) ).clear();
+ driver.findElement( By.id( GlobalIds.DESCRIPTION ) ).sendKeys( "Selenium Test Admin Role" );
+ driver.findElement( By.name( GlobalIds.PARENTROLES_SEARCH ) ).click();
+ TUtils.sleep( 2 );
+ driver.findElement( By.linkText( ">" ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( ">" ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
+ TUtils.sleep( 2 );
+ // DELEGATION DETAILS:
+ driver.findElement( By.name( GlobalIds.ROLEAUXPANEL + ":" + GlobalIds.USEROU_SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
+ driver.findElement( By.name( GlobalIds.ROLEAUXPANEL + ":" + GlobalIds.PERMOU_SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
+ driver.findElement( By.id( GlobalIds.BEGIN_RANGE ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_RANGE ) ).sendKeys( "oamT6D" );
+ driver.findElement( By.name( GlobalIds.ROLEAUXPANEL + ":" + GlobalIds.BEGIN_RANGE_SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
+ driver.findElement( By.name( GlobalIds.ROLEAUXPANEL + ":" + GlobalIds.BEGIN_INCLUSIVE ) ).click();
+ driver.findElement( By.name( GlobalIds.ROLEAUXPANEL + ":" + GlobalIds.END_RANGE_SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
+ driver.findElement( By.name( GlobalIds.ROLEAUXPANEL + ":" + GlobalIds.END_INCLUSIVE ) ).click();
+ driver.findElement( By.name( GlobalIds.ADD ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.id( GlobalIds.TEMPORAL_CONSTRAINTS_LABEL ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.id( GlobalIds.BEGIN_TIME_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_TIME_P ) ).sendKeys( "8:00 AM" );
+ driver.findElement( By.id( GlobalIds.END_TIME_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.END_TIME_P ) ).sendKeys( "5:00 PM" );
+ driver.findElement( By.id( GlobalIds.BEGIN_DATE_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_DATE_P ) ).sendKeys( "1/1/2013" );
+ driver.findElement( By.id( GlobalIds.END_DATE_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.END_DATE_P ) ).sendKeys( "1/1/2099" );
+ driver.findElement( By.id( GlobalIds.BEGIN_LOCK_DATE_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.BEGIN_LOCK_DATE_P ) ).sendKeys( "6/1/2013" );
+ driver.findElement( By.id( GlobalIds.END_LOCK_DATE_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.END_LOCK_DATE_P ) ).sendKeys( "6/15/2013" );
+ driver.findElement( By.id( GlobalIds.TIMEOUT_P ) ).clear();
+ driver.findElement( By.id( GlobalIds.TIMEOUT_P ) ).sendKeys( "0" );
+ driver.findElement( By.id( GlobalIds.SUNDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.MONDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.TUESDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.WEDNESDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.THURSDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.FRIDAY_P ) ).click();
+ driver.findElement( By.id( GlobalIds.SATURDAY_P ) ).click();
+ driver.findElement( By.name( GlobalIds.COMMIT ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.name( GlobalIds.DELETE ) ).click();
+ TUtils.sleep( 1 );
+ }
+
+ private void admobjs()
+ {
+ driver.findElement( By.linkText( "ADMOBJS" ) ).click();
+ driver.findElement( By.id( GlobalIds.SEARCH_VAL ) ).sendKeys( "u" );
+ driver.findElement( By.name( GlobalIds.SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ }
+
+ private void admperms()
+ {
+ driver.findElement( By.linkText( "ADMPERMS" ) ).click();
+ driver.findElement( By.id( "objectAssignLinkLbl" ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
+ driver.findElement( By.name( GlobalIds.SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ }
+
+ private void plcys()
+ {
+ driver.findElement( By.linkText( "PLCYS" ) ).click();
+ driver.findElement( By.id( GlobalIds.SEARCH_VAL ) ).sendKeys( "oamtp1policy" );
+ driver.findElement( By.name( GlobalIds.SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ }
+
+ private void groups()
+ {
+ driver.findElement( By.linkText( "GROUPS" ) ).click();
+ driver.findElement( By.id( "searchVal" ) ).sendKeys( "t" );
+ driver.findElement( By.name( GlobalIds.SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ TUtils.sleep( 1 );
+ WebElement table = driver.findElement(By.id("grouptreegrid"));
+ List<WebElement> allRows = table.findElements(By.tagName("tr"));
+ allRows.get( 4 ).findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 1 );
+ allRows.get( 5 ).findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 1 );
+ allRows.get( 6 ).findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.name( GlobalIds.CLEAR ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.id( GlobalIds.NAME ) ).sendKeys( "selGroup1" );
+ driver.findElement( By.id( GlobalIds.DESCRIPTION ) ).clear();
+ driver.findElement( By.id( GlobalIds.DESCRIPTION ) ).sendKeys( "Selenium Test Create Group Node" );
+ driver.findElement( By.id( "protocol" ) ).clear();
+ driver.findElement( By.id( "protocol" ) ).sendKeys( "test" );
+ driver.findElement( By.id( "memberProps" ) ).clear();
+ driver.findElement( By.id( "memberProps" ) ).sendKeys( "testKey1=testVal1" );
+
+ driver.findElement( By.name( "members.search" ) ).click();
+ TUtils.sleep( 2 );
+ driver.findElement( By.linkText( ">" ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
+ TUtils.sleep( 1 );
+ driver.findElement( By.name( GlobalIds.ADD ) ).click();
+ TUtils.sleep( 1 );
+ }
+
+ private void binds()
+ {
+ driver.findElement( By.linkText( "BINDS" ) ).click();
+ driver.findElement( By.id( GlobalIds.USER_ID ) ).clear();
+ driver.findElement( By.id( GlobalIds.USER_ID ) ).sendKeys( "jtsuser1" );
+ driver.findElement( By.name( GlobalIds.SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ WebElement table = driver.findElement(By.id("bindtreegrid"));
+ // Now get all the TR elements from the table
+ List<WebElement> allRows = table.findElements(By.tagName("tr"));
+ // And iterate over them, getting the cells
+ allRows.get( 4 ).findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 1 );
+ allRows.get( 5 ).findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 1 );
+ allRows.get( 6 ).findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 1 );
+ }
+
+ private void authzs()
+ {
+ driver.findElement( By.linkText( "AUTHZ" ) ).click();
+ driver.findElement( By.id( GlobalIds.OBJ_NAME ) ).clear();
+ driver.findElement( By.id( GlobalIds.OBJ_NAME ) ).sendKeys( "org.apache.directory.fortress.core.rbac.AdminMgrImpl" );
+ driver.findElement( By.name( "admin" ) ).click();
+ driver.findElement( By.id( "permLinkLbl" ) ).click();
+ TUtils.sleep( 1 );
+ //driver.findElement( By.linkText( "6" ) ).click();
+ driver.findElement( By.linkText( GlobalIds.SELECT ) ).click();
+ driver.findElement( By.name( GlobalIds.SEARCH ) ).click();
+ TUtils.sleep( 1 );
+ WebElement table = driver.findElement(By.id("authztreegrid"));
+ // Now get all the TR elements from the table
+ List<WebElement> allRows = table.findElements(By.tagName("tr"));
+ // And iterate over them, getting the cells
+ allRows.get( 4 ).findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 1 );
+ allRows.get( 5 ).findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 1 );
+ allRows.get( 6 ).findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 1 );
+ }
+
+ private void mods()
+ {
+ driver.findElement( By.linkText( "MODS" ) ).click();
+ driver.findElement( By.id( GlobalIds.USER_ID ) ).clear();
+ driver.findElement( By.id( GlobalIds.USER_ID ) ).sendKeys( "test" );
+ driver.findElement( By.name( GlobalIds.SEARCH ) ).click();
+ TUtils.sleep( 5 );
+ WebElement table = driver.findElement(By.id("modtreegrid"));
+ // Now get all the TR elements from the table
+ List<WebElement> allRows = table.findElements(By.tagName("tr"));
+ // And iterate over them, getting the cells
+ allRows.get( 5 ).findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 1 );
+ nextPage(table, "modstable");
+ TUtils.sleep( 1 );
+ allRows.get( 6 ).findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 1 );
+ nextPage(table, "modstable");
+ TUtils.sleep( 1 );
+ }
+
+ private void nextPage(WebElement table, String szTableName)
+ {
+ table = driver.findElement(By.id( szTableName));
+ List<WebElement> allRows = table.findElements(By.tagName("a"));
+ for (WebElement row : allRows)
+ {
+ String szText = row.getText();
+ if(szText.equals( "Go to the next page" ))
+ row.click();
+ log.debug( "row text=" + row.getText());
+ }
+ }
+
+ @After
+ public void tearDown() throws Exception
+ {
+ driver.quit();
+ String verificationErrorString = verificationErrors.toString();
+ if ( !"".equals( verificationErrorString ) )
+ {
+ fail( verificationErrorString );
+ }
+ }
+
+ private boolean isElementPresent( By by )
+ {
+ try
+ {
+ driver.findElement( by );
+ return true;
+ }
+ catch ( NoSuchElementException e )
+ {
+ return false;
+ }
+ }
+
+ private boolean isAlertPresent()
+ {
+ try
+ {
+ driver.switchTo().alert();
+ return true;
+ }
+ catch ( NoAlertPresentException e )
+ {
+ return false;
+ }
+ }
+
+ private String closeAlertAndGetItsText()
+ {
+ try
+ {
+ Alert alert = driver.switchTo().alert();
+ String alertText = alert.getText();
+ if ( acceptNextAlert )
+ {
+ alert.accept();
+ }
+ else
+ {
+ alert.dismiss();
+ }
+ return alertText;
+ }
+ finally
+ {
+ acceptNextAlert = true;
+ }
+ }
+
+ // Warning: verifyTextPresent may require manual changes
+ /*
+ try
+ {
+ assertTrue(driver.findElement(By.cssSelector("BODY")).getText().matches("^[\\s\\S]*Commander Web
+ Admin[\\s\\S]*$"));
+ }
+ catch ( Error e )
+ {
+ verificationErrors.append( e.toString() );
+ }
+ */
+ // Warning: verifyTextPresent may require manual changes
+ /*
+ try
+ {
+ assertTrue(driver.findElement(By.cssSelector("BODY")).getText().matches
+ ("^[\\s\\S]*UserAdministration[\\s\\S]*$"));
+ }
+ catch ( Error e )
+ {
+ verificationErrors.append( e.toString() );
+ }
+ // Warning: verifyTextPresent may require manual changes
+ try
+ {
+ assertTrue( driver.findElement( By.cssSelector( "BODY" ) ).getText().matches(
+ "^[\\s\\S]*jtsTU16User7[\\s\\S]*$" ) );
+ }
+ catch ( Error e )
+ {
+ verificationErrors.append( e.toString() );
+ }
+ */
+/*
+ table = driver.findElement(By.id( "modstable"));
+ allRows = table.findElements(By.tagName("a"));
+ for (WebElement row : allRows)
+ {
+ String szText = row.getText();
+ if(szText.equals( "Go to the next page" ))
+ row.click();
+ log.info( "row text=" + row.getText());
+ }
+ TUtils.sleep( 1 );
+*/
+ //table = driver.findElement(By.className( "k-link"));
+ //driver.findElement( By.className( "k-link" ) ).click();
+ //driver.findElement( By.className( "k-icon k-i-arrow-e" ) ).click();
+ //a.k-link:nth-child(4) > span:nth-child(1)
+ //TUtils.sleep( 1 );
+ //driver.findElement( By.className( "k-link" ) ).click();
+ //TUtils.sleep( 1 );
+ //driver.findElement( By.className( "k-link" ) ).click();
+ //TUtils.sleep( 1 );
+/*
+ allRows.get( 6 ).findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 1 );
+ allRows.get( 7 ).findElement(By.className("imxt-cell")).click();
+*/
+ /*
+ for(WebElement row : allRows)
+ {
+ if(rowctr++ < 5)
+ continue;
+
+ row.findElement(By.className("imxt-cell")).click();
+ TUtils.sleep( 3 );
+ //driver.findElement(By.className("imxt-cell")).click();
+ }
+ */
+ /*
+ for (WebElement row : allRows)
+ {
+ rowctr++;
+ //List<WebElement> cells = row.findElements(By.tagName("td"));
+
+ if(rowctr < 5)
+ continue;
+
+ List<WebElement> cells = row.findElements(By.className("imxt-cell"));
+ driver.findElement(By.className("imxt-cell")).click();
+ */
+ //List<WebElement> cells = row.findElements(By.className("imxt-cell"));
+
+ //List<WebElement> cells = row.findElements(By.className("imxt-a-imxt-nowrap"));
+ //*[@id="body35_1"]/td[1]/div
+ /*
+ int cellctr = 0;
+ for (WebElement cell : cells)
+ {
+ cellctr++;
+ //log.info( "Cell[" + rowctr + "][" + cellctr + "]: " + cell.toString() );
+ //log.info( "cell tagname: " + cell.getTagName());
+ //String td = cell.getAttribute( "td" );
+ String td = cell.getText();
+ //String innerText = driver.findElement(By.xpath(".//div")).getText();
+ //String innerText = driver.findElement(By.className("imxt-cell")).getText();
+ log.info( "intext[" + rowctr + "][" + cellctr + "] td value:" + td);
+
+ //List<WebElement> cells2 = cell.findElements(By.className("imxt-cell"));
+ // "imxt-cell"
+ ///*/
+ /*[@id="body35_1"]/td[1]
+ }
+ */
+ //List<WebElement> cells = row.findElements(By.xpath(".//*[@id=\"*\"]/td[2]/div"));
+ //List<WebElement> cells = row.findElements(By.xpath("//table/tbody/tr[" + rowctr + "/td[1]"));
+ //String innerText = driver.findElement(By.xpath("//table/tbody/tr[" + rowctr + "]/td[1]")).getText();
+ //List<WebElement> cells = row.findElements(By.xpath(".//td[1]"));
+ //log.info( "intext[" + rowctr + ":" + innerText);
+
+ ////*[@id="body35_9"]
+ //<div class="imxt-a imxt-nowrap">demoUser10</div>
+ /*
+ int cellctr = 0;
+ for (WebElement cell : cells)
+ {
+ cellctr++;
+ log.info( "Cell[" + rowctr + "][" + cellctr + "]: " + cell.toString() );
+ log.info( "cell tagname: " + cell.getTagName());
+ }
+ */
+ // }
+
+ //List<WebElement> cells = row.findElements(By.xpath(".//*[local-name(.)='th' or local-name(.)='td']"));
+ //TUtils.sleep( 1 );
+ //( ( JavascriptExecutor ) driver ).executeScript( "document.getElementById('usertreegrid').focus();" );
+ /*
+ ( ( JavascriptExecutor ) driver ).executeScript( "$(document.getElementById('adminRoles')).val" +
+ "('DemoAdminUsers');" );
+ */
+}
http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/547b9ccd/src/test/java/org/apache/directory/fortress/web/integration/TUtils.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/directory/fortress/web/integration/TUtils.java b/src/test/java/org/apache/directory/fortress/web/integration/TUtils.java
new file mode 100644
index 0000000..2225738
--- /dev/null
+++ b/src/test/java/org/apache/directory/fortress/web/integration/TUtils.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.directory.fortress.web.integration;
+
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+import org.apache.commons.io.FileUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Description of the Class
+ *
+ * @author Shawn McKinney
+ */
+public class TUtils extends TestCase
+{
+ private static final String CLS_NM = TUtils.class.getName();
+ private static final Logger LOG = LoggerFactory.getLogger( CLS_NM );
+
+ /**
+ * Fortress stores complex attribute types within a single attribute in ldap. Usually a delimiter of ',' is used for string tokenization.
+ * format: {@code name:value}
+ */
+ public static final String DELIMITER_TEST_DATA = ",";
+
+ public static byte[] readJpegFile( String fileName )
+ {
+ URL fUrl = TUtils.class.getClassLoader().getResource( fileName );
+ byte[] image = null;
+ try
+ {
+ if ( fUrl != null )
+ {
+ image = FileUtils.readFileToByteArray( new File( fUrl.toURI() ) );
+ }
+ }
+ catch ( URISyntaxException se )
+ {
+ String error = "readJpegFile caught URISyntaxException=" + se;
+ LOG.error( error );
+ }
+ catch ( IOException ioe )
+ {
+ String error = "readJpegFile caught IOException=" + ioe;
+ LOG.error( error );
+ }
+ return image;
+ }
+
+
+ /**
+ *
+ * @param len
+ */
+ public static void sleep( String len )
+ {
+ try
+ {
+ Integer iSleep = ( Integer.parseInt( len ) * 1000 );
+ Thread.currentThread().sleep( iSleep );
+ }
+ catch ( InterruptedException ie )
+ {
+ LOG.warn( TUtils.class.getName() + ".sleep caught InterruptedException=" + ie.getMessage(), ie );
+ }
+ }
+
+
+ /**
+ *
+ * @param len
+ */
+ public static void sleep( int len )
+ {
+ try
+ {
+ int iSleep = len * 1000;
+ Thread.currentThread().sleep( iSleep );
+ }
+ catch ( InterruptedException ie )
+ {
+ LOG.warn( TUtils.class.getName() + ".sleep caught InterruptedException=" + ie.getMessage(), ie );
+ }
+ }
+
+
+ /**
+ *
+ * @param len
+ */
+ public static void sleep( long len )
+ {
+ try
+ {
+ long iSleep = len * 1000;
+ Thread.currentThread().sleep( iSleep );
+ }
+ catch ( InterruptedException ie )
+ {
+ LOG.warn( TUtils.class.getName() + ".sleep caught InterruptedException=" + ie.getMessage(), ie );
+ }
+ }
+}
\ No newline at end of file