mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merge V1.3 to HEAD (2976:3004)
svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@2976 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3004 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3335 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -817,11 +817,11 @@ recover_listed_items=Recover Listed Items
|
||||
recover_listed_items_info=Recover the listed files and spaces from the deleted file store
|
||||
recover_listed_items_confirm=Are you sure you want to recover the following deleted files and spaces from the deleted file store?
|
||||
recovered_item_success=The item \"{0}\" has been successfully recovered.
|
||||
recovered_item_parent=Failed to recover the item \"{0}\" as the original parent folder is missing, please select a new folder destination.
|
||||
recovered_item_parent=Failed to recover the item \"{0}\" as the parent folder is missing, please select a new folder destination.
|
||||
recovered_item_parent_short=Parent folder missing
|
||||
recovered_item_permission=Failed to recover the item \"{0}\" as you do not have the appropriate permissions to restore the item to the original parent folder, please select a new folder destination.
|
||||
recovered_item_permission=Failed to recover the item \"{0}\" as you do not have the appropriate permissions to restore the item to the parent folder, please select a new folder destination.
|
||||
recovered_item_permission_short=No permissions to write
|
||||
recovered_item_integrity=Failed to recover the item \"{0}\" as there is now an item in the original parent folder with the same name, please select a new folder destination.
|
||||
recovered_item_integrity=Failed to recover the item \"{0}\" as there is now an item in the parent folder with the same name, please select a new folder destination.
|
||||
recovered_item_integrity_short=Item with same name exists
|
||||
recovered_item_failure=Failed to recover the item \"{0}\" due to error: {1}
|
||||
recovered_item_failure_short=Failed
|
||||
|
@@ -129,9 +129,9 @@
|
||||
</config>
|
||||
|
||||
<config evaluator="string-compare" condition="Command Servlet">
|
||||
<!-- The list registed servlet command processors -->
|
||||
<!-- The list of registered servlet command processors -->
|
||||
<!-- Command processors implement org.alfresco.web.app.servlet.command.CommandProcessor -->
|
||||
<!-- They are registered against a name and all calls to the command servlet -->
|
||||
<!-- They register a class impl against a unique name. All calls to the command servlet -->
|
||||
<!-- which match the name are forwared to the class instance -->
|
||||
<command-servlet>
|
||||
<command-processor name="workflow" class="org.alfresco.web.app.servlet.command.WorkflowCommandProcessor" />
|
||||
|
@@ -47,7 +47,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
* The 'processor-name' identifies the command processor to execute the command. For example the
|
||||
* 'workflow' processor will execute workflow commands upon a node (e.g. "approve" or "reject").
|
||||
* For example:
|
||||
* <pre>/alfresco/command/workflow/approve/workspace/SpacesStore/0000-0000-0000-0000
|
||||
* <pre>/alfresco/command/workflow/approve/workspace/SpacesStore/0000-0000-0000-0000</pre>
|
||||
* The store protocol, followed by the store ID, followed by the content Node Id used to
|
||||
* identify the node to execute the workflow action upon.
|
||||
* <p>
|
||||
|
128
source/java/org/alfresco/web/bean/LicenseBean.java
Normal file
128
source/java/org/alfresco/web/bean/LicenseBean.java
Normal file
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* Copyright (C) 2005 Alfresco, Inc.
|
||||
*
|
||||
* Licensed under the Alfresco Network License. You may obtain a
|
||||
* copy of the License at
|
||||
*
|
||||
* http://www.alfrescosoftware.com/legal/
|
||||
*
|
||||
* Please view the license relevant to your network subscription.
|
||||
*
|
||||
* BY CLICKING THE "I UNDERSTAND AND ACCEPT" BOX, OR INSTALLING,
|
||||
* READING OR USING ALFRESCO'S Network SOFTWARE (THE "SOFTWARE"),
|
||||
* YOU ARE AGREEING ON BEHALF OF THE ENTITY LICENSING THE SOFTWARE
|
||||
* ("COMPANY") THAT COMPANY WILL BE BOUND BY AND IS BECOMING A PARTY TO
|
||||
* THIS ALFRESCO NETWORK AGREEMENT ("AGREEMENT") AND THAT YOU HAVE THE
|
||||
* AUTHORITY TO BIND COMPANY. IF COMPANY DOES NOT AGREE TO ALL OF THE
|
||||
* TERMS OF THIS AGREEMENT, DO NOT SELECT THE "I UNDERSTAND AND AGREE"
|
||||
* BOX AND DO NOT INSTALL THE SOFTWARE OR VIEW THE SOURCE CODE. COMPANY
|
||||
* HAS NOT BECOME A LICENSEE OF, AND IS NOT AUTHORIZED TO USE THE
|
||||
* SOFTWARE UNLESS AND UNTIL IT HAS AGREED TO BE BOUND BY THESE LICENSE
|
||||
* TERMS. THE "EFFECTIVE DATE" FOR THIS AGREEMENT SHALL BE THE DAY YOU
|
||||
* CHECK THE "I UNDERSTAND AND ACCEPT" BOX.
|
||||
*/
|
||||
package org.alfresco.web.bean;
|
||||
|
||||
import java.security.Principal;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.service.descriptor.DescriptorService;
|
||||
import org.alfresco.service.license.LicenseDescriptor;
|
||||
import org.alfresco.web.app.Application;
|
||||
|
||||
/**
|
||||
* Backing Bean for the License Management pages.
|
||||
*
|
||||
* @author David Caruana
|
||||
*/
|
||||
public class LicenseBean
|
||||
{
|
||||
|
||||
/** The DescriptorService to be used by the bean */
|
||||
private DescriptorService descriptorService;
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Bean property getters and setters
|
||||
|
||||
/**
|
||||
* @param descriptorService The DescriptorService to set.
|
||||
*/
|
||||
public void setDescriptorService(DescriptorService descriptorService)
|
||||
{
|
||||
this.descriptorService = descriptorService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the License Description
|
||||
*
|
||||
* @return license description
|
||||
*/
|
||||
public String getLicenseDescription()
|
||||
{
|
||||
String description = "";
|
||||
|
||||
LicenseDescriptor descriptor = descriptorService.getLicenseDescriptor();
|
||||
if (descriptor != null)
|
||||
{
|
||||
String subject = descriptor.getSubject();
|
||||
String holder = getHolderOrganisation(descriptor.getHolder());
|
||||
Date issued = descriptor.getIssued();
|
||||
Date validUntil = descriptor.getValidUntil();
|
||||
|
||||
if (validUntil == null)
|
||||
{
|
||||
description = Application.getMessage(FacesContext.getCurrentInstance(), "admin_unlimited_license");
|
||||
description = MessageFormat.format(description, new Object[] { subject, holder, issued });
|
||||
}
|
||||
else
|
||||
{
|
||||
int days = descriptor.getDays();
|
||||
int remainingDays = descriptor.getRemainingDays();
|
||||
description = Application.getMessage(FacesContext.getCurrentInstance(), "admin_limited_license");
|
||||
description = MessageFormat.format(description, new Object[] { subject, holder, issued, days, validUntil, remainingDays });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
description = Application.getMessage(FacesContext.getCurrentInstance(), "admin_invalid_license");
|
||||
}
|
||||
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Organisation from Principal
|
||||
*
|
||||
* @param holderPrincipal
|
||||
* @return organisation
|
||||
*/
|
||||
private String getHolderOrganisation(Principal holderPrincipal)
|
||||
{
|
||||
String holder = null;
|
||||
if (holderPrincipal != null)
|
||||
{
|
||||
holder = holderPrincipal.getName();
|
||||
if (holder != null)
|
||||
{
|
||||
String[] properties = holder.split(",");
|
||||
for (String property : properties)
|
||||
{
|
||||
String[] parts = property.split("=");
|
||||
if (parts[0].equals("O"))
|
||||
{
|
||||
holder = parts[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return holder;
|
||||
}
|
||||
|
||||
}
|
@@ -61,6 +61,8 @@ import org.alfresco.web.ui.common.component.UIModeList;
|
||||
import org.alfresco.web.ui.common.component.data.UIRichList;
|
||||
|
||||
/**
|
||||
* Backing bean for the Manage Deleted Items (soft delete and archiving) pages.
|
||||
*
|
||||
* @author Kevin Roast
|
||||
*/
|
||||
public class TrashcanBean implements IContextListener
|
||||
|
@@ -14,6 +14,7 @@ import org.alfresco.service.cmr.action.Action;
|
||||
import org.alfresco.service.cmr.action.ActionDefinition;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.data.IDataContainer;
|
||||
import org.alfresco.web.data.QuickSort;
|
||||
@@ -89,7 +90,19 @@ public class RunActionWizard extends BaseActionWizard
|
||||
{
|
||||
// reset the current document properties/aspects in case we have changed them
|
||||
// during the execution of the custom action
|
||||
this.browseBean.getDocument().reset();
|
||||
Node document = this.browseBean.getDocument();
|
||||
if (document != null)
|
||||
{
|
||||
document.reset();
|
||||
}
|
||||
|
||||
// reset the current space properties/aspects as well in case we have
|
||||
// changed them during the execution of the custom action
|
||||
Node space = this.browseBean.getActionSpace();
|
||||
if (space != null)
|
||||
{
|
||||
space.reset();
|
||||
}
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
@@ -3,12 +3,17 @@ package org.alfresco.web.bean.content;
|
||||
import java.io.File;
|
||||
import java.io.Serializable;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.event.ActionEvent;
|
||||
|
||||
import org.alfresco.config.Config;
|
||||
import org.alfresco.config.ConfigElement;
|
||||
import org.alfresco.config.ConfigService;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.repo.content.filestore.FileContentReader;
|
||||
@@ -26,6 +31,7 @@ import org.alfresco.web.bean.repository.Repository;
|
||||
*/
|
||||
public class AddContentDialog extends BaseContentWizard
|
||||
{
|
||||
protected List<String> inlineEditableMimeTypes;
|
||||
protected File file;
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
@@ -54,6 +60,15 @@ public class AddContentDialog extends BaseContentWizard
|
||||
this.title = this.fileName;
|
||||
}
|
||||
|
||||
// determine whether inline editing should be enabled by default.
|
||||
// if the mime type of the added file is in the list of mime types
|
||||
// configured in "Content Wizards" then enable inline editing
|
||||
List<String> mimeTypes = getInlineEditableMimeTypes();
|
||||
if (mimeTypes.contains(this.mimeType))
|
||||
{
|
||||
this.inlineEdit = true;
|
||||
}
|
||||
|
||||
saveContent(this.file, null);
|
||||
|
||||
// return default outcome
|
||||
@@ -71,6 +86,8 @@ public class AddContentDialog extends BaseContentWizard
|
||||
@Override
|
||||
protected String doPostCommitProcessing(FacesContext context, String outcome)
|
||||
{
|
||||
clearUpload();
|
||||
|
||||
// as we were successful, go to the set properties dialog if asked
|
||||
// to otherwise just return
|
||||
if (this.showOtherProperties)
|
||||
@@ -214,4 +231,30 @@ public class AddContentDialog extends BaseContentWizard
|
||||
FacesContext ctx = FacesContext.getCurrentInstance();
|
||||
ctx.getExternalContext().getSessionMap().remove(FileUploadBean.FILE_UPLOAD_BEAN_NAME);
|
||||
}
|
||||
|
||||
protected List<String> getInlineEditableMimeTypes()
|
||||
{
|
||||
if (this.inlineEditableMimeTypes == null)
|
||||
{
|
||||
this.inlineEditableMimeTypes = new ArrayList<String>(8);
|
||||
|
||||
// get the create mime types list from the config
|
||||
ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance());
|
||||
Config wizardCfg = svc.getConfig("Content Wizards");
|
||||
if (wizardCfg != null)
|
||||
{
|
||||
ConfigElement typesCfg = wizardCfg.getConfigElement("create-mime-types");
|
||||
if (typesCfg != null)
|
||||
{
|
||||
for (ConfigElement child : typesCfg.getChildren())
|
||||
{
|
||||
String currentMimeType = child.getAttribute("name");
|
||||
this.inlineEditableMimeTypes.add(currentMimeType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return this.inlineEditableMimeTypes;
|
||||
}
|
||||
}
|
||||
|
@@ -16,9 +16,10 @@
|
||||
*/
|
||||
package org.alfresco.web.config;
|
||||
|
||||
import java.util.Set;
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.config.evaluator.Evaluator;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
@@ -28,7 +29,7 @@ import org.alfresco.web.bean.repository.Repository;
|
||||
*
|
||||
* @author gavinc
|
||||
*/
|
||||
public class AspectEvaluator implements Evaluator
|
||||
public final class AspectEvaluator implements Evaluator
|
||||
{
|
||||
/**
|
||||
* Determines whether the given aspect is applied to the given object
|
||||
@@ -37,19 +38,19 @@ public class AspectEvaluator implements Evaluator
|
||||
*/
|
||||
public boolean applies(Object obj, String condition)
|
||||
{
|
||||
boolean result = false;
|
||||
|
||||
if (obj instanceof Node)
|
||||
{
|
||||
Set aspects = ((Node)obj).getAspects();
|
||||
if (aspects != null)
|
||||
DictionaryService dd = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getDictionaryService();
|
||||
QName aspectQName = Repository.resolveToQName(condition);
|
||||
for (QName aspect : ((Node)obj).getAspects())
|
||||
{
|
||||
QName spaceQName = Repository.resolveToQName(condition);
|
||||
result = aspects.contains(spaceQName);
|
||||
if (dd.isSubClass(aspect, aspectQName) == true)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -47,19 +47,9 @@ public class PageTag extends TagSupport
|
||||
*/
|
||||
|
||||
private final static String ALF_URL = "http://www.alfresco.com";
|
||||
private final static String ALF_LOGO = "http://www.alfresco.com/images/alfresco_community_horizont.gif";
|
||||
private final static String SF_LOGO = "/images/logo/sflogo.php.png";
|
||||
private final static String ALF_TEXT = "Alfresco Community";
|
||||
private final static String ALF_COPY = "Supplied free of charge with " +
|
||||
"<a class=footer href='http://www.alfresco.com/services/support/communityterms/#support'>no support</a>, " +
|
||||
"<a class=footer href='http://www.alfresco.com/services/support/communityterms/#certification'>no certification</a>, " +
|
||||
"<a class=footer href='http://www.alfresco.com/services/support/communityterms/#maintenance'>no maintenance</a>, " +
|
||||
"<a class=footer href='http://www.alfresco.com/services/support/communityterms/#warranty'>no warranty</a> and " +
|
||||
"<a class=footer href='http://www.alfresco.com/services/support/communityterms/#indemnity'>no indemnity</a> by " +
|
||||
"<a class=footer href='http://www.alfresco.com'>Alfresco</a> or its " +
|
||||
"<a class=footer href='http://www.alfresco.com/partners/'>Certified Partners</a>. " +
|
||||
"<a class=footer href='http://www.alfresco.com/services/support/'>Click here for support</a>. " +
|
||||
"Alfresco Software Inc. © 2005-2006 All rights reserved.";
|
||||
private final static String ALF_LOGO = "/images/logo/alfresco_enterprise.gif";
|
||||
private final static String ALF_TEXT = "Alfresco Enterprise";
|
||||
private final static String ALF_COPY = "Certified and supported. Alfresco Software Inc. © 2005-2006 All rights reserved.";
|
||||
|
||||
private static Log logger = LogFactory.getLog(PageTag.class);
|
||||
private static String alfresco = null;
|
||||
@@ -211,11 +201,10 @@ public class PageTag extends TagSupport
|
||||
String reqPath = ((HttpServletRequest)pageContext.getRequest()).getContextPath();
|
||||
alfresco = "<center><table><tr><td>" +
|
||||
"<a href='" + ALF_URL + "'>" +
|
||||
"<img border=0 alt='' title='" + ALF_TEXT + "' align=absmiddle src='" + ALF_LOGO + "'>" +
|
||||
"<img border=0 alt='' title='" + ALF_TEXT + "' align=absmiddle src='" + reqPath + ALF_LOGO + "'>" +
|
||||
"</a></td><td align=center>" +
|
||||
"<span class=footer>" + ALF_COPY +
|
||||
"</span></td><td><a href='http://sourceforge.net/projects/alfresco'><img border=0 alt='' title='SourceForge' align=absmiddle src='" +
|
||||
reqPath + SF_LOGO + "'></a>" +
|
||||
"</span></td><td>" +
|
||||
"</td></tr></table></center>";
|
||||
}
|
||||
|
||||
|
24
source/web/WEB-INF/faces-config-enterprise.xml
Normal file
24
source/web/WEB-INF/faces-config-enterprise.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
|
||||
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
|
||||
<faces-config>
|
||||
|
||||
<!-- ==================== MANAGED BEANS ==================== -->
|
||||
|
||||
<managed-bean>
|
||||
<description>
|
||||
The bean that holds state for the License Manager.
|
||||
</description>
|
||||
<managed-bean-name>LicenseBean</managed-bean-name>
|
||||
<managed-bean-class>org.alfresco.web.bean.LicenseBean</managed-bean-class>
|
||||
<managed-bean-scope>session</managed-bean-scope>
|
||||
<managed-property>
|
||||
<property-name>descriptorService</property-name>
|
||||
<value>#{DescriptorService}</value>
|
||||
</managed-property>
|
||||
</managed-bean>
|
||||
|
||||
|
||||
<!-- ==================== NAVIGATION RULES==================== -->
|
||||
|
||||
</faces-config>
|
@@ -16,7 +16,7 @@
|
||||
|
||||
<context-param>
|
||||
<param-name>javax.faces.CONFIG_FILES</param-name>
|
||||
<param-value>/WEB-INF/faces-config-app.xml,/WEB-INF/faces-config-beans.xml,/WEB-INF/faces-config-navigation.xml,/WEB-INF/faces-config-common.xml,/WEB-INF/faces-config-repo.xml,WEB-INF/faces-config-custom.xml</param-value>
|
||||
<param-value>/WEB-INF/faces-config-app.xml,/WEB-INF/faces-config-beans.xml,/WEB-INF/faces-config-navigation.xml,/WEB-INF/faces-config-common.xml,/WEB-INF/faces-config-repo.xml,WEB-INF/faces-config-custom.xml,/WEB-INF/faces-config-enterprise.xml</param-value>
|
||||
</context-param>
|
||||
|
||||
<context-param>
|
||||
|
@@ -126,6 +126,9 @@
|
||||
<tr>
|
||||
<td><a:actionLink value="#{msg.node_browser}" image="/images/icons/node_browser.gif" action="dialog:showNodeBrowser" styleClass="title" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h:outputText value="#{LicenseBean.licenseDescription}" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "ballongrey"); %>
|
||||
|
||||
|
Reference in New Issue
Block a user