[Registry-dev] svn commit r15777 - in
trunk/registry/modules/webapps/src/main:
java/org/wso2/registry/web java/org/wso2/registry/web/actions
java/org/wso2/registry/web/utils webapp/admin
webapp/admin/ajax webapp/admin/js
svn at wso2.org
svn at wso2.org
Thu Apr 17 22:48:22 PDT 2008
Author: chanaka
Date: Thu Apr 17 22:47:56 2008
New Revision: 15777
Log:
1 - Change the dependencies flow to Associations
2 - Fix the comment adding javascript error
Added:
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/utils/AssociationUtil.java
- copied, changed from r15727, trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/utils/DependenciesUtil.java
trunk/registry/modules/webapps/src/main/webapp/admin/ajax/association-list.jsp
- copied, changed from r15727, trunk/registry/modules/webapps/src/main/webapp/admin/ajax/dependency-list.jsp
Removed:
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/utils/DependenciesUtil.java
trunk/registry/modules/webapps/src/main/webapp/admin/ajax/dependency-list.jsp
Modified:
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/UIConstants.java
trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/ResourceDetailsAction.java
trunk/registry/modules/webapps/src/main/webapp/admin/js/validation.js
trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp
Modified: trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java
==============================================================================
--- trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java (original)
+++ trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/ControllerServlet.java Thu Apr 17 22:47:56 2008
@@ -290,7 +290,7 @@
} else if(command.equals("/addAssociation")) {
try {
- DependenciesUtil.addDependency(request,response);
+ AssociationUtil.addAssociation(request,response);
} catch (Exception e) {
// todo: implement a general AJAX error segment
setErrorMessage(request, e.getMessage());
@@ -298,6 +298,7 @@
}
}
+
else if (command.equals("/removeProperty")) {
PropertiesUtil.removeProperty(request, response);
Modified: trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/UIConstants.java
==============================================================================
--- trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/UIConstants.java (original)
+++ trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/UIConstants.java Thu Apr 17 22:47:56 2008
@@ -31,7 +31,7 @@
public static final String AJAX_RATING_BEAN = "ajaxRating";
public static final String AJAX_DESCRIPTION_STRING = "ajaxDesc";
public static final String AJAX_COMMENTS_LIST = "ajaxComments";
- public static final String AJAX_DEPENDENCIES_LIST = "ajaxDependencies";
+ public static final String AJAX_ASSOCIATIONS_LIST = "ajaxAssociations";
public static final String AJAX_LIFECYCLE_LIST = "ajaxLifecycle";
public static final String RESOURCES_PATH = "resources";
@@ -62,7 +62,7 @@
public static final String AJAX_USER_FRIENDLY_NAME_JSP = "/admin/ajax/user-friendly-name.jsp";
public static final String AJAX_USER_PASSWORD_JSP = "/admin/ajax/user-password-edit.jsp";
public static final String AJAX_COMMENTS_JSP = "/admin/ajax/comment-list.jsp";
- public static final String AJAX_DEPENDENCIES_JSP = "/admin/ajax/dependency-list.jsp";
+ public static final String AJAX_ASSOCIATIONS_JSP = "/admin/ajax/association-list.jsp";
public static final String AJAX_ENTRY_LIST_JSP = "/admin/ajax/entry-list.jsp";
public static final String AJAX_LIFECYCLELIST_JSP = "/admin/ajax/lifecycle_list.jsp";
public static final String RESOURCE_DETAILS_JSP = "/admin/resources_details.jsp";
Modified: trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/ResourceDetailsAction.java
==============================================================================
--- trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/ResourceDetailsAction.java (original)
+++ trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/actions/ResourceDetailsAction.java Thu Apr 17 22:47:56 2008
@@ -39,7 +39,7 @@
* resources. When browsing an older version of a resource, it may be necessary to get the
* path of the current version of that resource. This field contains the path of the
* current (active) version of the resource. If this object contains the details of the
- * current version, path feild and the activeResourcePath field will be identical.
+ * current version, path feild and the activeResourcePath field will be identical.
*/
private String activeResourcePath;
@@ -60,16 +60,17 @@
private Properties properties;
private boolean versionView;
- private String[] dependencies;
+
private List tags = new ArrayList();
private List comments = new ArrayList();
+ private List associations = new ArrayList();
private float averageRating;
private List userPermissions = new ArrayList();
private List rolePermissions = new ArrayList();
private List navigatablePaths = new ArrayList();
- private Map<String,String[]> availableActions = new HashMap<String,String[]>();
+ private Map<String, String[]> availableActions = new HashMap<String, String[]>();
private String parentPath;
@@ -201,7 +202,7 @@
} else {
activeResourcePath = path;
}
-
+
} else {
activeResourcePath = path;
}
@@ -223,11 +224,14 @@
this.mediaType = resource.getMediaType();
this.averageRating = registry.getAverageRating(resource.getPath());
this.properties = resource.getProperties();
-// this.dependencies = resource.getDependencies();
+
+ Association[] asso = registry.getAllAssociations(resource.getPath());
+ associations.addAll(Arrays.asList(asso));
+
List<String> aspects = resource.getAspects();
if (aspects != null) {
for (String aspect : aspects) {
- String [] actions = registry.getAspectActions(path, aspect);
+ String[] actions = registry.getAspectActions(path, aspect);
if (actions == null) continue;
availableActions.put(aspect, actions);
}
@@ -273,7 +277,7 @@
String authorizationPath = path;
if (path.indexOf("?") > 0) {
authorizationPath = path.split("\\?")[0];
- } else if (path.indexOf(";")>0) {
+ } else if (path.indexOf(";") > 0) {
authorizationPath = path.split("\\;")[0];
}
@@ -294,7 +298,7 @@
String[] raUsers = userRealm.getAuthorizer().getAllowedUsersForResource(path, ActionConstants.GET);
for (String raUser : raUsers) {
if (userPermissionMap.containsKey(raUser)) {
- Permission permission = (Permission)userPermissionMap.get(raUser);
+ Permission permission = (Permission) userPermissionMap.get(raUser);
permission.setReadAllow(true);
} else {
Permission permission = new Permission();
@@ -307,7 +311,7 @@
String[] rdUsers = userRealm.getAuthorizer().getDeniedUsersForResource(path, ActionConstants.GET);
for (String rdUser : rdUsers) {
if (userPermissionMap.containsKey(rdUser)) {
- Permission permission = (Permission)userPermissionMap.get(rdUser);
+ Permission permission = (Permission) userPermissionMap.get(rdUser);
permission.setReadDeny(true);
} else {
Permission permission = new Permission();
@@ -320,7 +324,7 @@
String[] waUsers = userRealm.getAuthorizer().getAllowedUsersForResource(path, ActionConstants.PUT);
for (String waUser : waUsers) {
if (userPermissionMap.containsKey(waUser)) {
- Permission permission = (Permission)userPermissionMap.get(waUser);
+ Permission permission = (Permission) userPermissionMap.get(waUser);
permission.setWriteAllow(true);
} else {
Permission permission = new Permission();
@@ -333,7 +337,7 @@
String[] wdUsers = userRealm.getAuthorizer().getDeniedUsersForResource(path, ActionConstants.PUT);
for (String wdUser : wdUsers) {
if (userPermissionMap.containsKey(wdUser)) {
- Permission permission = (Permission)userPermissionMap.get(wdUser);
+ Permission permission = (Permission) userPermissionMap.get(wdUser);
permission.setWriteDeny(true);
} else {
Permission permission = new Permission();
@@ -346,7 +350,7 @@
String[] daUsers = userRealm.getAuthorizer().getAllowedUsersForResource(path, ActionConstants.DELETE);
for (String daUser : daUsers) {
if (userPermissionMap.containsKey(daUser)) {
- Permission permission = (Permission)userPermissionMap.get(daUser);
+ Permission permission = (Permission) userPermissionMap.get(daUser);
permission.setDeleteAllow(true);
} else {
Permission permission = new Permission();
@@ -359,7 +363,7 @@
String[] ddUsers = userRealm.getAuthorizer().getDeniedUsersForResource(path, ActionConstants.DELETE);
for (String ddUser : ddUsers) {
if (userPermissionMap.containsKey(ddUser)) {
- Permission permission = (Permission)userPermissionMap.get(ddUser);
+ Permission permission = (Permission) userPermissionMap.get(ddUser);
permission.setDeleteDeny(true);
} else {
Permission permission = new Permission();
@@ -372,7 +376,7 @@
String[] aaUsers = userRealm.getAuthorizer().getAllowedUsersForResource(path, AccessControlConstants.AUTHORIZE);
for (String aaUser : aaUsers) {
if (userPermissionMap.containsKey(aaUser)) {
- Permission permission = (Permission)userPermissionMap.get(aaUser);
+ Permission permission = (Permission) userPermissionMap.get(aaUser);
permission.setAuthorizeAllow(true);
} else {
Permission permission = new Permission();
@@ -385,7 +389,7 @@
String[] adUsers = userRealm.getAuthorizer().getDeniedUsersForResource(path, AccessControlConstants.AUTHORIZE);
for (String adUser : adUsers) {
if (userPermissionMap.containsKey(adUser)) {
- Permission permission = (Permission)userPermissionMap.get(adUser);
+ Permission permission = (Permission) userPermissionMap.get(adUser);
permission.setAuthorizeDeny(true);
} else {
Permission permission = new Permission();
@@ -402,7 +406,7 @@
String[] raRoles = userRealm.getAuthorizer().getAllowedRolesForResource(path, ActionConstants.GET);
for (String raRole : raRoles) {
if (rolePermissionMap.containsKey(raRole)) {
- Permission permission = (Permission)rolePermissionMap.get(raRole);
+ Permission permission = (Permission) rolePermissionMap.get(raRole);
permission.setReadAllow(true);
} else {
Permission permission = new Permission();
@@ -415,7 +419,7 @@
String[] rdRoles = userRealm.getAuthorizer().getDeniedRolesForResource(path, ActionConstants.GET);
for (String rdRole : rdRoles) {
if (rolePermissionMap.containsKey(rdRole)) {
- Permission permission = (Permission)rolePermissionMap.get(rdRole);
+ Permission permission = (Permission) rolePermissionMap.get(rdRole);
permission.setReadDeny(true);
} else {
Permission permission = new Permission();
@@ -428,7 +432,7 @@
String[] waRoles = userRealm.getAuthorizer().getAllowedRolesForResource(path, ActionConstants.PUT);
for (String waRole : waRoles) {
if (rolePermissionMap.containsKey(waRole)) {
- Permission permission = (Permission)rolePermissionMap.get(waRole);
+ Permission permission = (Permission) rolePermissionMap.get(waRole);
permission.setWriteAllow(true);
} else {
Permission permission = new Permission();
@@ -441,7 +445,7 @@
String[] wdRoles = userRealm.getAuthorizer().getDeniedRolesForResource(path, ActionConstants.PUT);
for (String wdRole : wdRoles) {
if (rolePermissionMap.containsKey(wdRole)) {
- Permission permission = (Permission)rolePermissionMap.get(wdRole);
+ Permission permission = (Permission) rolePermissionMap.get(wdRole);
permission.setWriteDeny(true);
} else {
Permission permission = new Permission();
@@ -454,7 +458,7 @@
String[] daRoles = userRealm.getAuthorizer().getAllowedRolesForResource(path, ActionConstants.DELETE);
for (String daRole : daRoles) {
if (rolePermissionMap.containsKey(daRole)) {
- Permission permission = (Permission)rolePermissionMap.get(daRole);
+ Permission permission = (Permission) rolePermissionMap.get(daRole);
permission.setDeleteAllow(true);
} else {
Permission permission = new Permission();
@@ -467,7 +471,7 @@
String[] ddRoles = userRealm.getAuthorizer().getDeniedRolesForResource(path, ActionConstants.DELETE);
for (String ddRole : ddRoles) {
if (rolePermissionMap.containsKey(ddRole)) {
- Permission permission = (Permission)rolePermissionMap.get(ddRole);
+ Permission permission = (Permission) rolePermissionMap.get(ddRole);
permission.setDeleteDeny(true);
} else {
Permission permission = new Permission();
@@ -480,7 +484,7 @@
String[] aaRoles = userRealm.getAuthorizer().getAllowedRolesForResource(path, AccessControlConstants.AUTHORIZE);
for (String aaRole : aaRoles) {
if (rolePermissionMap.containsKey(aaRole)) {
- Permission permission = (Permission)rolePermissionMap.get(aaRole);
+ Permission permission = (Permission) rolePermissionMap.get(aaRole);
permission.setAuthorizeAllow(true);
} else {
Permission permission = new Permission();
@@ -493,7 +497,7 @@
String[] adRoles = userRealm.getAuthorizer().getDeniedRolesForResource(path, AccessControlConstants.AUTHORIZE);
for (String adRole : adRoles) {
if (rolePermissionMap.containsKey(adRole)) {
- Permission permission = (Permission)rolePermissionMap.get(adRole);
+ Permission permission = (Permission) rolePermissionMap.get(adRole);
permission.setAuthorizeDeny(true);
} else {
Permission permission = new Permission();
@@ -660,13 +664,7 @@
public void setTags(List tags) {
this.tags = tags;
}
- public String[] getDependencies() {
- return dependencies;
- }
- public void setDependencies(String[] dependencies) {
- this.dependencies = dependencies;
- }
public List getComments() {
return comments;
}
@@ -675,6 +673,14 @@
this.comments = comments;
}
+ public List getAssociations() {
+ return associations;
+ }
+
+ public void setAssociations(List associations) {
+ this.associations = associations;
+ }
+
public String getParentPath() {
return parentPath;
}
@@ -735,7 +741,7 @@
this.permalink = permalink;
}
- public Map<String,String[]> getAvailableActions() {
+ public Map<String, String[]> getAvailableActions() {
return availableActions;
}
}
Copied: trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/utils/AssociationUtil.java (from r15727, trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/utils/DependenciesUtil.java)
==============================================================================
--- trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/utils/DependenciesUtil.java (original)
+++ trunk/registry/modules/webapps/src/main/java/org/wso2/registry/web/utils/AssociationUtil.java Thu Apr 17 22:47:56 2008
@@ -20,35 +20,33 @@
* Time: 2:25:17 PM
* To change this template use File | Settings | File Templates.
*/
-public class DependenciesUtil {
- public static void addDependency(HttpServletRequest request, HttpServletResponse response)
+public class AssociationUtil {
+ public static void addAssociation(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
- String dependentPath = request.getParameter("resourcePath");
+ String resourcePath = request.getParameter("resourcePath");
try {
- String dependecyPath = request.getParameter("dependency");
+ String associationType = request.getParameter("type");
+ String associationPaths = request.getParameter("associationPaths");
Registry registry = CommonUtil.getUserRegistry(request);
- //System.out.println("I am here.");
- registry.addAssociation(Association.DEPENDENCY, dependentPath, dependecyPath);
- //System.out.println("I am here2");
- //response.sendRedirect(new StringBuilder().append("/wso2registry/web").append(dependentPath).toString());
-
-// DependencyChain[] deps=registry.getAllAssociation(dependentPath , Association.DEPENDENCY);
-// List depList=new ArrayList();
-// for(DependencyChain dependency:deps){
-// depList.add(dependency.getDependencyPath());
-// }
-//
-// request.getSession().setAttribute(UIConstants.AJAX_DEPENDENCIES_LIST, depList);
+
+ registry.addAssociation(associationType, resourcePath, associationPaths);
+
+ Association[] deps=registry.getAllAssociations(resourcePath);
+ List assoList=new ArrayList();
+ for(Association association:deps){
+ assoList.add(association);
+ }
+
+ request.getSession().setAttribute(UIConstants.AJAX_ASSOCIATIONS_LIST, assoList);
+ request.getRequestDispatcher(UIConstants.AJAX_ASSOCIATIONS_JSP).forward(request, response);
} catch (RegistryException e) {
request.getSession().setAttribute(UIConstants.ERROR_MESSAGE, e.getMessage());
- }
-
- request.getRequestDispatcher(UIConstants.AJAX_DEPENDENCIES_JSP).forward(request, response);
+ }
}
}
Copied: trunk/registry/modules/webapps/src/main/webapp/admin/ajax/association-list.jsp (from r15727, trunk/registry/modules/webapps/src/main/webapp/admin/ajax/dependency-list.jsp)
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/ajax/dependency-list.jsp (original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/ajax/association-list.jsp Thu Apr 17 22:47:56 2008
@@ -1,6 +1,8 @@
+<%@ page import="org.wso2.registry.Association" %>
<%@ page import="org.wso2.registry.web.UIConstants" %>
<%@ page import="org.wso2.registry.web.actions.ResourceDetailsAction" %>
-<%@ page import="java.util.ArrayList" %>
+<%@ page import="java.util.Iterator" %>
+<%@ page import="java.util.List" %>
<%--
Created by IntelliJ IDEA.
User: chanaka jayasena
@@ -12,37 +14,42 @@
<%
ResourceDetailsAction details = (ResourceDetailsAction) request.getSession().getAttribute(UIConstants.RESOURCE_BEAN);
%>
- <form>
+<form>
- <%
- ArrayList deps = (ArrayList)request.getSession().getAttribute(UIConstants.AJAX_DEPENDENCIES_LIST);
- if(!deps.isEmpty()){
- %>
- <table cellpadding="0" cellspacing="0" border="0" style="width:100%;margin-top:0px;">
-
- <%
- }
+ <%
- for (int i=0;i<deps.size();i++) {
+ List depList = (List)request.getSession().getAttribute(UIConstants.AJAX_ASSOCIATIONS_LIST);
+ Iterator deps = depList.iterator();
+ if(depList.size()!=0){
+ %>
+ <table cellpadding="0" cellspacing="0" border="0" style="width:100%;" class="data-table">
+ <tr>
+ <th>
+ Association Type
+ </th>
+ <th>
+ Association Path
+ </th>
+ </tr>
+ <%
+ while (deps.hasNext()) {
+ Association association = (Association) deps.next();
%>
-
- <tr id="depViewPanel_<%=i%>">
- <td><%=deps.get(i)%></td>
- <td style="height:25px;">
- <%-- if (details.isPutAllowed() && !details.isVersionView()) { %>
- <a href="#" onclick="showHideCommon('depViewPanel_<%=i%>');showHideCommon('depEditPanel_<%=i%>')"><img title="Edit" border="0" align="top" src="/wso2registry/admin/images/icon-edit.gif" /></a>
- <a href="#" onclick="removeDependency('<%=deps.get(i)%>');" style="margin-left:5px;"><img title="Remove" border="0" align="top" src="/wso2registry/admin/images/icon-trash.gif" /></a>
- <% } --%>
- </td>
- </tr>
-
+ <tr>
+ <td>
+ <%=association.getAssociationType()%>
+ </td>
+ <td>
+ <%=association.getDestinationPath()%>
+ </td>
+ </tr>
<%
}
- if(!deps.isEmpty()){
%>
- </table>
- <% } %>
- </form>
\ No newline at end of file
+ </table>
+ <%
+ }
+ %>
Modified: trunk/registry/modules/webapps/src/main/webapp/admin/js/validation.js
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/js/validation.js (original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/js/validation.js Thu Apr 17 22:47:56 2008
@@ -29,7 +29,7 @@
function validateFilePath(fld,fldName) {
var error = "";
- var regx = RegExp("[a-zA-Z]:\\.*");
+ var regx = RegExp("([a-zA-Z]:\\.*)|(/.*)");
if(fld.value==""){
fld.style.background = 'Yellow';
error = "Please make sure you fill the "+fldName+" field.<br />";
Modified: trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp
==============================================================================
--- trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp (original)
+++ trunk/registry/modules/webapps/src/main/webapp/admin/registry-resources.jsp Thu Apr 17 22:47:56 2008
@@ -1,16 +1,16 @@
-
-<%@ page import="org.wso2.registry.web.actions.ResourceDetailsAction" %>
+<%@ page import="org.wso2.registry.Association" %>
+<%@ page import="org.wso2.registry.Comment" %>
+<%@ page import="org.wso2.registry.Tag" %>
+<%@ page import="org.wso2.registry.web.UIConstants" %>
<%@ page import="org.wso2.registry.web.actions.CollectionViewAction" %>
-<%@ page import="java.util.Iterator" %>
+<%@ page import="org.wso2.registry.web.actions.ResourceDetailsAction" %>
<%@ page import="org.wso2.registry.web.actions.utils.ResourceData" %>
-<%@ page import="org.wso2.registry.web.UIConstants" %>
-<%@ page import="org.wso2.registry.Tag" %>
-<%@ page import="org.wso2.registry.Comment" %>
<%@ page import="org.wso2.registry.web.actions.utils.ResourcePath" %>
-<%@ page import="java.util.List" %>
-<%@ page import="java.util.Properties" %>
<%@ page import="org.wso2.registry.web.utils.CommonUtil" %>
+<%@ page import="java.util.Iterator" %>
+<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
+<%@ page import="java.util.Properties" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
@@ -27,7 +27,8 @@
<html>
<head>
- <script language="javascript" type="text/javascript" src="/wso2registry/admin/js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
+ <script language="javascript" type="text/javascript"
+ src="/wso2registry/admin/js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="JavaScript" type="text/JavaScript" src="/wso2registry/admin/js/validation.js"></script>
<script language="JavaScript" type="text/JavaScript" src="/wso2registry/admin/js/common.js"></script>
<script language="JavaScript" type="text/JavaScript" src="/wso2registry/admin/js/prototype.js"></script>
@@ -44,8 +45,9 @@
</script>
<!-- /tinyMCE -->
- <link type="text/css" href="/wso2registry/admin/css/main.css" rel="stylesheet" />
- <link rel="alternate" type="application/rss+xml" title="WSO2 Registry - <%=details.getPath()%> (Atom)" href="/wso2registry/atom<%=details.getPath()%>">
+ <link type="text/css" href="/wso2registry/admin/css/main.css" rel="stylesheet"/>
+ <link rel="alternate" type="application/rss+xml" title="WSO2 Registry - <%=details.getPath()%> (Atom)"
+ href="/wso2registry/atom<%=details.getPath()%>">
<title>WSO2 Registry</title>
</head>
<body onload="loadMediaTypes()">
@@ -53,72 +55,101 @@
<div class="page-sizer">
<!-- START header content -->
-<jsp:include page="header.jsp" />
+<jsp:include page="header.jsp"/>
<!--This is the START of main table which seperates 2 coloums for promotions and content of the site -->
<table cellpadding="0" cellspacing="0" border="0" style="width:100%;">
- <tr>
- <td class="promotionDiv" valign="top">
- <jsp:include page="promotion.jsp" />
- </td>
- <td valign="top">
+<tr>
+<td class="promotionDiv" valign="top">
+ <jsp:include page="promotion.jsp"/>
+</td>
+<td valign="top">
<div class="content">
-<% if (errorMessage != null) { %>
-<div class="error-message"><%=errorMessage%></div>
-<% } %>
-
- <h1 class="headding-resource"><% if (!details.isVersionView()) { %>Resource<% } %><% if (details.isVersionView()) { %>Version<% } %></h1>
+ <% if (errorMessage != null) { %>
+ <div class="error-message"><%=errorMessage%>
+ </div>
+ <% } %>
+ <h1 class="headding-resource"><% if (!details.isVersionView()) { %>
+ Resource<% } %><% if (details.isVersionView()) { %>Version<% } %></h1>
-<table cellspacing="0" cellpadding="0" border="0" style="width:100%">
-<tr>
-<td class="leftColoumSizer" valign="top">
-<div class="box1-head" style="height:auto;" >
<table cellspacing="0" cellpadding="0" border="0" style="width:100%">
<tr>
+ <td class="leftColoumSizer" valign="top">
- <td valign="top" style="width:30px;">
+ <div class="box1-head" style="height:auto;">
+ <table cellspacing="0" cellpadding="0" border="0" style="width:100%">
+ <tr>
-<!-- Page resource path prints here -->
-<div class="top-toolbar-back">
- <% if (details.isCollection()) { %>
+ <td valign="top" style="width:30px;">
- <% } else { %>
+ <!-- Page resource path prints here -->
+ <div class="top-toolbar-back">
+ <% if (details.isCollection()) { %>
- <% }
- List iNavPaths = details.getNavigatablePaths();
- if (iNavPaths.size() > 0) {
- ResourcePath rootPath = (ResourcePath) iNavPaths.get(0);
- %><a href="/wso2registry/web<%=rootPath.getNavigatePath()%>" title="root"><img src="/wso2registry/admin/images/icon-home-big.gif" border="0" align="top" /></a></td><td valign="top" style="padding-left:5px;"><h2 class="sub-headding-resources"> <a href="/wso2registry/web<%=rootPath.getNavigatePath()%>" title="root">/</a><%
-
- if (iNavPaths.size() > 1) {
- ResourcePath childPath = (ResourcePath) iNavPaths.get(1);
- %><a href="/wso2registry/web<%=childPath.getNavigatePath()%>"><%=childPath.getNavigateName()%></a><%
- }
+ <% } else { %>
- if (iNavPaths.size() > 2) {
- for (int i = 2; i < iNavPaths.size(); i++) {
- ResourcePath resourcePath = (ResourcePath) iNavPaths.get(i);
- %>/<a href="/wso2registry/web<%=resourcePath.getNavigatePath()%>"><%=resourcePath.getNavigateName()%></a><% }
- }
- } %>
+ <%
+ }
+ List iNavPaths = details.getNavigatablePaths();
+ if (iNavPaths.size() > 0) {
+ ResourcePath rootPath = (ResourcePath) iNavPaths.get(0);
- <span style="clear:both;" />
-</div>
+
+ %><a href="/wso2registry/web<%=rootPath.getNavigatePath()%>" title="root"><img
+ src="/wso2registry/admin/images/icon-home-big.gif" border="0" align="top"/></a>
+ </td>
+ <td valign="top" style="padding-left:5px;"><h2 class="sub-headding-resources"><a
+ href="/wso2registry/web<%=rootPath.getNavigatePath()%>" title="root">/</a><%
+
+
+
+ if (iNavPaths.size() > 1) {
+ ResourcePath childPath = (ResourcePath) iNavPaths.get(1);
+
+
+ %><a href="/wso2registry/web<%=childPath.getNavigatePath()%>"><%=childPath.getNavigateName()%>
+ </a><%
+
+
+ }
+
+ if (iNavPaths.size() > 2) {
+ for (int i = 2; i < iNavPaths.size(); i++) {
+ ResourcePath resourcePath = (ResourcePath) iNavPaths.get(i);
+
+
+ %>/<a href="/wso2registry/web<%=resourcePath.getNavigatePath()%>"><%=resourcePath.getNavigateName()%>
+ </a><%
+
+ }
+ }
+ }
+
+ %>
+
+
+ <span style="clear:both;"/>
+ </div>
</td>
<td align="right" valign="top">
<table cellpadding="0" cellspacing="0" border="0" class="toolBarTable">
<tr>
<td>
- <a href="/wso2registry/atom<%=details.getPath()%>" target="_blank" title="Subscribe to this feed"><img border="0" src="/wso2registry/admin/images/icon-feed-small.gif" /></a>
+ <a href="/wso2registry/atom<%=details.getPath()%>" target="_blank"
+ title="Subscribe to this feed"><img border="0"
+ src="/wso2registry/admin/images/icon-feed-small.gif"/></a>
</td>
<td style="padding-top:3px;">
- <a href="#" onclick="showHideCommon('mainDetailsIconExpanded');showHideCommon('mainDetailsIconMinimized');showHideCommon('resourceMainDetails');showHideCommon('resourceMainDetailsMin');">
- <img src="/wso2registry/admin/images/icon-expanded.gif" border="0" align="top" id="mainDetailsIconExpanded" />
- <img src="/wso2registry/admin/images/icon-minimized.gif" border="0" align="top" id="mainDetailsIconMinimized" style="display:none;" />
+ <a href="#"
+ onclick="showHideCommon('mainDetailsIconExpanded');showHideCommon('mainDetailsIconMinimized');showHideCommon('resourceMainDetails');showHideCommon('resourceMainDetailsMin');">
+ <img src="/wso2registry/admin/images/icon-expanded.gif" border="0" align="top"
+ id="mainDetailsIconExpanded"/>
+ <img src="/wso2registry/admin/images/icon-minimized.gif" border="0" align="top"
+ id="mainDetailsIconMinimized" style="display:none;"/>
</a>
</td>
</tr>
@@ -128,166 +159,230 @@
</tr>
</table>
</div>
-<div class="box1-mid" id="resourceMainDetailsMin" style="display:none;" >
+<div class="box1-mid" id="resourceMainDetailsMin" style="display:none;">
</div>
<div class="box1-mid" id="resourceMainDetails">
<% if (details.isVersionView()) { %>
- <div class="versionsToolBar"><img src="/wso2registry/admin/images/back.gif" align="top" vspace="2" /> <a href="/wso2registry/versions<%=details.getActiveResourcePath()%>">Back to Versions of <%=details.getActiveResourcePath()%></a> | <img src="/wso2registry/admin/images/icon-restore.gif" border="0" align="top" vspace="2" /> <a href="/wso2registry/system/restore?versionPath=<%=details.getPath()%>" title="Restore" style="margin-left:5px;"> Restore to this version </a></div>
- <% } %>
+<div class="versionsToolBar"><img src="/wso2registry/admin/images/back.gif" align="top" vspace="2"/> <a
+ href="/wso2registry/versions<%=details.getActiveResourcePath()%>">Back to Versions
+ of <%=details.getActiveResourcePath()%>
+</a> | <img src="/wso2registry/admin/images/icon-restore.gif" border="0" align="top" vspace="2"/> <a
+ href="/wso2registry/system/restore?versionPath=<%=details.getPath()%>" title="Restore" style="margin-left:5px;">
+ Restore to this version </a></div>
+<% } %>
- <table cellpadding="0" cellspacing="0" border="0" class="simple-data-table">
+<table cellpadding="0" cellspacing="0" border="0" class="simple-data-table">
- <tr><th style="width:140px;">Created:</th><td style="width:170px;"><%=details.getFormattedCreatedOn()%></td><th>Author:</th><td><%=details.getAuthor()%></td></tr>
- <tr><th>Last Updated:</th><td><%=details.getFormattedLastModified()%></td><th>By:</th><td><%=details.getLastUpdater()%></td></tr>
- <tr><th>Media Type:</th><td colspan="3"><% if (details.getMediaType() != null && details.getMediaType().length() != 0) { %><%=details.getMediaType()%><% } else { %>Unknown<% } %></td> </tr>
- <% if (details.isCollection()) { %>
- <tr><th valign="top">Permalink:</th><td colspan="3"><a href="/wso2registry/web<%=details.getPermalink()%>"><%=details.getServerBaseURL()%>/wso2registry/web<%=details.getPermalink()%></a></td></tr>
- <% } else { %>
- <tr><th>Permalink:</th><td colspan="3"><a target="_blank" href="/wso2registry/resources<%=details.getPermalink()%>"><%=details.getServerBaseURL()%>/wso2registry/resources<%=details.getPermalink()%></a></td></tr>
- <% } %>
- <% if (!details.isVersionView()) { %><tr><th>Versions:</th><td colspan="3"><a href="/wso2registry/versions<%=details.getPath()%>">View versions</a></td> </tr><% } %>
- </table>
- <div id="ratingDiv"><img src="/wso2registry/admin/images/ajax-loader.gif" /></div>
+ <tr>
+ <th style="width:140px;">Created:</th>
+ <td style="width:170px;"><%=details.getFormattedCreatedOn()%>
+ </td>
+ <th>Author:</th>
+ <td><%=details.getAuthor()%>
+ </td>
+ </tr>
+ <tr>
+ <th>Last Updated:</th>
+ <td><%=details.getFormattedLastModified()%>
+ </td>
+ <th>By:</th>
+ <td><%=details.getLastUpdater()%>
+ </td>
+ </tr>
+ <tr>
+ <th>Media Type:</th>
+ <td colspan="3"><% if (details.getMediaType() != null && details.getMediaType().length() != 0) { %><%=details.getMediaType()%><% } else { %>
+ Unknown<% } %></td>
+ </tr>
+ <% if (details.isCollection()) { %>
+ <tr>
+ <th valign="top">Permalink:</th>
+ <td colspan="3"><a href="/wso2registry/web<%=details.getPermalink()%>"><%=details.getServerBaseURL()%>
+ /wso2registry/web<%=details.getPermalink()%>
+ </a></td>
+ </tr>
+ <% } else { %>
+ <tr>
+ <th>Permalink:</th>
+ <td colspan="3"><a target="_blank"
+ href="/wso2registry/resources<%=details.getPermalink()%>"><%=details.getServerBaseURL()%>
+ /wso2registry/resources<%=details.getPermalink()%>
+ </a></td>
+ </tr>
+ <% } %>
+ <% if (!details.isVersionView()) { %>
+ <tr>
+ <th>Versions:</th>
+ <td colspan="3"><a href="/wso2registry/versions<%=details.getPath()%>">View versions</a></td>
+ </tr>
+ <% } %>
+</table>
+<div id="ratingDiv"><img src="/wso2registry/admin/images/ajax-loader.gif"/></div>
- <!-- Description editing will goes here -->
- <script type="text/javascript" xml:space="preserve">
- new Ajax.Updater('ratingDiv', '/wso2registry/system/getInitialRating', { method: 'get', parameters: {resourcePath: '<%=details.getPath()%>'} });
- </script>
+<!-- Description editing will goes here -->
+<script type="text/javascript" xml:space="preserve">
+ new Ajax.Updater('ratingDiv', '/wso2registry/system/getInitialRating', { method: 'get', parameters: {resourcePath: '<%=details.getPath()%>'} });
+</script>
- <table cellpadding="0" cellspacing="0" border="0" class="simple-data-table" style="width:100%;">
- <tr>
- <th style="width:140px;height:25px;" valign="top">
- Properties:
- </th>
- <td valign="top" style="width:10px;">
-
- <% if (!details.isPutAllowed()) { %>
- <!-- span class="helpText">Sorry. You don't have Permissions to add new properties.</span -->
- <%
- } else if (details.isVersionView()) {
- %>
- <span class="helpText">Go to the current version to add or edit properties.</span>
- <%
- } else {
- %>
- <a onclick="showHideCommon('propertiesAddDiv');" href="#">
- <img border="0" title="Add New Property" valign="top" src="/wso2registry/admin/images/universal-add.gif"/>
- </a>
- <% } %>
+<table cellpadding="0" cellspacing="0" border="0" class="simple-data-table" style="width:100%;">
+ <tr>
+ <th style="width:140px;height:25px;" valign="top">
+ Properties:
+ </th>
+ <td valign="top" style="width:10px;">
- </td>
- <td class="propertiesCol">
- <div id="propertiesReason" class="validationError" style="display: none;"></div>
+ <% if (!details.isPutAllowed()) { %>
+ <!-- span class="helpText">Sorry. You don't have Permissions to add new properties.</span -->
+ <%
+ } else if (details.isVersionView()) {
+ %>
+ <span class="helpText">Go to the current version to add or edit properties.</span>
+ <%
+ } else {
+ %>
+ <a onclick="showHideCommon('propertiesAddDiv');" href="#">
+ <img border="0" title="Add New Property" valign="top"
+ src="/wso2registry/admin/images/universal-add.gif"/>
+ </a>
+ <% } %>
+
+ </td>
+ <td class="propertiesCol">
+ <div id="propertiesReason" class="validationError" style="display: none;"></div>
<div id="propertiesAddDiv" style="display:none;">
- <form onsubmit="return setProperty();">
-
- <input type="hidden" id="propRPath" value="<%=details.getPath()%>" />
- <table cellpadding="0" cellspacing="0" border="0" class="simple-data-table">
- <tr><th>Name: </th><td><input type="text" id="propName" /></td></tr>
- <tr><th>Value: </th><td><input type="text" id="propValue" /></td></tr>
- <tr><td></td><td><input type="button" class="button" value="Add" onclick="setProperty();" /></td></tr>
- </table>
- </form>
- </div>
- </td>
- </tr>
- </table>
+ <form onsubmit="return setProperty();">
+
+ <input type="hidden" id="propRPath" value="<%=details.getPath()%>"/>
+ <table cellpadding="0" cellspacing="0" border="0" class="simple-data-table">
+ <tr>
+ <th>Name:</th>
+ <td><input type="text" id="propName"/></td>
+ </tr>
+ <tr>
+ <th>Value:</th>
+ <td><input type="text" id="propValue"/></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td><input type="button" class="button" value="Add" onclick="setProperty();"/></td>
+ </tr>
+ </table>
+ </form>
+ </div>
+ </td>
+ </tr>
+</table>
- <div id="resourceProperties" style="margin-left:145px;">
+<div id="resourceProperties" style="margin-left:145px;">
- <form>
+ <form>
<%
Properties props = details.getProperties();
- if(!props.isEmpty()){
+ if (!props.isEmpty()) {
%>
- <table cellpadding="0" cellspacing="0" border="0" class="data-table" style="width:100%;margin-top:0px;">
- <tr>
- <th style="width:40%">Name</th>
- <th>Value</th>
- <th style="width:50px;">Action</th>
+ <table cellpadding="0" cellspacing="0" border="0" class="data-table" style="width:100%;margin-top:0px;">
+ <tr>
+ <th style="width:40%">Name</th>
+ <th>Value</th>
+ <th style="width:50px;">Action</th>
</tr>
- <%
- }
- Iterator iProps = props.keySet().iterator();
- for (int i=0;iProps.hasNext();i++) {
+ <%
+ }
+ Iterator iProps = props.keySet().iterator();
+ for (int i = 0; iProps.hasNext(); i++) {
- String name = (String) iProps.next();
+ String name = (String) iProps.next();
- String value = "";
- List propValues = (List) props.get(name);
- if (propValues != null) {
- value = (String) propValues.get(0);
- }
-
- %>
+ String value = "";
+ List propValues = (List) props.get(name);
+ if (propValues != null) {
+ value = (String) propValues.get(0);
+ }
+ %>
- <tr id="propEditPanel_<%=i%>" style="display:none;">
- <td><input id="propRPath_<%=i%>" type="hidden" value="<%=details.getPath()%>"/><input id="oldPropName_<%=i%>" type="hidden" value="<%=name%>"/><input value="<%=name%>" type="text" id="propName_<%=i%>" /></td>
- <td><input value="<%=value%>" id="propValue_<%=i%>" type="text"/></td>
- <td>
- <a href="#" onclick="showHideCommon('propViewPanel_<%=i%>');showHideCommon('propEditPanel_<%=i%>'); editProperty('<%=i%>')"><img border="0" align="top" title="Save" src="/wso2registry/admin/images/save-button.gif" id="propSaveButton_<%=i%>" /></a>
- </td>
- </tr>
+ <tr id="propEditPanel_<%=i%>" style="display:none;">
+ <td><input id="propRPath_<%=i%>" type="hidden" value="<%=details.getPath()%>"/><input
+ id="oldPropName_<%=i%>" type="hidden" value="<%=name%>"/><input value="<%=name%>" type="text"
+ id="propName_<%=i%>"/></td>
+ <td><input value="<%=value%>" id="propValue_<%=i%>" type="text"/></td>
+ <td>
+ <a href="#"
+ onclick="showHideCommon('propViewPanel_<%=i%>');showHideCommon('propEditPanel_<%=i%>'); editProperty('<%=i%>')"><img
+ border="0" align="top" title="Save" src="/wso2registry/admin/images/save-button.gif"
+ id="propSaveButton_<%=i%>"/></a>
+ </td>
+ </tr>
- <tr id="propViewPanel_<%=i%>">
- <td><%=name%></td>
- <td><%=value%></td>
- <td style="height:25px;">
- <% if (details.isPutAllowed() && !details.isVersionView()) { %>
- <a href="#" onclick="showHideCommon('propViewPanel_<%=i%>');showHideCommon('propEditPanel_<%=i%>')"><img title="Edit" border="0" align="top" src="/wso2registry/admin/images/icon-edit.gif" /></a>
- <a href="#" onclick="removeProperty('<%=name%>');" style="margin-left:5px;"><img title="Remove" border="0" align="top" src="/wso2registry/admin/images/icon-trash.gif" /></a>
- <% } %>
- </td>
- </tr>
+ <tr id="propViewPanel_<%=i%>">
+ <td><%=name%>
+ </td>
+ <td><%=value%>
+ </td>
+ <td style="height:25px;">
+ <% if (details.isPutAllowed() && !details.isVersionView()) { %>
+ <a href="#" onclick="showHideCommon('propViewPanel_<%=i%>');showHideCommon('propEditPanel_<%=i%>')"><img
+ title="Edit" border="0" align="top" src="/wso2registry/admin/images/icon-edit.gif"/></a>
+ <a href="#" onclick="removeProperty('<%=name%>');" style="margin-left:5px;"><img title="Remove"
+ border="0"
+ align="top"
+ src="/wso2registry/admin/images/icon-trash.gif"/></a>
+ <% } %>
+ </td>
+ </tr>
- <%
- }
- if(!props.isEmpty()){
- %>
- </table>
+ <%
+ }
+ if (!props.isEmpty()) {
+ %>
+ </table>
<% } %>
- </form>
- </div>
-
+ </form>
+</div>
- <table cellpadding="0" cellspacing="0" border="0" class="simple-data-table" style="width:100%">
- <tr>
- <th style="width:120px; padding-bottom:10px; " valign="top">Description:</th>
- <td valign="top" style="width:17px;">
- <% if (details.isPutAllowed() && !details.isVersionView()) { %>
- <div id="editButton" style="display:inline;"><a href="#editButton" name="editButton" title="Edit Description" onclick="processDescription();"><img src="/wso2registry/admin/images/icon-edit.gif" name="editButtonImage" border="0" align="top" /></a></div>
- <div id="saveButton" style="display:none;"><a href="#saveButton" name="saveButton" title="Save Description" onclick="processDescription();"><img src="/wso2registry/admin/images/save-button.gif" name="saveButtonImage" border="0" align="top" /></a></div>
- <% } %>
- </td>
+<table cellpadding="0" cellspacing="0" border="0" class="simple-data-table" style="width:100%">
+ <tr>
+ <th style="width:120px; padding-bottom:10px; " valign="top">Description:</th>
+ <td valign="top" style="width:17px;">
+ <% if (details.isPutAllowed() && !details.isVersionView()) { %>
+ <div id="editButton" style="display:inline;"><a href="#editButton" name="editButton"
+ title="Edit Description"
+ onclick="processDescription();"><img
+ src="/wso2registry/admin/images/icon-edit.gif" name="editButtonImage" border="0" align="top"/></a>
+ </div>
+ <div id="saveButton" style="display:none;"><a href="#saveButton" name="saveButton" title="Save Description"
+ onclick="processDescription();"><img
+ src="/wso2registry/admin/images/save-button.gif" name="saveButtonImage" border="0" align="top"/></a>
+ </div>
+ <% } %>
+ </td>
- <td valign="top">
- <div id="descView" style="display:block;">
- </div>
+ <td valign="top">
+ <div id="descView" style="display:block;">
+ </div>
- <textarea class="resource-content" id="descEdit" style="display:none;">
- </textarea>
+ <textarea class="resource-content" id="descEdit" style="display:none;">
+ </textarea>
- </td>
- </tr>
- </table>
+ </td>
+ </tr>
+</table>
- <script type="text/javascript" xml:space="preserve">
- new Ajax.Updater('descView', '/wso2registry/system/getDescription', { method: 'get', parameters: {resourcePath: '<%=details.getPath()%>'} });
- document.getElementById('descEdit').textContent = document.getElementById('descView').innerHTML;
- </script>
+<script type="text/javascript" xml:space="preserve">
+ new Ajax.Updater('descView', '/wso2registry/system/getDescription', { method: 'get', parameters: {resourcePath: '<%=details.getPath()%>'} });
+ document.getElementById('descEdit').textContent = document.getElementById('descView').innerHTML;
+</script>
</div>
<!-- Page main information Ends here -->
-
<!-- Start Entries -->
<div class="box1-head">
<table cellspacing="0" cellpadding="0" border="0" style="width:100%">
@@ -302,17 +397,24 @@
<tr>
<% if (details.isCollection() && details.isPutAllowed() && !details.isVersionView()) { %>
<td>
- <a href="#resources" title="Add Resource" onclick="showHide('add-resource-div');expandIfNot('entries');"><img src="/wso2registry/admin/images/icon-add-resource.gif" border="0" align="top" /></a>
+ <a href="#resources" title="Add Resource"
+ onclick="showHide('add-resource-div');expandIfNot('entries');"><img
+ src="/wso2registry/admin/images/icon-add-resource.gif" border="0" align="top"/></a>
</td>
<td>
- <a href="#resources" name="resources" title="Add Collection" onclick="showHide('add-folder-div');expandIfNot('entries');"><img src="/wso2registry/admin/images/icon-add-folder.gif" border="0" align="top" /></a>
+ <a href="#resources" name="resources" title="Add Collection"
+ onclick="showHide('add-folder-div');expandIfNot('entries');"><img
+ src="/wso2registry/admin/images/icon-add-folder.gif" border="0" align="top"/></a>
</td>
<% } %>
<td style="padding-top:3px;">
- <a href="#resources" onclick="showHideCommon('entriesIconExpanded');showHideCommon('entriesIconMinimized');showHideCommon('entriesExpanded');showHideCommon('entriesMinimized');">
- <img src="/wso2registry/admin/images/icon-expanded.gif" border="0" align="top" id="entriesIconExpanded" />
- <img src="/wso2registry/admin/images/icon-minimized.gif" border="0" align="top" id="entriesIconMinimized" style="display:none;" />
+ <a href="#resources"
+ onclick="showHideCommon('entriesIconExpanded');showHideCommon('entriesIconMinimized');showHideCommon('entriesExpanded');showHideCommon('entriesMinimized');">
+ <img src="/wso2registry/admin/images/icon-expanded.gif" border="0" align="top"
+ id="entriesIconExpanded"/>
+ <img src="/wso2registry/admin/images/icon-minimized.gif" border="0" align="top"
+ id="entriesIconMinimized" style="display:none;"/>
</a>
</td>
</tr>
@@ -333,25 +435,39 @@
<!-- Add resource div -->
<div class="add-resource-div" id="add-resource-div" style="display:none;">
- <form onsubmit="return submitResourceAddForm();" method="post" name="resourceupload" id="resourceupload" action="/wso2registry/system/addResource"
+ <form onsubmit="return submitResourceAddForm();" method="post" name="resourceupload" id="resourceupload"
+ action="/wso2registry/system/addResource"
enctype="multipart/form-data">
<input type="hidden" name="path" value="<%=details.getPath()%>"/>
+
<h3>Add Resource</h3>
+
<div class="validationError" id="resourceReason" style="display:none;"></div>
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
- <td valign="top"><input id="contentFile" type="radio" name="contentMethod" value="file" checked="checked" onclick="resourceFrom('file')" /><span id="contentFileText">Import content from file<span class="required">*</span></span></td>
+ <td valign="top"><input id="contentFile" type="radio" name="contentMethod" value="file"
+ checked="checked" onclick="resourceFrom('file')"/><span id="contentFileText">Import content from file<span
+ class="required">*</span></span></td>
<td>
- <input id="resourceFile" type="file" name="upload" onchange="fillResourceDetails()" />
- <div class="helpText" id="fileHelpText">Give the url of a file to fetch content (xml,wsdl,jar etc..)</div>
+ <input id="resourceFile" type="file" name="upload" onchange="fillResourceDetails()"/>
+
+ <div class="helpText" id="fileHelpText">Give the url of a file to fetch content (xml,wsdl,jar
+ etc..)
+ </div>
</td>
</tr>
<tr>
- <td valign="top" style="width:180px;"><input id="contentURL" onclick="resourceFrom('url')" type="radio" name="contentMethod" value="url" /><span id="contentURLText">Import content from URL<span class="required">*</span></span></td>
+ <td valign="top" style="width:180px;"><input id="contentURL" onclick="resourceFrom('url')" type="radio"
+ name="contentMethod" value="url"/><span
+ id="contentURLText">Import content from URL<span class="required">*</span></span></td>
<td>
- <input id="fetchURLID" type="text" name="fetchURL" onchange="fillResourceDetailsForURLs()" disabled="" />
- <div class="helpText" id="urlHelpText" style="color:#cccccc;">Give the full url of the resource to fetch content from URL</div>
+ <input id="fetchURLID" type="text" name="fetchURL" onchange="fillResourceDetailsForURLs()"
+ disabled=""/>
+
+ <div class="helpText" id="urlHelpText" style="color:#cccccc;">Give the full url of the resource to
+ fetch content from URL
+ </div>
</td>
</tr>
<tr>
@@ -373,25 +489,30 @@
</tr>
<tr>
<td> </td>
- <td><input type="button" class="button" value="Add" style="margin-top:10px;" onclick="submitResourceAddForm();"/> <input type="button" class="button" value="Cancel" style="margin-top:10px;" onclick="showHide('add-resource-div')"/></td>
+ <td><input type="button" class="button" value="Add" style="margin-top:10px;"
+ onclick="submitResourceAddForm();"/> <input type="button" class="button" value="Cancel"
+ style="margin-top:10px;"
+ onclick="showHide('add-resource-div')"/></td>
</tr>
</table>
</form>
</div>
-
<!-- Add folder div -->
<div class="add-resource-div" id="add-folder-div" style="display:none;">
<h3>Add Collection</h3>
- <form name="collectionForm" method="post" action="/wso2registry/system/addCollection" onsubmit="return submitCollectionAddForm();">
+
+ <form name="collectionForm" method="post" action="/wso2registry/system/addCollection"
+ onsubmit="return submitCollectionAddForm();">
<input type="hidden" name="parentPath" value="<%=details.getPath()%>"/>
+
<div class="validationError" id="collectionReason" style="display:none;"></div>
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" style="width:180px;">Name</td>
- <td><input type="text" name="collectionName" id="collectionName" style="margin-bottom:10px;"/></td>
+ <td><input type="text" name="collectionName" id="collectionName" style="margin-bottom:10px;"/></td>
</tr>
<tr>
<td valign="top">Media Type</td>
@@ -402,7 +523,8 @@
while (iCollectionTypes.hasNext()) {
String collectionType = (String) iCollectionTypes.next();
%>
- <option value="<%=collectionType%>"><%=collectionType%></option>
+ <option value="<%=collectionType%>"><%=collectionType%>
+ </option>
<% } %>
</select>
</td>
@@ -413,92 +535,125 @@
</tr>
<tr>
<td> </td>
- <td><input type="button" class="button" value="Add" style="margin-top:10px;" onclick="submitCollectionAddForm()"/> <input type="button" class="button" value="Cancel" style="margin-top:10px;" onclick="showHide('add-folder-div')"/></td>
+ <td><input type="button" class="button" value="Add" style="margin-top:10px;"
+ onclick="submitCollectionAddForm()"/> <input type="button" class="button" value="Cancel"
+ style="margin-top:10px;"
+ onclick="showHide('add-folder-div')"/></td>
</tr>
</table>
</form>
</div>
<div id="entryList">
-<table cellpadding="0" cellspacing="0" border="0" style="width:100%;" class="data-table">
- <%
- if(!collection.getResourceDataList().isEmpty()) {
- %>
- <tr>
- <th>Name</th>
- <th>Created Date</th>
- <th>Author</th>
- <th>Rating</th>
- <th style="width:50px;">Action</th>
+ <table cellpadding="0" cellspacing="0" border="0" style="width:100%;" class="data-table">
+ <%
+ if (!collection.getResourceDataList().isEmpty()) {
+ %>
+ <tr>
+ <th>Name</th>
+ <th>Created Date</th>
+ <th>Author</th>
+ <th>Rating</th>
+ <th style="width:50px;">Action</th>
- </tr>
- <%
- }
- Iterator iterator = collection.getResourceDataList().iterator();
- int entryNumber = 0;
- while (iterator.hasNext()) {
- ResourceData resourceData = (ResourceData) iterator.next();
- entryNumber++;
- %>
- <tr id="1">
- <td>
- <% if (resourceData.getResourceType() == ResourceData.COLLECTION) { %>
- <img src="/wso2registry/admin/images/icon-folder-small.gif" style="margin-right:5px;" /><a href="/wso2registry/web/<%=resourceData.getRelativePath()%>" id="resourceView<%=entryNumber%>"><%=resourceData.getName()%></a>
- <input type="text" id="resourceEdit<%=entryNumber%>" style="display:none" value="<%=resourceData.getName()%>" />
+ </tr>
+ <%
+ }
+ Iterator iterator = collection.getResourceDataList().iterator();
+ int entryNumber = 0;
+ while (iterator.hasNext()) {
+ ResourceData resourceData = (ResourceData) iterator.next();
+ entryNumber++;
+ %>
+ <tr id="1">
+ <td>
+ <% if (resourceData.getResourceType() == ResourceData.COLLECTION) { %>
+ <img src="/wso2registry/admin/images/icon-folder-small.gif" style="margin-right:5px;"/><a
+ href="/wso2registry/web/<%=resourceData.getRelativePath()%>"
+ id="resourceView<%=entryNumber%>"><%=resourceData.getName()%>
+ </a>
+ <input type="text" id="resourceEdit<%=entryNumber%>" style="display:none"
+ value="<%=resourceData.getName()%>"/>
<% if (resourceData.isDeleteAllowed() && !details.isVersionView()) { %>|
- <a href="#" title="Edit Resource Name" onclick="showHideCommon('resourceEdit<%=entryNumber%>');showHideCommon('resourceView<%=entryNumber%>'); showHideCommon('resourceSaveButton<%=entryNumber%>');showHideCommon('resourceEditButton<%=entryNumber%>');" id="resourceEditButton<%=entryNumber%>"><img src="/wso2registry/admin/images/icon-edit.gif" border="0" align="top" id="resourceEditButton" /></a>
- <a href="#" onclick="renameResource('<%=details.getPath()%>', '<%=resourceData.getResourcePath()%>', 'resourceEdit<%=entryNumber%>');showHideCommon('resourceEdit<%=entryNumber%>');showHideCommon('resourceView<%=entryNumber%>'); showHideCommon('resourceSaveButton<%=entryNumber%>');showHideCommon('resourceEditButton<%=entryNumber%>');" id="resourceSaveButton<%=entryNumber%>" style="display:none;"><img border="0" align="top" title="Save" src="/wso2registry/admin/images/save-button.gif" /></a>
+ <a href="#" title="Edit Resource Name"
+ onclick="showHideCommon('resourceEdit<%=entryNumber%>');showHideCommon('resourceView<%=entryNumber%>'); showHideCommon('resourceSaveButton<%=entryNumber%>');showHideCommon('resourceEditButton<%=entryNumber%>');"
+ id="resourceEditButton<%=entryNumber%>"><img src="/wso2registry/admin/images/icon-edit.gif"
+ border="0" align="top" id="resourceEditButton"/></a>
+ <a href="#"
+ onclick="renameResource('<%=details.getPath()%>', '<%=resourceData.getResourcePath()%>', 'resourceEdit<%=entryNumber%>');showHideCommon('resourceEdit<%=entryNumber%>');showHideCommon('resourceView<%=entryNumber%>'); showHideCommon('resourceSaveButton<%=entryNumber%>');showHideCommon('resourceEditButton<%=entryNumber%>');"
+ id="resourceSaveButton<%=entryNumber%>" style="display:none;"><img border="0" align="top"
+ title="Save"
+ src="/wso2registry/admin/images/save-button.gif"/></a>
<% } %>
- <% } else { %>
- <div style="margin-left:20px;">
- <a href="/wso2registry/web/<%=resourceData.getRelativePath()%>" id="resourceView<%=entryNumber%>"><%=resourceData.getName()%></a>
- <input type="text" id="resourceEdit<%=entryNumber%>" style="display:none" value="<%=resourceData.getName()%>" />
- | <a href="/wso2registry/resources<%=resourceData.getResourcePath()%>" target="_blank" title="Download" ><img src="/wso2registry/admin/images/icon-download.jpg" border="0" align="top" /></a>
- <% if (resourceData.isDeleteAllowed() && !details.isVersionView()) { %>| <a href="#" title="Edit Resource Name" onclick="showHideCommon('resourceEdit<%=entryNumber%>');showHideCommon('resourceView<%=entryNumber%>'); showHideCommon('resourceSaveButton<%=entryNumber%>');showHideCommon('resourceEditButton<%=entryNumber%>');" id="resourceEditButton<%=entryNumber%>"><img src="/wso2registry/admin/images/icon-edit.gif" border="0" align="top" id="resourceEditButton" /></a>
- <a href="#" onclick="renameResource('<%=details.getPath()%>', '<%=resourceData.getResourcePath()%>', 'resourceEdit<%=entryNumber%>');showHideCommon('resourceEdit<%=entryNumber%>');showHideCommon('resourceView<%=entryNumber%>'); showHideCommon('resourceSaveButton<%=entryNumber%>');showHideCommon('resourceEditButton<%=entryNumber%>');" id="resourceSaveButton<%=entryNumber%>" style="display:none;"><img border="0" align="top" title="Save" src="/wso2registry/admin/images/save-button.gif" /></a>
+ <% } else { %>
+ <div style="margin-left:20px;">
+ <a href="/wso2registry/web/<%=resourceData.getRelativePath()%>"
+ id="resourceView<%=entryNumber%>"><%=resourceData.getName()%>
+ </a>
+ <input type="text" id="resourceEdit<%=entryNumber%>" style="display:none"
+ value="<%=resourceData.getName()%>"/>
+ | <a href="/wso2registry/resources<%=resourceData.getResourcePath()%>" target="_blank"
+ title="Download"><img src="/wso2registry/admin/images/icon-download.jpg" border="0"
+ align="top"/></a>
+ <% if (resourceData.isDeleteAllowed() && !details.isVersionView()) { %>| <a href="#"
+ title="Edit Resource Name"
+ onclick="showHideCommon('resourceEdit<%=entryNumber%>');showHideCommon('resourceView<%=entryNumber%>'); showHideCommon('resourceSaveButton<%=entryNumber%>');showHideCommon('resourceEditButton<%=entryNumber%>');"
+ id="resourceEditButton<%=entryNumber%>"><img
+ src="/wso2registry/admin/images/icon-edit.gif" border="0" align="top" id="resourceEditButton"/></a>
+ <a href="#"
+ onclick="renameResource('<%=details.getPath()%>', '<%=resourceData.getResourcePath()%>', 'resourceEdit<%=entryNumber%>');showHideCommon('resourceEdit<%=entryNumber%>');showHideCommon('resourceView<%=entryNumber%>'); showHideCommon('resourceSaveButton<%=entryNumber%>');showHideCommon('resourceEditButton<%=entryNumber%>');"
+ id="resourceSaveButton<%=entryNumber%>" style="display:none;"><img border="0" align="top"
+ title="Save"
+ src="/wso2registry/admin/images/save-button.gif"/></a>
+ <% } %>
+ </div>
<% } %>
- </div>
- <% } %>
- </td>
- <td><%=resourceData.getFormattedCreatedOn()%></td>
- <td><%=resourceData.getAuthorUserName()%></td>
- <td>
- <img src="/wso2registry/admin/images/r<%=resourceData.getAverageStars()[0]%>.gif" align="top" />
- <img src="/wso2registry/admin/images/r<%=resourceData.getAverageStars()[1]%>.gif" align="top" />
- <img src="/wso2registry/admin/images/r<%=resourceData.getAverageStars()[2]%>.gif" align="top" />
- <img src="/wso2registry/admin/images/r<%=resourceData.getAverageStars()[3]%>.gif" align="top" />
- <img src="/wso2registry/admin/images/r<%=resourceData.getAverageStars()[4]%>.gif" align="top" />
- (<%=resourceData.getAverageRating()%>)
- </td>
- <td align="left"><a href="/wso2registry/atom<%=resourceData.getResourcePath()%>" target="_blank" title="Subscribe to this feed"><img border="0" src="/wso2registry/admin/images/icon-feed-small.gif"/></a>
-
- <% if (resourceData.isDeleteAllowed() && !details.isVersionView()) { %><a href="/wso2registry/system/deleteResource?resourcePath=<%=resourceData.getResourcePath()%>" title="Delete" style="margin-left:5px;"><img src="/wso2registry/admin/images/icon-trash.gif" border="0" /></a> <% } %>
- </td>
+ </td>
+ <td><%=resourceData.getFormattedCreatedOn()%>
+ </td>
+ <td><%=resourceData.getAuthorUserName()%>
+ </td>
+ <td>
+ <img src="/wso2registry/admin/images/r<%=resourceData.getAverageStars()[0]%>.gif" align="top"/>
+ <img src="/wso2registry/admin/images/r<%=resourceData.getAverageStars()[1]%>.gif" align="top"/>
+ <img src="/wso2registry/admin/images/r<%=resourceData.getAverageStars()[2]%>.gif" align="top"/>
+ <img src="/wso2registry/admin/images/r<%=resourceData.getAverageStars()[3]%>.gif" align="top"/>
+ <img src="/wso2registry/admin/images/r<%=resourceData.getAverageStars()[4]%>.gif" align="top"/>
+ (<%=resourceData.getAverageRating()%>)
+ </td>
+ <td align="left"><a href="/wso2registry/atom<%=resourceData.getResourcePath()%>" target="_blank"
+ title="Subscribe to this feed"><img border="0"
+ src="/wso2registry/admin/images/icon-feed-small.gif"/></a>
+
+ <% if (resourceData.isDeleteAllowed() && !details.isVersionView()) { %><a
+ href="/wso2registry/system/deleteResource?resourcePath=<%=resourceData.getResourcePath()%>"
+ title="Delete" style="margin-left:5px;"><img src="/wso2registry/admin/images/icon-trash.gif"
+ border="0"/></a> <% } %>
+ </td>
- </tr>
+ </tr>
- <% } %>
-</table>
+ <% } %>
+ </table>
</div>
<% } else { %>
<br/>
-<a href="/wso2registry/resources<%=details.getContentPath()%>" target="_blank" class="download-link"><img src="/wso2registry/admin/images/icon-download.jpg" border="0" align="top" /> Download</a>
+<a href="/wso2registry/resources<%=details.getContentPath()%>" target="_blank" class="download-link"><img
+ src="/wso2registry/admin/images/icon-download.jpg" border="0" align="top"/> Download</a>
<br/>
<% } %>
-
<!-- End box1-mid div -->
</div>
<!-- End Entries -->
-
<!-- Start Permissions -->
<!-- Hear comes the box1 table -->
<% if (details.isAuthorizeAllowed() && !details.isVersionView()) { %>
@@ -509,20 +664,23 @@
<h2 class="sub-headding-permisions">Permissions</h2>
</td>
<td align="right" valign="middle" style="padding-top:3px;">
- <a href="#" onclick="showHideCommon('perIconExpanded');showHideCommon('perIconMinimized');showHideCommon('perExpanded');showHideCommon('perMinimized');">
- <img src="/wso2registry/admin/images/icon-expanded.gif" border="0" align="top" id="perIconExpanded" style="display:none;" />
- <img src="/wso2registry/admin/images/icon-minimized.gif" border="0" align="top" id="perIconMinimized" />
+ <a href="#"
+ onclick="showHideCommon('perIconExpanded');showHideCommon('perIconMinimized');showHideCommon('perExpanded');showHideCommon('perMinimized');">
+ <img src="/wso2registry/admin/images/icon-expanded.gif" border="0" align="top" id="perIconExpanded"
+ style="display:none;"/>
+ <img src="/wso2registry/admin/images/icon-minimized.gif" border="0" align="top"
+ id="perIconMinimized"/>
</a>
</td>
</tr>
</table>
</div>
-<div class="box1-mid" id="perMinimized" >
+<div class="box1-mid" id="perMinimized">
</div>
<div class="box1-mid" id="perExpanded" style="display:none;">
<!-- all the content goes here -->
- <jsp:include page="permisions.jsp" />
+ <jsp:include page="permisions.jsp"/>
<!-- End box1-mid div -->
</div>
@@ -532,28 +690,34 @@
</td>
<td valign="top" style="width:5px;" align="center">
-<img src="/wso2registry/admin/images/colSep.jpg" border="0" hspace="10" />
+ <img src="/wso2registry/admin/images/colSep.jpg" border="0" hspace="10"/>
</td>
<td class="rightColumnSizer" valign="top">
- <!-- Tag cloude box starts here -->
- <!-- Hear comes the box2 table -->
+<!-- Tag cloude box starts here -->
+<!-- Hear comes the box2 table -->
<div class="box1-head">
<table cellspacing="0" cellpadding="0" border="0" style="width:100%">
<tr>
<td valign="top"><h2 class="sub-headding-tags">Tags</h2></td>
<td align="right" valign="top">
- <table cellpadding="0" cellspacing="0" border="0" class="toolBarTable">
+ <table cellpadding="0" cellspacing="0" border="0" class="toolBarTable">
<tr>
<td>
- <% if (details.isLoggedIn() && !details.isVersionView()) { %><a href="#" onclick="showHideCommon('tagAddTable');expandIfNot('tag');"><img src="/wso2registry/admin/images/universal-add.gif" border="0" valign="top" title="Add New Tag" /></a><% } %>
+ <% if (details.isLoggedIn() && !details.isVersionView()) { %><a href="#"
+ onclick="showHideCommon('tagAddTable');expandIfNot('tag');"><img
+ src="/wso2registry/admin/images/universal-add.gif" border="0" valign="top"
+ title="Add New Tag"/></a><% } %>
</td>
<td style="padding-top:3px;">
- <a href="#" onclick="showHideCommon('tagIconExpanded');showHideCommon('tagIconMinimized');showHideCommon('tagExpanded');showHideCommon('tagMinimized');">
- <img src="/wso2registry/admin/images/icon-expanded.gif" border="0" align="top" id="tagIconExpanded" />
- <img src="/wso2registry/admin/images/icon-minimized.gif" border="0" align="top" id="tagIconMinimized" style="display:none;" />
- </a>
+ <a href="#"
+ onclick="showHideCommon('tagIconExpanded');showHideCommon('tagIconMinimized');showHideCommon('tagExpanded');showHideCommon('tagMinimized');">
+ <img src="/wso2registry/admin/images/icon-expanded.gif" border="0" align="top"
+ id="tagIconExpanded"/>
+ <img src="/wso2registry/admin/images/icon-minimized.gif" border="0" align="top"
+ id="tagIconMinimized" style="display:none;"/>
+ </a>
</td>
</tr>
</table>
@@ -573,16 +737,19 @@
while (iTags.hasNext()) {
Tag tag = (Tag) iTags.next();
%>
- <a href="/wso2registry/system/search?criteria=<%=tag.getTagName()%>" class="cloud-x<%=tag.getCategory()%>"><%=tag.getTagName()%></a>
+ <a href="/wso2registry/system/search?criteria=<%=tag.getTagName()%>"
+ class="cloud-x<%=tag.getCategory()%>"><%=tag.getTagName()%>
+ </a>
<% } %>
</div>
<% if (!details.isLoggedIn()) { %>
<% } else if (details.isVersionView()) { %>
- Go to the current version to add tags
+ Go to the current version to add tags
<% } else { %>
- <table cellpadding="0" cellspacing="0" border="0" style="width:100%; display:none;" class="form-table" id="tagAddTable">
+ <table cellpadding="0" cellspacing="0" border="0" style="width:100%; display:none;" class="form-table"
+ id="tagAddTable">
<tr>
<td>
<input id="tfPath" type="hidden" name="resourcePath" value="<%=details.getPath()%>"/>
@@ -593,7 +760,8 @@
<tr>
<td style="font-style:italic;">
- <img src="/wso2registry/admin/images/help-small.jpg" style="margin-right:5px;" />Use commas ("one, two") to add multiple tags.
+ <img src="/wso2registry/admin/images/help-small.jpg" style="margin-right:5px;"/>Use commas ("one, two")
+ to add multiple tags.
</td>
</tr>
@@ -601,6 +769,8 @@
<% } %>
</div>
+<!-- ------------------------------------------------- -->
+
<!-- Here comes the comments box -->
<div class="box1-head">
@@ -611,16 +781,24 @@
<td align="right" valign="top">
<table cellpadding="0" cellspacing="0" border="0" class="toolBarTable">
<tr>
- <td>
- <a href="/wso2registry/atom<%=details.getPath()%>;comments" target="_blank" title="Subscribe to this feed"><img border="0" src="/wso2registry/admin/images/icon-feed-small.gif" /></a>
+ <td>
+ <a href="/wso2registry/atom<%=details.getPath()%>;comments" target="_blank"
+ title="Subscribe to this feed"><img border="0"
+ src="/wso2registry/admin/images/icon-feed-small.gif"/></a>
</td>
<td>
- <% if (details.isLoggedIn() && !details.isVersionView()) { %><a href="#" onclick="showHideCommon('add-comment-div');expandIfNot('comments');"><img src="/wso2registry/admin/images/universal-add.gif" border="0" valign="top" title="Add New Comment" /></a><% } %>
+ <% if (details.isLoggedIn() && !details.isVersionView()) { %><a href="#"
+ onclick="showHideCommon('add-comment-div');expandIfNot('comments');"><img
+ src="/wso2registry/admin/images/universal-add.gif" border="0" valign="top"
+ title="Add New Comment"/></a><% } %>
</td>
<td style="padding-top:3px;">
- <a href="#" onclick="showHideCommon('commentsIconExpanded');showHideCommon('commentsIconMinimized');showHideCommon('commentsExpanded');showHideCommon('commentsMinimized');">
- <img src="/wso2registry/admin/images/icon-expanded.gif" border="0" align="top" id="commentsIconExpanded" />
- <img src="/wso2registry/admin/images/icon-minimized.gif" border="0" align="top" id="commentsIconMinimized" style="display:none;" />
+ <a href="#"
+ onclick="showHideCommon('commentsIconExpanded');showHideCommon('commentsIconMinimized');showHideCommon('commentsExpanded');showHideCommon('commentsMinimized');">
+ <img src="/wso2registry/admin/images/icon-expanded.gif" border="0" align="top"
+ id="commentsIconExpanded"/>
+ <img src="/wso2registry/admin/images/icon-minimized.gif" border="0" align="top"
+ id="commentsIconMinimized" style="display:none;"/>
</a>
</td>
</tr>
@@ -633,93 +811,120 @@
<div class="box2-mid" id="commentsMinimized" style="display:none;">
</div>
<div class="box2-mid" id="commentsExpanded">
-
<!-- START add comment box -->
<div id="add-comment-div" style="display:none;padding-bottom:10px;">
<h3>Add Comment</h3>
+
<div id="commentsReason" class="validationError" style="display: none;"></div>
<form onsubmit="return addComment('<%=details.getPath()%>');">
<textarea id="comment" name="comment" class="comment-textbox" style="width:99%"></textarea>
- <div style="margin-top:10px;"><input type="button" class="button" value="Add" onclick="addComment('<%=details.getPath()%>');" /> <input type="button" class="button" value="Cancel" onclick="showHideCommon('add-comment-div');" /></div>
+
+ <div style="margin-top:10px;"><input type="button" class="button" value="Add"
+ onclick="addComment('<%=details.getPath()%>');"/> <input type="button"
+ class="button"
+ value="Cancel"
+ onclick="showHideCommon('add-comment-div');"/>
+ </div>
</form>
</div>
- <!-- END add comment box -->
-
- <!-- START comments listing box -->
<div id="commentList">
- <%
- Iterator iComments = details.getComments().iterator();
- while (iComments.hasNext()) {
- Comment comment = (Comment) iComments.next();
- %>
- <div class="comments-header">
- <strong>Commented on </strong><%=CommonUtil.formatDate(comment.getTime())%><strong> by</strong> <a href="/wso2registry/system/people/<%=comment.getUser()%>"><%=comment.getUser()%></a>
- <div class="comments-bottom"><%=comment.getText()%></div>
- </div>
+ <%
+ Iterator iComments = details.getComments().iterator();
+ while (iComments.hasNext()) {
+ Comment comment = (Comment) iComments.next();
+ %>
+ <div class="comments-header">
+ <strong>Commented on </strong><%=CommonUtil.formatDate(comment.getTime())%><strong> by</strong> <a
+ href="/wso2registry/system/people/<%=comment.getUser()%>"><%=comment.getUser()%>
+ </a>
- <% } %>
- </div>
+ <div class="comments-bottom"><%=comment.getText()%>
+ </div>
+ </div>
- <!-- END comment listing box -->
+ <% } %>
</div>
+ <!-- END comment listing box -->
</div>
- <div class="box1-head">
- <table cellspacing="0" cellpadding="0" border="0" style="width:100%">
- <tr>
+<!-- END add comment box -->
- <td valign="top"><h2 class="sub-headding-lifecycle">Lifecycles</h2></td>
- <td align="right" valign="top">
- <table cellpadding="0" cellspacing="0" border="0" class="toolBarTable">
- <tr>
- <td>
- <a href="/wso2registry/atom<%=details.getPath()%>;comments" target="_blank" title="Subscribe to this feed"><img border="0" src="/wso2registry/admin/images/icon-feed-small.gif" /></a>
- </td>
- <td>
- <% if (details.isLoggedIn() && !details.isVersionView()) { %><a href="#" onclick="showHideCommon('add-lifecycle-div');expandIfNot('lifecycle');"><img src="/wso2registry/admin/images/universal-add.gif" border="0" valign="top" title="Assign New Lifecycle" /></a><% } %>
- </td>
- <td style="padding-top:3px;">
- <a href="#" onclick="showHideCommon('lifecycleIconExpanded');showHideCommon('lifecycleIconMinimized');showHideCommon('lifecycleExpanded');showHideCommon('lifecycleMinimized');">
- <img src="/wso2registry/admin/images/icon-expanded.gif" border="0" align="top" id="lifecycleIconExpanded" />
- <img src="/wso2registry/admin/images/icon-minimized.gif" border="0" align="top" id="lifecycleIconMinimized" style="display:none;" />
- </a>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </div>
- <div class="box2-mid" id="lifecycleMinimized" style="display:none;">
- </div>
+<div class="box1-head">
+ <table cellspacing="0" cellpadding="0" border="0" style="width:100%">
+ <tr>
+
+ <td valign="top"><h2 class="sub-headding-lifecycle">Lifecycles</h2></td>
+ <td align="right" valign="top">
+ <table cellpadding="0" cellspacing="0" border="0" class="toolBarTable">
+ <tr>
+ <td>
+ <a href="/wso2registry/atom<%=details.getPath()%>;comments" target="_blank"
+ title="Subscribe to this feed"><img border="0"
+ src="/wso2registry/admin/images/icon-feed-small.gif"/></a>
+ </td>
+ <td>
+ <% if (details.isLoggedIn() && !details.isVersionView()) { %><a href="#"
+ onclick="showHideCommon('add-lifecycle-div');expandIfNot('lifecycle');"><img
+ src="/wso2registry/admin/images/universal-add.gif" border="0" valign="top"
+ title="Assign New Lifecycle"/></a><% } %>
+ </td>
+ <td style="padding-top:3px;">
+ <a href="#"
+ onclick="showHideCommon('lifecycleIconExpanded');showHideCommon('lifecycleIconMinimized');showHideCommon('lifecycleExpanded');showHideCommon('lifecycleMinimized');">
+ <img src="/wso2registry/admin/images/icon-expanded.gif" border="0" align="top"
+ id="lifecycleIconExpanded"/>
+ <img src="/wso2registry/admin/images/icon-minimized.gif" border="0" align="top"
+ id="lifecycleIconMinimized" style="display:none;"/>
+ </a>
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ </tr>
+ </table>
+</div>
+<div class="box2-mid" id="lifecycleMinimized" style="display:none;">
+</div>
+
+<div class="box2-mid" id="lifecycleExpanded">
- <div class="box2-mid" id="lifecycleExpanded">
- <div id="add-lifecycle-div" style="display:none;padding-bottom:10px;">
+ <!-- Lifecycle add box -->
+ <div id="add-lifecycle-div" style="display:none;padding-bottom:10px;">
<h3>Assign New Lifecycle</h3>
+
<form onsubmit="return addLifecycle('<%=details.getPath()%>');">
- <input type="text" id="lifecycle" name="lifecycle" style="width:99%" />
- <div style="margin-top:10px;"><input type="button" class="button" value="Add" onclick="addLifecycle('<%=details.getPath()%>');showHideCommon('add-lifecycle-div');" /> <input type="button" class="button" value="Cancel" onclick="showHideCommon('add-lifecycle-div');" /></div>
+ <input type="text" id="lifecycle" name="lifecycle" style="width:99%"/>
+
+ <div style="margin-top:10px;"><input type="button" class="button" value="Add"
+ onclick="addLifecycle('<%=details.getPath()%>');showHideCommon('add-lifecycle-div');"/>
+ <input type="button" class="button" value="Cancel" onclick="showHideCommon('add-lifecycle-div');"/>
+ </div>
</form>
+ <!-- Lifecycle add box ends -->
- </div>
- <!-- START lifecycle listing box -->
- <div id="lifecycleList">
- <br />
+ </div>
+
+
+ <!-- START lifecycle listing box -->
+ <div id="lifecycleList">
+ <br/>
<%
- Map<String,String[]> availableActions = details.getAvailableActions();
+ Map<String, String[]> availableActions = details.getAvailableActions();
Iterator<String> iLifecycles = availableActions.keySet().iterator();
while (iLifecycles.hasNext()) {
String lifecycle = iLifecycles.next();
%>
<div class="aspects">
- <h3><%=lifecycle%></h3>
+ <h3><%=lifecycle%>
+ </h3>
<%
- String [] actions = availableActions.get(lifecycle);
+ String[] actions = availableActions.get(lifecycle);
for (String action : actions) {
String actionURL = "/wso2registry" + details.getPath() +
- ";aspect[" + lifecycle + "]:" + action;
+ ";aspect[" + lifecycle + "]:" + action;
%>
<form action="<%=actionURL%>" method="POST">
<input type="submit" name="<%=action%>">
@@ -730,124 +935,128 @@
</div>
<% } %>
- </div>
-
- <!-- END lifecycle listing box -->
-
</div>
-<!-- Start dependencies div -->
- <div class="box1-head">
- <table cellspacing="0" cellpadding="0" border="0" style="width:100%">
- <tr>
- <td valign="top"><h2 class="sub-headding-dependencies">Dependencies</h2></td>
- <td align="right" valign="top">
- <table cellpadding="0" cellspacing="0" border="0" class="toolBarTable">
- <tr>
- <td>
- <a href="/wso2registry/atom<%=details.getPath()%>;comments" target="_blank" title="Subscribe to this feed"><img border="0" src="/wso2registry/admin/images/icon-feed-small.gif" /></a>
- </td>
- <td>
- <% if (details.isLoggedIn() && !details.isVersionView()) { %><a href="#" onclick="showHideCommon('dependenciesAddDiv');expandIfNot('dependencies');"><img src="/wso2registry/admin/images/universal-add.gif" border="0" valign="top" title="Assign New Dependencies" /></a><% } %>
- </td>
- <td style="padding-top:3px;">
- <a href="#" onclick="showHideCommon('dependenciesIconExpanded');showHideCommon('dependenciesIconMinimized');showHideCommon('dependenciesExpanded');showHideCommon('dependenciesMinimized');">
- <img src="/wso2registry/admin/images/icon-expanded.gif" border="0" align="top" id="dependenciesIconExpanded" />
- <img src="/wso2registry/admin/images/icon-minimized.gif" border="0" align="top" id="dependenciesIconMinimized" style="display:none;" />
- </a>
- </td>
- </tr>
- </table>
- </td>
+ <!-- END lifecycle listing box -->
+</div>
- </tr>
- </table>
- </div>
- <div class="box2-mid" id="dependenciesMinimized" style="display:none;">
- </div>
- <div class="box2-mid" id="dependenciesExpanded">
+<!-- Start dependencies div -->
+<div class="box1-head">
+ <table cellspacing="0" cellpadding="0" border="0" style="width:100%">
+ <tr>
+ <td valign="top"><h2 class="sub-headding-dependencies">Associations</h2></td>
+ <td align="right" valign="top">
+ <table cellpadding="0" cellspacing="0" border="0" class="toolBarTable">
+ <tr>
+ <td>
+ <a href="/wso2registry/atom<%=details.getPath()%>;comments" target="_blank"
+ title="Subscribe to this feed"><img border="0"
+ src="/wso2registry/admin/images/icon-feed-small.gif"/></a>
+ </td>
+ <td>
+ <% if (details.isLoggedIn() && !details.isVersionView()) { %><a href="#"
+ onclick="showHideCommon('dependenciesAddDiv');expandIfNot('dependencies');"><img
+ src="/wso2registry/admin/images/universal-add.gif" border="0" valign="top"
+ title="Assign New Dependencies"/></a><% } %>
+ </td>
+ <td style="padding-top:3px;">
+ <a href="#"
+ onclick="showHideCommon('dependenciesIconExpanded');showHideCommon('dependenciesIconMinimized');showHideCommon('dependenciesExpanded');showHideCommon('dependenciesMinimized');">
+ <img src="/wso2registry/admin/images/icon-expanded.gif" border="0" align="top"
+ id="dependenciesIconExpanded"/>
+ <img src="/wso2registry/admin/images/icon-minimized.gif" border="0" align="top"
+ id="dependenciesIconMinimized" style="display:none;"/>
+ </a>
+ </td>
+ </tr>
+ </table>
+ </td>
- <div id="dependenciesAddDiv" style="display:none;">
- <form onsubmit="return addDependency();">
- <input type="hidden" name="resourcePath" id="resourcePath" value="<%=details.getPath()%>" />
- <table cellpadding="0" cellspacing="0" border="0" class="simple-data-table">
- <tr><th>Dependency: </th><td><input type="text" id="dependency" name="dependency" /></td></tr>
- <tr><td></td><td><input type="button" class="button" value="Add" onclick="addDependency();showHideCommon('dependenciesAddDiv');" /></td></tr>
- </table>
- </form>
- </div>
+ </tr>
+ </table>
+</div>
+<div class="box2-mid" id="dependenciesMinimized" style="display:none;">
+</div>
+<div class="box2-mid" id="dependenciesExpanded">
- <div id="dependencyDiv">
+ <div id="dependenciesAddDiv" style="display:none;">
+ <form onsubmit="return addAssociation();">
+ <input type="hidden" name="resourcePath" id="resourcePath" value="<%=details.getPath()%>"/>
+ <table cellpadding="0" cellspacing="0" border="0" class="simple-data-table">
+ <tr>
+ <th>Association Type:</th>
+ <td><input type="text" id="type" name="type"/></td>
+ </tr>
+ <tr>
+ <th>Association Path:</th>
+ <td><input type="text" id="associationPaths" name="associationPaths"/></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td><input type="button" class="button" value="Add"
+ onclick="addAssociation();showHideCommon('dependenciesAddDiv');"/></td>
+ </tr>
+ </table>
+ </form>
+ </div>
- <form>
+ <div id="associationDiv">
<%
- String[] deps = details.getDependencies();
- if(deps.length!=0){
+ List depList = details.getAssociations();
+ Iterator deps = depList.iterator();
+ if (depList.size() != 0) {
%>
- <table cellpadding="0" cellspacing="0" border="0" style="width:100%;margin-top:0px;">
- <!--tr>
- <th style="width:40%">Name</th>
- <th>Value</th>
- <th style="width:50px;">Action</th>
- </tr -->
- <%
- }
-
- for (int i=0;i<deps.length;i++) {
-
-
+ <table cellpadding="0" cellspacing="0" border="0" style="width:100%" class="data-table">
+ <tr>
+ <th>
+ Association Type
+ </th>
+ <th>
+ Association Path
+ </th>
+ </tr>
+ <%
+ while (deps.hasNext()) {
+ Association association = (Association) deps.next();
%>
-
- <%--
- <tr id="propEditPanel_<%=i%>" style="display:none;">
- <td><input id="propRPath_<%=i%>" type="hidden" value="<%=details.getPath()%>"/><input id="oldPropName_<%=i%>" type="hidden" value="<%=name%>"/><input value="<%=name%>" type="text" id="propName_<%=i%>" /></td>
- <td><input value="<%=value%>" id="propValue_<%=i%>" type="text"/></td>
- <td>
- <a href="#" onclick="showHideCommon('propViewPanel_<%=i%>');showHideCommon('propEditPanel_<%=i%>'); editProperty('<%=i%>')"><img border="0" align="top" title="Save" src="/wso2registry/admin/images/save-button.gif" id="propSaveButton_<%=i%>" /></a>
- </td>
- </tr>
- --%>
-
-
- <tr id="depViewPanel_<%=i%>">
- <td><%=deps[i]%></td>
- <td style="height:25px;">
- <%-- if (details.isPutAllowed() && !details.isVersionView()) { %>
- <a href="#" onclick="showHideCommon('depViewPanel_<%=i%>');showHideCommon('depEditPanel_<%=i%>')"><img title="Edit" border="0" align="top" src="/wso2registry/admin/images/icon-edit.gif" /></a>
- <a href="#" onclick="removeDependency('<%=deps[i]%>');" style="margin-left:5px;"><img title="Remove" border="0" align="top" src="/wso2registry/admin/images/icon-trash.gif" /></a>
- <% } --%>
- </td>
- </tr>
-
+ <tr>
+ <td>
+ <%=association.getAssociationType()%>
+ </td>
+ <td>
+ <%=association.getDestinationPath()%>
+ </td>
+ </tr>
+ <%
+ }
+ %>
+ </table>
<%
}
- if(deps.length!=0){
%>
- </table>
- <% } %>
- </form>
+
</div>
+</div>
+<!-- ------------------------------------------------- -->
- </div>
<!-- End dependencies div -->
</td>
</tr>
</table>
- <!--This is the END of main table which seperates 2 coloums for promotions and content of the site -->
-
+<!--This is the END of main table which seperates 2 coloums for promotions and content of the site -->
<!-- START footer content -->
-<jsp:include page="footer.jsp" />
+<jsp:include page="footer.jsp"/>
</div>
More information about the Registry-dev
mailing list