Diverse Kleinigkeiten.
git-svn-id: https://svn.libreccm.org/ccm/trunk@808 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
d6c1c1ae57
commit
12246decb1
|
|
@ -79,7 +79,7 @@ public class Application extends Resource {
|
||||||
private static final String SLASH = "/";
|
private static final String SLASH = "/";
|
||||||
|
|
||||||
public static final String BASE_DATA_OBJECT_TYPE =
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
"com.arsdigita.web.Application";
|
"com.arsdigita.web.Application";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getBaseDataObjectType() {
|
protected String getBaseDataObjectType() {
|
||||||
|
|
|
||||||
|
|
@ -98,26 +98,29 @@ import org.apache.log4j.Logger;
|
||||||
*/
|
*/
|
||||||
public class ApplicationFileServlet extends BaseApplicationServlet {
|
public class ApplicationFileServlet extends BaseApplicationServlet {
|
||||||
|
|
||||||
|
/** Logger instance for debugging */
|
||||||
private static Logger s_log = Logger.getLogger(ApplicationFileServlet.class);
|
private static Logger s_log = Logger.getLogger(ApplicationFileServlet.class);
|
||||||
|
|
||||||
private String m_templatePath;
|
private String m_templatePath;
|
||||||
private ApplicationFileResolver m_resolver;
|
private ApplicationFileResolver m_resolver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Servlet Standard Initializer.
|
||||||
* @param config
|
* @param config
|
||||||
* @throws ServletException
|
* @throws ServletException
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void init(ServletConfig config)
|
public void init(ServletConfig config)
|
||||||
throws ServletException {
|
throws ServletException {
|
||||||
super.init(config);
|
super.init(config);
|
||||||
|
|
||||||
|
// init-param named template-path from ~/WEB-INF/web.xml
|
||||||
m_templatePath = config.getInitParameter("template-path");
|
m_templatePath = config.getInitParameter("template-path");
|
||||||
Assert.exists(m_templatePath, String.class);
|
Assert.exists(m_templatePath, String.class);
|
||||||
Assert.isTrue(m_templatePath.startsWith("/"),
|
Assert.isTrue(m_templatePath.startsWith("/"),
|
||||||
"template-path starts with '/'");
|
"template-path starts with '/'");
|
||||||
Assert.isTrue(!m_templatePath.endsWith("/"),
|
Assert.isTrue(!m_templatePath.endsWith("/"),
|
||||||
"template-path does not end with '/'");
|
"template-path must not end with '/'");
|
||||||
|
|
||||||
|
|
||||||
String resolverName = config.getInitParameter("file-resolver");
|
String resolverName = config.getInitParameter("file-resolver");
|
||||||
|
|
|
||||||
|
|
@ -34,14 +34,22 @@ public class DefaultApplicationFileResolver implements ApplicationFileResolver {
|
||||||
private static Logger s_log =
|
private static Logger s_log =
|
||||||
Logger.getLogger(DefaultApplicationFileResolver.class);
|
Logger.getLogger(DefaultApplicationFileResolver.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param templatePath
|
||||||
|
* @param sreq
|
||||||
|
* @param sresp
|
||||||
|
* @param app
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public RequestDispatcher resolve(String templatePath,
|
public RequestDispatcher resolve(String templatePath,
|
||||||
HttpServletRequest sreq,
|
HttpServletRequest sreq,
|
||||||
HttpServletResponse sresp,
|
HttpServletResponse sresp,
|
||||||
Application app) {
|
Application app) {
|
||||||
// XXX proper list of dependent & customization webapps to search
|
// XXX proper list of dependent & customization webapps to search
|
||||||
String[] webapps = new String[] {
|
String[] webapps = new String[] {
|
||||||
app.getContextPath(), "ROOT"
|
app.getContextPath(), "ROOT"
|
||||||
};
|
};
|
||||||
String pathInfo = sreq.getPathInfo();
|
String pathInfo = sreq.getPathInfo();
|
||||||
|
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
|
|
@ -61,8 +69,8 @@ public class DefaultApplicationFileResolver implements ApplicationFileResolver {
|
||||||
}
|
}
|
||||||
|
|
||||||
RequestDispatcher rd = Web.findResourceDispatcher(
|
RequestDispatcher rd = Web.findResourceDispatcher(
|
||||||
webapps,
|
webapps,
|
||||||
path + WELCOME_FILES[i]);
|
path + WELCOME_FILES[i]);
|
||||||
if (rd != null) {
|
if (rd != null) {
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
s_log.debug("Got dispatcher " + rd);
|
s_log.debug("Got dispatcher " + rd);
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ public class Initializer extends CompoundInitializer {
|
||||||
*
|
*
|
||||||
* @param evt
|
* @param evt
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void init(DomainInitEvent evt) {
|
public void init(DomainInitEvent evt) {
|
||||||
super.init(evt);
|
super.init(evt);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,7 @@ public class Workspace extends Application {
|
||||||
* @return ServletPath (constant) probably should be synchron with web.xml
|
* @return ServletPath (constant) probably should be synchron with web.xml
|
||||||
* entry
|
* entry
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getServletPath() {
|
public String getServletPath() {
|
||||||
// return "/files";
|
// return "/files";
|
||||||
return "/ccm-ldn-portal/files";
|
return "/ccm-ldn-portal/files";
|
||||||
|
|
@ -238,6 +239,7 @@ public class Workspace extends Application {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void beforeSave() {
|
public void beforeSave() {
|
||||||
// If no permissions are configured, then setup empty groups
|
// If no permissions are configured, then setup empty groups
|
||||||
if (get(PARTY) == null) {
|
if (get(PARTY) == null) {
|
||||||
|
|
@ -261,6 +263,7 @@ public class Workspace extends Application {
|
||||||
// This method wouldn't need to exist if permissioning used
|
// This method wouldn't need to exist if permissioning used
|
||||||
// the associations rather than direct queries which require
|
// the associations rather than direct queries which require
|
||||||
// the object to be saved
|
// the object to be saved
|
||||||
|
@Override
|
||||||
public void afterSave() {
|
public void afterSave() {
|
||||||
super.afterSave();
|
super.afterSave();
|
||||||
|
|
||||||
|
|
@ -371,6 +374,7 @@ public class Workspace extends Application {
|
||||||
throw new DataObjectNotFoundException("cannot find workspace for party");
|
throw new DataObjectNotFoundException("cannot find workspace for party");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void delete() {
|
public void delete() {
|
||||||
clearPages();
|
clearPages();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
<a href="{@url}" title="{$title}">
|
<a href="{@url}" title="{$title}">
|
||||||
<img src="{$here}/{@name}.gif" border="0" alt="{$title}"/>
|
<img src="{@name}.gif" border="0" alt="{$title}"/>
|
||||||
</a>
|
</a>
|
||||||
</th>
|
</th>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
|
|
@ -151,16 +151,16 @@
|
||||||
<xsl:when test="@isSelected = 'false'">
|
<xsl:when test="@isSelected = 'false'">
|
||||||
<td class="tab-label">
|
<td class="tab-label">
|
||||||
<a href="{@moveLeftAction}">
|
<a href="{@moveLeftAction}">
|
||||||
<img src="{$here}/moveLeft.gif" border="0" style="margin-left: 5px"/>
|
<img src="moveLeft.gif" border="0" style="margin-left: 5px"/>
|
||||||
</a>
|
</a>
|
||||||
<a href="{@moveRightAction}">
|
<a href="{@moveRightAction}">
|
||||||
<img src="{$here}/moveRight.gif" border="0" style="margin-left: 5px"/>
|
<img src="moveRight.gif" border="0" style="margin-left: 5px"/>
|
||||||
</a>
|
</a>
|
||||||
<a href="{@selectAction}">
|
<a href="{@selectAction}">
|
||||||
<xsl:value-of select="title"/>
|
<xsl:value-of select="title"/>
|
||||||
</a>
|
</a>
|
||||||
<a href="{@deleteAction}" onclick="return confirm('Are you sure you want to delete this pane')">
|
<a href="{@deleteAction}" onclick="return confirm('Are you sure you want to delete this pane')">
|
||||||
<img src="{$here}/delete.gif" border="0" style="margin-left: 5px"/>
|
<img src="delete.gif" border="0" style="margin-left: 5px"/>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="tab-end"/>
|
<td class="tab-end"/>
|
||||||
|
|
@ -172,12 +172,12 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="{@moveLeftAction}">
|
<a href="{@moveLeftAction}">
|
||||||
<img src="{$here}/moveLeft.gif" border="0" style="margin-left: 5px"/>
|
<img src="moveLeft.gif" border="0" style="margin-left: 5px"/>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{@moveRightAction}">
|
<a href="{@moveRightAction}">
|
||||||
<img src="{$here}/moveRight.gif" border="0" style="margin-left: 5px"/>
|
<img src="moveRight.gif" border="0" style="margin-left: 5px"/>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
@ -185,7 +185,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{@deleteAction}" onclick="return confirm('Are you sure you want to delete this pane')">
|
<a href="{@deleteAction}" onclick="return confirm('Are you sure you want to delete this pane')">
|
||||||
<img src="{$here}/delete.gif" border="0" style="margin-left: 5px"/>
|
<img src="delete.gif" border="0" style="margin-left: 5px"/>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -197,14 +197,14 @@
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<td class="current-tab-label">
|
<td class="current-tab-label">
|
||||||
<a href="{@moveLeftAction}">
|
<a href="{@moveLeftAction}">
|
||||||
<img src="{$here}/moveLeft.gif" border="0" style="margin-left: 5px"/>
|
<img src="moveLeft.gif" border="0" style="margin-left: 5px"/>
|
||||||
</a>
|
</a>
|
||||||
<a href="{@moveRightAction}">
|
<a href="{@moveRightAction}">
|
||||||
<img src="{$here}/moveRight.gif" border="0" style="margin-left: 5px"/>
|
<img src="moveRight.gif" border="0" style="margin-left: 5px"/>
|
||||||
</a>
|
</a>
|
||||||
<xsl:value-of select="title"/>
|
<xsl:value-of select="title"/>
|
||||||
<a href="{@deleteAction}" onclick="return confirm('Are you sure you want to delete this pane')">
|
<a href="{@deleteAction}" onclick="return confirm('Are you sure you want to delete this pane')">
|
||||||
<img src="{$here}/delete.gif" border="0" style="margin-left: 5px"/>
|
<img src="delete.gif" border="0" style="margin-left: 5px"/>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="current-tab-end"/>
|
<td class="current-tab-end"/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue