index_005fhead_jsp.java
11.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.day.crx.CRXRepository
* com.day.crx.License
* com.day.crx.i18n.Dictionary
* javax.jcr.Repository
* javax.jcr.Session
* javax.jcr.Workspace
* javax.servlet.Servlet
* javax.servlet.ServletConfig
* javax.servlet.ServletContext
* javax.servlet.ServletException
* javax.servlet.ServletRequest
* javax.servlet.ServletResponse
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* javax.servlet.jsp.JspFactory
* javax.servlet.jsp.JspWriter
* javax.servlet.jsp.PageContext
* javax.servlet.jsp.SkipPageException
* org.apache.commons.lang3.StringEscapeUtils
* org.apache.jasper.runtime.HttpJspBase
* org.apache.jasper.runtime.JspSourceDependent
*/
package com.day.crx.explorer.impl.jsp;
import com.day.crx.CRXRepository;
import com.day.crx.License;
import com.day.crx.explorer.impl.j2ee.CRXContext;
import com.day.crx.explorer.impl.j2ee.JCRExplorerServlet;
import com.day.crx.explorer.impl.ui.NodeBrowse;
import com.day.crx.i18n.Dictionary;
import java.io.IOException;
import java.util.List;
import javax.jcr.Repository;
import javax.jcr.Session;
import javax.jcr.Workspace;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.JspFactory;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.SkipPageException;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.jasper.runtime.HttpJspBase;
import org.apache.jasper.runtime.JspSourceDependent;
public final class index_005fhead_jsp
extends HttpJspBase
implements JspSourceDependent {
private static List _jspx_dependants;
public Object getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
JspWriter out = null;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
try {
Session repSession;
String pageName;
Dictionary dict;
String docroot;
boolean licensed;
CRXContext ctx;
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html");
_jspx_page_context = pageContext = _jspxFactory.getPageContext((Servlet)this, (ServletRequest)request, (ServletResponse)response, null, false, 8192, true);
pageContext.getServletContext();
pageContext.getServletConfig();
_jspx_out = out = pageContext.getOut();
response.setContentType("text/html; charset=utf-8");
pageName = (String)request.getAttribute("crx.explorer.pageName");
ctx = null;
repSession = null;
try {
ctx = CRXContext.getInstance(pageContext, request);
dict = ctx.getCurrentDictionary();
docroot = ctx.getDocroot();
pageName = (String)request.getAttribute("crx.explorer.pageName");
repSession = ctx.getSession();
}
catch (Exception v0) {
dict = Dictionary.getCurrent();
docroot = JCRExplorerServlet.getDocrootPrefix(request);
}
licensed = true;
if (ctx != null && ctx.getRepository() instanceof CRXRepository) {
try {
licensed = ((CRXRepository)ctx.getRepository()).getLicense() != null;
}
catch (Exception v1) {}
}
String usersPath = ctx.getUsersPath();
String groupsPath = ctx.getGroupsPath();
out.write("<head>\n <title>");
out.print(dict.fmt("crex.crx_0.tit", (Object)JCRExplorerServlet.getProductVersion()));
out.write("</title>\n <script type=\"text/javascript\" src=\"");
out.print(docroot);
out.write("/crx_main_files/admin.js\"></script>\n <script type=\"text/javascript\" src=\"");
out.print(docroot);
out.write("/ui/util.js\"></script>\n <link href=\"");
out.print(docroot);
out.write("/crx_main_files/admin.css\" type=\"text/css\" rel=\"stylesheet\">\n <script type=\"text/javascript\">\n function openBrowser() {\n var win = window.open(\"browser/index.jsp\", \"browser_window\", \"menubar=no,resizable=yes,status=yes\");\n win.focus();\n }\n\n function openNTAdmin() {\n var win = window.open(\"nodetypes/index.jsp\", \"ntadmin_window\", \"menubar=no,resizable=yes,status=yes\");\n win.focus();\n }\n\n function openUserAdmin() {\n var uri = \"");
out.print(docroot);
out.write("/ui/usereditor.jsp\";\n uri+= \"?ck=\" + new Date().valueOf();\n uri+= \"&Path=\" + escape(\"");
out.print(usersPath);
out.write("\");\n var win = window.open(uri, \"userAdministration\" , \"scroll=yes, height=550, width=690, resizable=no, status=no\");\n win.focus();\n }\n function openGroupAdmin() {\n var uri = \"");
out.print(docroot);
out.write("/ui/usereditor.jsp\";\n uri+= \"?ck=\" + new Date().valueOf();\n uri+= \"&Path=\" + escape(\"");
out.print(groupsPath);
out.write("\");\n var win = window.open(uri, \"groupAdministration\" , \"scroll=yes, height=550, width=690, resizable=no, status=no\");\n win.focus();\n }\n\n function openPrincipalAdmin() {\n var uri = \"");
out.print(docroot);
out.write("/ui/principal_administration.jsp\";\n uri+= \"?ck=\" + new Date().valueOf();\n var win = window.open(uri, \"principalAdministration\" , \"scroll=yes, height=550, width=690, resizable=no, status=no\");\n win.focus();\n }\n\n function openAccessControlEditor() {\n var uri = \"");
out.print(docroot);
out.write("/ui/aceditor.jsp\";\n uri+= \"?ck=\" + new Date().valueOf();\n uri+= \"&Path=/\";\n var win = window.open(uri, \"acEditor\" , \"scroll=yes, height=910, width=800, resizable=yes, status=no\");\n win.focus();\n }\n </script>\n");
String head_userId = repSession == null ? null : repSession.getUserID();
String wspName = repSession == null ? "--not logged in--" : repSession.getWorkspace().getName();
NodeBrowse.init(pageContext);
out.write("</head>\n<body>\n<center>\n<table id=maintable cellSpacing=0 cellPadding=0 align=center border=0>\n <tbody>\n <tr>\n <td class=toolcell colSpan=2> <A href=\"http://www.adobe.com/\" target=_blank>www.adobe.com</A> </td></tr>\n <tr>\n <td class=bannercell colspan=2><SPAN class=leadcelltext>");
out.print(dict.fmt("crex.crx_0.tit", (Object)JCRExplorerServlet.getProductVersion()));
out.write("<br>");
out.print(dict.msg("crex.crx.des"));
out.write("</SPAN></TD>\n <tr>\n <td id=technavcell colSpan=2>\n <div id=technav>\n ");
if (pageName.equals("main")) {
out.write("<span class=\"technavat\">");
out.print(dict.msg("crex.main_console.lab"));
out.write("</span>");
} else {
out.write("<a href=\"");
out.print(docroot);
out.write("/index.jsp\">");
out.print(dict.msg("crex.main_console.lab"));
out.write("</a>");
}
if (pageName.equals("config")) {
out.write("<span class=\"technavat\">");
out.print(dict.msg("crex.rep_config.lab"));
out.write("</span>");
} else {
out.write("<a href=\"");
out.print(docroot);
out.write("/config/index.jsp\">");
out.print(dict.msg("crex.rep_config.lab"));
out.write("</a>");
}
out.write("</DIV></TD></TR>\n <TR>\n <TD class=techcontentcell valign=top>\n ");
if (!licensed) {
out.write("<b style=\"color: red\"><br/>No valid CRX license configured. Check config of License Module or click <a href=\"");
out.print(docroot);
out.write("/apps/crx-launchpad/license.jsp?\">here</a> to enter serial number.</b><br/>");
}
out.write("<table class=content cellSpacing=0 cellPadding=0>\n <tbody>\n ");
if (ctx != null) {
out.write("<TR class=content>\n <TH class=content colSpan=2>");
out.print(dict.fmt("crex.userid_0.lab", (Object)StringEscapeUtils.escapeHtml4((String)head_userId)));
out.write(32);
out.write(124);
out.write(32);
out.print(dict.fmt("crex.workspace_0.lab", (Object)StringEscapeUtils.escapeHtml4((String)wspName)));
if ("anonymous".equals(head_userId) || head_userId == null) {
out.write("\n | <a href=\"");
out.print(docroot);
out.write("/login.jsp\">");
out.print(dict.msg("crex.login.btn"));
out.write("</a>\n\t");
} else {
out.write("\n\t| <a href=\"");
out.print(docroot);
out.write("/logout.jsp\">");
out.print(dict.msg("crex.logout.btn"));
out.write("</a>\n | <a href=\"");
out.print(docroot);
out.write("/login.jsp\">");
out.print(dict.msg("crex.switch_workspace.btn"));
out.write("</a>\n | <a href=\"");
out.print(docroot);
out.write("/impersonate.jsp\">Impersonate</a>\n\t");
}
out.write("</TH></TR>");
}
}
catch (Throwable t) {
if (!(t instanceof SkipPageException)) {
out = _jspx_out;
if (out != null && out.getBufferSize() != 0) {
out.clearBuffer();
}
if (_jspx_page_context != null) {
_jspx_page_context.handlePageException(t);
}
}
}
}
finally {
if (_jspxFactory != null) {
_jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
}