mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.1 to HEAD
6535: adding in handlers for renames and deletes of webforms to update web project configurations. 6536: fix to monthpicker. 6537: Cluster sample config for ticketsCache defaults to replicating puts 6538: Invite web users wizard was not correctly initialising 6539: AWC-1474 - Email Space Users dialog - if no email recipients then show message 6540: Fixed remote classpath check for SDK projects 6541: AR-1544: Inbound Rules Being Fired on Name Property Update 6542: Fix for AWC-1216 - changed NavigationBean to spot when CIFS server is disabled (as the method has changed in repo) 6543: AR-1623: WebServices authentication errors during concurrent load test 6544: AWC-1253: AddContent action should be externally configurable/overridable 6545: Fixed AR-1586: Nicer message when installing older module or duplicate module 6546: AWC-1301: Access Denied viewing details of content with association 6547: AWC-1499: It is impossible to remove 'Complianceable' aspect with the help of Run action 6548: Missing file ... should fix build issues 6549: Missed file .. fixed build issue 6550: AWC-1092: sorting by version number in version history is alpha, not numeric 6551: AWC-1217: Cannot differentiate between two users with same name in user picker search results 6552: Fixed AR-1572: Export of ML-enabled documents can now be imported 6553: Removed tabs 6554: Fixed handling of SC_NOT_FOUND message 6555: Fixed AR-1627: Removed ability to flush transaction resources on demand git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6744 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -673,6 +673,7 @@ apply_rss_feed_warning1=This Space must be visible to the Guest user for the RSS
|
||||
apply_rss_feed_warning2=view.
|
||||
rss_feed=RSS Feed
|
||||
rss_feed_link=RSS Feed Link
|
||||
warn_cannot_view_target_details=Cannot view details of the target document as you do not have the required permissions.
|
||||
|
||||
# Export messages
|
||||
export_info=Exports metadata and content from this or all Spaces.
|
||||
@@ -785,6 +786,7 @@ create_form_form_details_step1_desc=Select XML schema to use
|
||||
create_form_form_details_step2_desc=Specify details for new form.
|
||||
create_form_form_details_no_elements_in_schema=This schema does not contain any element declarations. A schema must contain at least one element declaration in order to generate a form.
|
||||
create_form_form_details_no_schema_selected=<no schema selected>
|
||||
create_form_form_details_associated_web_projects=This form is currently configured for the following web projects:
|
||||
create_form_configure_rendering_engine_templates_title=Configure Templates
|
||||
create_form_configure_rendering_engine_templates_step_title=Step Two - Configure Templates
|
||||
create_form_configure_rendering_engine_templates_desc=Enter information about the rendering engine templates you want to use for form {0}.
|
||||
@@ -1416,6 +1418,7 @@ delete_op_contents=Files and folders within this space.
|
||||
# Email users dialog
|
||||
email_space_users=Email Space users
|
||||
email_space_users_desc=Send an email to the users and groups assigned to this space.
|
||||
email_space_users_no_recipients=There are no users or groups assigned to this space, press Cancel to exit the dialog.
|
||||
|
||||
# Workflow messages
|
||||
doc_not_in_simple_workflow=This document is not part of a simple workflow.
|
||||
|
@@ -267,6 +267,9 @@
|
||||
<constructor-arg>
|
||||
<ref bean="SearchService" />
|
||||
</constructor-arg>
|
||||
<constructor-arg>
|
||||
<ref bean="policyComponent" />
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
|
||||
<!-- NOTE: This references a bean in the repository Spring configuration -->
|
||||
|
@@ -339,6 +339,18 @@
|
||||
<action-listener>#{ClipboardBean.pasteAll}</action-listener>
|
||||
</action>
|
||||
|
||||
<!-- Add content -->
|
||||
|
||||
<action id="add_adm_content">
|
||||
<permissions>
|
||||
<permission allow="true">CreateChildren</permission>
|
||||
</permissions>
|
||||
<label-id>add_content</label-id>
|
||||
<image>/images/icons/add.gif</image>
|
||||
<action>dialog:addContent</action>
|
||||
<action-listener>#{AddContentDialog.start}</action-listener>
|
||||
</action>
|
||||
|
||||
<!-- Create content -->
|
||||
<action id="create_content">
|
||||
<permissions>
|
||||
@@ -649,6 +661,12 @@
|
||||
<!-- the component is responsible for making the context Node object available with name
|
||||
of 'actionContext' so the actions can access it directly to get properties -->
|
||||
|
||||
<!-- Action for adding content - quick upload -->
|
||||
<action-group id="add_content_menu">
|
||||
<style>white-space:nowrap</style>
|
||||
<action idref="add_adm_content" />
|
||||
</action-group>
|
||||
|
||||
<!-- Actions for a document in the Browse screen -->
|
||||
<action-group id="document_browse">
|
||||
<show-link>false</show-link>
|
||||
|
@@ -35,6 +35,7 @@ import javax.faces.event.ActionEvent;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.filesys.CIFSServer;
|
||||
import org.alfresco.filesys.server.config.ServerConfiguration;
|
||||
import org.alfresco.filesys.server.filesys.DiskSharedDevice;
|
||||
import org.alfresco.filesys.smb.server.repo.ContentContext;
|
||||
import org.alfresco.filesys.smb.server.repo.ContentDiskInterface;
|
||||
@@ -67,6 +68,7 @@ import org.alfresco.web.ui.common.component.UIModeList;
|
||||
import org.alfresco.web.ui.repo.component.IRepoBreadcrumbHandler;
|
||||
import org.alfresco.web.ui.repo.component.shelf.UIShelf;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.web.jsf.FacesContextUtils;
|
||||
|
||||
/**
|
||||
* Bean providing access and management of the various global navigation mechanisms
|
||||
@@ -587,23 +589,27 @@ public class NavigationBean
|
||||
Path path = node.getNodePath();
|
||||
|
||||
// resolve CIFS network folder location for this node
|
||||
DiskSharedDevice diskShare = cifsServer.getConfiguration().getPrimaryFilesystem();
|
||||
|
||||
if (diskShare != null && diskShare.getContext() instanceof ContentContext)
|
||||
ServerConfiguration fileServiceConfig = (ServerConfiguration)FacesContextUtils.getRequiredWebApplicationContext(
|
||||
FacesContext.getCurrentInstance()).getBean("fileServerConfiguration");
|
||||
if (fileServiceConfig.isSMBServerEnabled())
|
||||
{
|
||||
ContentContext contentCtx = (ContentContext) diskShare.getContext();
|
||||
NodeRef rootNode = contentCtx.getRootNode();
|
||||
try
|
||||
DiskSharedDevice diskShare = cifsServer.getConfiguration().getPrimaryFilesystem();
|
||||
if (diskShare != null && diskShare.getContext() instanceof ContentContext)
|
||||
{
|
||||
String cifsPath = Repository.getNamePath(this.nodeService, path, rootNode, "\\", "file:///" + getCIFSServerPath(diskShare));
|
||||
ContentContext contentCtx = (ContentContext) diskShare.getContext();
|
||||
NodeRef rootNode = contentCtx.getRootNode();
|
||||
try
|
||||
{
|
||||
String cifsPath = Repository.getNamePath(this.nodeService, path, rootNode, "\\", "file:///" + getCIFSServerPath(diskShare));
|
||||
|
||||
node.getProperties().put("cifsPath", cifsPath);
|
||||
node.getProperties().put("cifsPathLabel", cifsPath.substring(8)); // strip file:/// part
|
||||
}
|
||||
catch(AccessDeniedException ade)
|
||||
{
|
||||
node.getProperties().put("cifsPath", "");
|
||||
node.getProperties().put("cifsPathLabel",""); // strip file:/// part
|
||||
node.getProperties().put("cifsPath", cifsPath);
|
||||
node.getProperties().put("cifsPathLabel", cifsPath.substring(8)); // strip file:/// part
|
||||
}
|
||||
catch(AccessDeniedException ade)
|
||||
{
|
||||
node.getProperties().put("cifsPath", "");
|
||||
node.getProperties().put("cifsPathLabel",""); // strip file:/// part
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -19,7 +19,8 @@
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing" */
|
||||
* http://www.alfresco.com/legal/licensing
|
||||
*/
|
||||
package org.alfresco.web.bean.wcm;
|
||||
|
||||
import java.io.File;
|
||||
@@ -685,6 +686,11 @@ public class CreateFormWizard
|
||||
return false;
|
||||
}
|
||||
|
||||
public List<WebProject> getAssociatedWebProjects()
|
||||
{
|
||||
return Collections.<WebProject>emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the properties for current configured output methods JSF DataModel
|
||||
*
|
||||
|
@@ -51,14 +51,12 @@ import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.service.cmr.security.PersonService;
|
||||
import org.alfresco.service.cmr.workflow.WorkflowDefinition;
|
||||
import org.alfresco.service.cmr.workflow.WorkflowService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.DNSNameMangler;
|
||||
import org.alfresco.web.app.AlfrescoNavigationHandler;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.bean.wizard.BaseWizardBean;
|
||||
import org.alfresco.web.bean.wizard.InviteUsersWizard.UserGroupRole;
|
||||
import org.alfresco.web.forms.Form;
|
||||
@@ -86,7 +84,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
||||
|
||||
private static final String WEBAPP_DEFAULT = "ROOT";
|
||||
|
||||
protected final static Log LOGGER = LogFactory.getLog(CreateWebsiteWizard.class);
|
||||
protected final static Log logger = LogFactory.getLog(CreateWebsiteWizard.class);
|
||||
|
||||
protected boolean editMode = false;
|
||||
protected String dnsName;
|
||||
@@ -171,8 +169,8 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
||||
WCMAppModel.TYPE_AVMWEBFOLDER);
|
||||
NodeRef nodeRef = fileInfo.getNodeRef();
|
||||
|
||||
if (LOGGER.isDebugEnabled())
|
||||
LOGGER.debug("Created website folder node with name: " + this.name);
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Created website folder node with name: " + this.name);
|
||||
|
||||
// TODO: check that this dns is unique by querying existing store properties for a match
|
||||
String avmStore = DNSNameMangler.MakeDNSName(this.dnsName);
|
||||
@@ -193,7 +191,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
||||
|
||||
// call a delegate wizard bean to provide invite user functionality
|
||||
InviteWebsiteUsersWizard wiz = getInviteUsersWizard();
|
||||
wiz.init(null);
|
||||
wiz.reset();
|
||||
wiz.setNode(new Node(nodeRef));
|
||||
wiz.setAvmStore(avmStore);
|
||||
wiz.setStandalone(false);
|
||||
|
@@ -63,6 +63,7 @@ public class EditFormWizard
|
||||
private final static Log LOGGER = LogFactory.getLog(EditFormWizard.class);
|
||||
|
||||
private List<RenderingEngineTemplateData> removedRenderingEngineTemplates;
|
||||
private List<WebProject> associatedWebProjects;
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Wizard implementation
|
||||
@@ -136,6 +137,7 @@ public class EditFormWizard
|
||||
this.renderingEngineTemplates.add(data);
|
||||
}
|
||||
this.removedRenderingEngineTemplates = null;
|
||||
this.associatedWebProjects = this.formsService.getAssociatedWebProjects(form);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,7 +151,11 @@ public class EditFormWizard
|
||||
final NodeRef formNodeRef = this.browseBean.getActionSpace().getNodeRef();
|
||||
|
||||
// apply the name, title and description props
|
||||
this.nodeService.setProperty(formNodeRef, ContentModel.PROP_NAME, this.getFormName());
|
||||
if (!this.getFormName().equals(this.nodeService.getProperty(formNodeRef, ContentModel.PROP_NAME)))
|
||||
{
|
||||
this.fileFolderService.rename(formNodeRef, this.getFormName());
|
||||
}
|
||||
|
||||
this.nodeService.setProperty(formNodeRef, ContentModel.PROP_TITLE, this.getFormTitle());
|
||||
this.nodeService.setProperty(formNodeRef, ContentModel.PROP_DESCRIPTION, this.getFormDescription());
|
||||
this.nodeService.setProperty(formNodeRef,
|
||||
@@ -252,8 +258,15 @@ public class EditFormWizard
|
||||
|
||||
|
||||
/** Indicates whether or not the wizard is currently in edit mode */
|
||||
@Override
|
||||
public boolean getEditMode()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WebProject> getAssociatedWebProjects()
|
||||
{
|
||||
return this.associatedWebProjects;
|
||||
}
|
||||
}
|
||||
|
@@ -147,7 +147,7 @@ public class EditWebsiteWizard extends CreateWebsiteWizard
|
||||
catch (FormNotFoundException fnfe)
|
||||
{
|
||||
//ignore
|
||||
LOGGER.debug(fnfe.getMessage(), fnfe);
|
||||
logger.debug(fnfe.getMessage(), fnfe);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -59,9 +59,6 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard
|
||||
/** the node representing the website */
|
||||
private Node website;
|
||||
|
||||
/** list of authorities with the Content Manager role */
|
||||
private List<String> managers;
|
||||
|
||||
/** root AVM store the users are invited into */
|
||||
private String avmStore;
|
||||
|
||||
@@ -93,7 +90,15 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard
|
||||
// only allow one selection per authority
|
||||
this.allowDuplicateAuthorities = false;
|
||||
this.website = null;
|
||||
this.managers = null;
|
||||
this.avmStore = null;
|
||||
this.standalone = true;
|
||||
}
|
||||
|
||||
public void reset()
|
||||
{
|
||||
this.isFinished = false;
|
||||
this.allowDuplicateAuthorities = false;
|
||||
this.website = null;
|
||||
this.avmStore = null;
|
||||
this.standalone = true;
|
||||
}
|
||||
@@ -108,7 +113,7 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard
|
||||
|
||||
// create a sandbox for each user appropriately with permissions based on role
|
||||
// build a list of managers who will have full permissions on ALL staging areas
|
||||
this.managers = new ArrayList<String>(4);
|
||||
List<String> managers = new ArrayList<String>(4);
|
||||
Set<String> existingUsers = new HashSet(8);
|
||||
if (isStandalone() == false)
|
||||
{
|
||||
@@ -127,7 +132,7 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard
|
||||
}
|
||||
if (AVMUtil.ROLE_CONTENT_MANAGER.equals(userRole.getRole()))
|
||||
{
|
||||
this.managers.add(userAuth);
|
||||
managers.add(userAuth);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -135,7 +140,7 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard
|
||||
if (foundCurrentUser == false)
|
||||
{
|
||||
this.userGroupRoles.add(new UserGroupRole(currentUser, AVMUtil.ROLE_CONTENT_MANAGER, null));
|
||||
this.managers.add(currentUser);
|
||||
managers.add(currentUser);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -148,7 +153,7 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard
|
||||
{
|
||||
if (AVMUtil.ROLE_CONTENT_MANAGER.equals(userRole.getRole()))
|
||||
{
|
||||
this.managers.add(userAuth);
|
||||
managers.add(userAuth);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -162,9 +167,9 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard
|
||||
String userrole = (String)nodeService.getProperty(userInfoRef, WCMAppModel.PROP_WEBUSERROLE);
|
||||
|
||||
if (AVMUtil.ROLE_CONTENT_MANAGER.equals(userrole) &&
|
||||
this.managers.contains(username) == false)
|
||||
managers.contains(username) == false)
|
||||
{
|
||||
this.managers.add(username);
|
||||
managers.add(username);
|
||||
}
|
||||
|
||||
// add each existing user to the exclude this - we cannot add them more than once!
|
||||
@@ -185,7 +190,7 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard
|
||||
if (existingUsers.contains(userAuth) == false)
|
||||
{
|
||||
SandboxInfo info = SandboxFactory.createUserSandbox(
|
||||
getAvmStore(), this.managers, userAuth, userRole.getRole());
|
||||
getAvmStore(), managers, userAuth, userRole.getRole());
|
||||
|
||||
this.sandboxInfoList.add(info);
|
||||
|
||||
@@ -218,7 +223,7 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard
|
||||
if (existingUsers.contains(username))
|
||||
{
|
||||
// only need to modify the sandboxes we haven't just created
|
||||
SandboxFactory.updateSandboxManagers(getAvmStore(), this.managers, username);
|
||||
SandboxFactory.updateSandboxManagers(getAvmStore(), managers, username);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -352,14 +357,6 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return List of authorities with the Content Manager role
|
||||
*/
|
||||
public List<String> getManagers()
|
||||
{
|
||||
return this.managers;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the root AVM store.
|
||||
*/
|
||||
|
@@ -319,7 +319,7 @@ public abstract class InviteUsersWizard extends BaseWizardBean
|
||||
String firstName = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_FIRSTNAME);
|
||||
String lastName = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_LASTNAME);
|
||||
String username = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_USERNAME);
|
||||
SelectItem item = new SortableSelectItem(username, firstName + " " + lastName, lastName);
|
||||
SelectItem item = new SortableSelectItem(username, firstName + " " + lastName + " [" + username + "]", lastName);
|
||||
items[index] = item;
|
||||
}
|
||||
}
|
||||
|
@@ -38,11 +38,16 @@ import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.model.WCMAppModel;
|
||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||
import org.alfresco.repo.policy.PolicyComponent;
|
||||
import org.alfresco.repo.policy.Behaviour;
|
||||
import org.alfresco.repo.policy.JavaBehaviour;
|
||||
import org.alfresco.repo.search.impl.lucene.QueryParser;
|
||||
import org.alfresco.service.cmr.avm.AVMNotFoundException;
|
||||
import org.alfresco.service.cmr.avm.AVMService;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.model.FileFolderService;
|
||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ContentReader;
|
||||
import org.alfresco.service.cmr.repository.ContentService;
|
||||
import org.alfresco.service.cmr.repository.MimetypeService;
|
||||
@@ -96,12 +101,23 @@ public final class FormsService
|
||||
public FormsService(final ContentService contentService,
|
||||
final NodeService nodeService,
|
||||
final NamespaceService namespaceService,
|
||||
final SearchService searchService)
|
||||
final SearchService searchService,
|
||||
final PolicyComponent policyComponent)
|
||||
{
|
||||
this.contentService = contentService;
|
||||
this.nodeService = nodeService;
|
||||
this.namespaceService = namespaceService;
|
||||
this.searchService = searchService;
|
||||
policyComponent.bindClassBehaviour(QName.createQName(NamespaceService.ALFRESCO_URI, "onMoveNode"),
|
||||
WCMAppModel.TYPE_FORMFOLDER,
|
||||
new JavaBehaviour(this,
|
||||
"handleMoveFormFolder",
|
||||
Behaviour.NotificationFrequency.FIRST_EVENT));
|
||||
policyComponent.bindClassBehaviour(QName.createQName(NamespaceService.ALFRESCO_URI, "onDeleteNode"),
|
||||
WCMAppModel.TYPE_FORMFOLDER,
|
||||
new JavaBehaviour(this,
|
||||
"handleDeleteFormFolder",
|
||||
Behaviour.NotificationFrequency.FIRST_EVENT));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -174,18 +190,16 @@ public final class FormsService
|
||||
*/
|
||||
public Collection<Form> getForms()
|
||||
{
|
||||
final SearchParameters sp = new SearchParameters();
|
||||
sp.addStore(Repository.getStoreRef());
|
||||
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
|
||||
sp.setQuery("+ASPECT:\"" + WCMAppModel.ASPECT_FORM +
|
||||
"\" +PARENT:\"" + this.getContentFormsNodeRef() + "\"");
|
||||
final String query =
|
||||
"+ASPECT:\"" + WCMAppModel.ASPECT_FORM +
|
||||
"\" +PARENT:\"" + this.getContentFormsNodeRef() + "\"";
|
||||
final ResultSet rs = this.searchService.query(Repository.getStoreRef(),
|
||||
SearchService.LANGUAGE_LUCENE,
|
||||
query);
|
||||
if (LOGGER.isDebugEnabled())
|
||||
LOGGER.debug("running query [" + sp.getQuery() + "]");
|
||||
final ResultSet rs = this.searchService.query(sp);
|
||||
if (LOGGER.isDebugEnabled())
|
||||
LOGGER.debug("received " + rs.length() + " results");
|
||||
LOGGER.debug("found " + rs.length() + " form definitions");
|
||||
final Collection<Form> result = new ArrayList<Form>(rs.length());
|
||||
for (ResultSetRow row : rs)
|
||||
for (final ResultSetRow row : rs)
|
||||
{
|
||||
result.add(this.getForm(row.getNodeRef()));
|
||||
}
|
||||
@@ -269,4 +283,87 @@ public final class FormsService
|
||||
{
|
||||
return new RenditionImpl(nodeRef, this);
|
||||
}
|
||||
|
||||
public List<WebProject> getAssociatedWebProjects(final Form form)
|
||||
{
|
||||
final List<NodeRef> formConfigurations = this.getFormConfigurations(form.getName());
|
||||
if (LOGGER.isDebugEnabled())
|
||||
{
|
||||
LOGGER.debug("found " + formConfigurations.size() +
|
||||
" web projects configured with " + form.getName());
|
||||
}
|
||||
final List<WebProject> result = new ArrayList<WebProject>(formConfigurations.size());
|
||||
for (final NodeRef ref : formConfigurations)
|
||||
{
|
||||
final List<ChildAssociationRef> parents = this.nodeService.getParentAssocs(ref);
|
||||
assert parents.size() != 1 : ("expected only one parent for " + ref +
|
||||
" got " + parents.size());
|
||||
result.add(new WebProject(parents.get(0).getParentRef()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// event handlers
|
||||
|
||||
public void handleMoveFormFolder(final ChildAssociationRef oldChild, final ChildAssociationRef newChild)
|
||||
{
|
||||
final String oldName = oldChild.getQName().getLocalName();
|
||||
final String newName = newChild.getQName().getLocalName();
|
||||
final List<NodeRef> formConfigurations = this.getFormConfigurations(oldName);
|
||||
// find all webprojects that used the old name
|
||||
if (LOGGER.isDebugEnabled())
|
||||
{
|
||||
LOGGER.debug("handling rename (" + oldName +
|
||||
" => " + newName +
|
||||
") for " + formConfigurations.size());
|
||||
}
|
||||
for (final NodeRef ref : formConfigurations)
|
||||
{
|
||||
this.nodeService.setProperty(ref,
|
||||
WCMAppModel.PROP_FORMNAME,
|
||||
newName);
|
||||
}
|
||||
}
|
||||
|
||||
public void handleDeleteFormFolder(final ChildAssociationRef childRef,
|
||||
final boolean isArchivedNode)
|
||||
{
|
||||
final String formName = childRef.getQName().getLocalName();
|
||||
final List<NodeRef> formConfigurations = this.getFormConfigurations(formName);
|
||||
for (final NodeRef ref : formConfigurations)
|
||||
{
|
||||
final List<ChildAssociationRef> parents = this.nodeService.getParentAssocs(ref);
|
||||
assert parents.size() != 1 : ("expected only one parent for " + ref +
|
||||
" got " + parents.size());
|
||||
final NodeRef parentRef = parents.get(0).getParentRef();
|
||||
if (LOGGER.isDebugEnabled())
|
||||
{
|
||||
|
||||
LOGGER.debug("removing configuration for " + formName +
|
||||
" from web project " + this.nodeService.getProperty(parentRef, ContentModel.PROP_NAME));
|
||||
}
|
||||
this.nodeService.removeChild(parentRef, ref);
|
||||
}
|
||||
}
|
||||
|
||||
private List<NodeRef> getFormConfigurations(final String formName)
|
||||
{
|
||||
final String query =
|
||||
"+TYPE:\"" + WCMAppModel.TYPE_WEBFORM +
|
||||
"\" +@" + Repository.escapeQName(WCMAppModel.PROP_FORMNAME) +
|
||||
":\"" + QueryParser.escape(formName) + "\"";
|
||||
final ResultSet rs = this.searchService.query(Repository.getStoreRef(),
|
||||
SearchService.LANGUAGE_LUCENE,
|
||||
query);
|
||||
if (LOGGER.isDebugEnabled())
|
||||
{
|
||||
LOGGER.debug("query " + query + " returned " + rs.length() + " results");
|
||||
}
|
||||
final List<NodeRef> result = new ArrayList<NodeRef>(rs.length());
|
||||
for (final ResultSetRow row : rs)
|
||||
{
|
||||
result.add(row.getNodeRef());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@@ -25,7 +25,6 @@
|
||||
package org.alfresco.web.ui.repo.component.property;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
@@ -35,11 +34,13 @@ import javax.faces.context.FacesContext;
|
||||
import javax.faces.context.ResponseWriter;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.bean.repository.User;
|
||||
@@ -57,6 +58,8 @@ public class UIAssociationEditor extends BaseAssociationEditor
|
||||
{
|
||||
private static final Log logger = LogFactory.getLog(UIAssociationEditor.class);
|
||||
|
||||
public static final String MSG_WARN_CANNOT_VIEW_TARGET_DETAILS = "warn_cannot_view_target_details";
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Component implementation
|
||||
|
||||
@@ -180,9 +183,19 @@ public class UIAssociationEditor extends BaseAssociationEditor
|
||||
else
|
||||
{
|
||||
// use the standard cm:name property
|
||||
out.write(Repository.getDisplayPath(nodeService.getPath(targetNode)));
|
||||
out.write("/");
|
||||
out.write(Repository.getNameForNode(nodeService, targetNode));
|
||||
|
||||
// Fix AWC-1301
|
||||
String displayString = null;
|
||||
try
|
||||
{
|
||||
displayString = Repository.getDisplayPath(nodeService.getPath(targetNode)) + "/" + Repository.getNameForNode(nodeService, targetNode);
|
||||
}
|
||||
catch (AccessDeniedException ade)
|
||||
{
|
||||
displayString = Application.getMessage(context, MSG_WARN_CANNOT_VIEW_TARGET_DETAILS);
|
||||
}
|
||||
|
||||
out.write(displayString);
|
||||
}
|
||||
out.write("</td></tr>");
|
||||
}
|
||||
|
@@ -133,11 +133,7 @@
|
||||
<td class="separator" width=1><img src="<%=request.getContextPath()%>/images/parts/dotted_separator.gif" border=0 height=29 width=1></td>
|
||||
<td style="padding-left:4px" align=right>
|
||||
<%-- Quick upload action --%>
|
||||
<nobr>
|
||||
<r:permissionEvaluator value="#{NavigationBean.currentNode}" allow="CreateChildren" id="eval2">
|
||||
<a:actionLink value="#{msg.add_content}" image="/images/icons/add.gif" padding="2" action="addContent" actionListener="#{AddContentDialog.start}" style="white-space:nowrap" id="link3" />
|
||||
</r:permissionEvaluator>
|
||||
</nobr>
|
||||
<r:actions id="acts_add_content" value="add_content_menu" context="#{NavigationBean.currentNode}" showLink="true" />
|
||||
</td>
|
||||
<td style="padding-left:4px" width=52>
|
||||
<%-- Create actions menu --%>
|
||||
|
@@ -437,7 +437,7 @@
|
||||
<a:richList id="versionHistoryList" viewMode="details" value="#{DocumentDetailsBean.versionHistory}"
|
||||
var="r" styleClass="recordSet" headerStyleClass="recordSetHeader"
|
||||
rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
|
||||
pageSize="10" initialSortColumn="versionLabel" initialSortDescending="false">
|
||||
pageSize="10" initialSortColumn="versionDate" initialSortDescending="true">
|
||||
|
||||
<%-- Primary column for details view mode --%>
|
||||
<a:column id="col1" primary="true" width="100" style="padding:2px;text-align:left">
|
||||
|
@@ -240,7 +240,7 @@
|
||||
<a:richList id="versionHistoryList" viewMode="details" value="#{VersionedDocumentDetailsBean.versionHistory}"
|
||||
var="r" styleClass="recordSet" headerStyleClass="recordSetHeader"
|
||||
rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
|
||||
pageSize="10" initialSortColumn="versionLabel" initialSortDescending="false">
|
||||
pageSize="10" initialSortColumn="versionDate" initialSortDescending="true">
|
||||
|
||||
<%-- Primary column for details view mode --%>
|
||||
<a:column id="col1" primary="true" width="100" style="padding:2px;text-align:left">
|
||||
|
@@ -58,6 +58,14 @@
|
||||
</script>
|
||||
</f:verbatim>
|
||||
|
||||
<a:panel id="no-message-recipients-panel" rendered="#{empty DialogManager.bean.usersGroups}">
|
||||
|
||||
<h:outputText value="#{msg.email_space_users_no_recipients}" />
|
||||
|
||||
</a:panel>
|
||||
|
||||
<a:panel id="message-recipients-panel" rendered="#{not empty DialogManager.bean.usersGroups}">
|
||||
|
||||
<h:outputText styleClass="mainSubTitle" value="#{msg.message_recipients}" />
|
||||
<f:verbatim><div style='padding:2px'></div></f:verbatim>
|
||||
<r:userGroupPicker value="#{DialogManager.bean.usersGroups}" actionListener="#{DialogManager.bean.userGroupSelectorAction}" />
|
||||
@@ -85,3 +93,5 @@
|
||||
<h:outputText value="#{msg.message}:"/>
|
||||
<h:inputTextarea value="#{DialogManager.bean.mailHelper.body}" rows="4" cols="75" disabled="#{DialogManager.bean.mailHelper.usingTemplate != null}" />
|
||||
</h:panelGrid>
|
||||
|
||||
</a:panel>
|
@@ -95,6 +95,18 @@
|
||||
immediate="true"
|
||||
style="display:none;"
|
||||
valueChangeListener="#{WizardManager.bean.schemaFileValueChanged}"/>
|
||||
<h:panelGrid rendered="#{!empty WizardManager.bean.associatedWebProjects}"
|
||||
width="100%"
|
||||
styleClass="infoText">
|
||||
<h:outputText value="#{msg.create_form_form_details_associated_web_projects}"/>
|
||||
<f:verbatim>
|
||||
<ul>
|
||||
<c:forEach items="${WizardManager.bean.associatedWebProjects}" var="wp">
|
||||
<li>${wp.name}</li>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
</f:verbatim>
|
||||
</h:panelGrid>
|
||||
|
||||
<h:panelGrid id="panel_grid_1"
|
||||
columns="1" cellpadding="2"
|
||||
@@ -109,7 +121,6 @@
|
||||
<h:outputText id="step-1-text"
|
||||
value="1. #{msg.create_form_form_details_step1_desc}"
|
||||
escape="false" />
|
||||
|
||||
<h:panelGrid id="schema_panel_grid"
|
||||
columns="4"
|
||||
cellpadding="3"
|
||||
|
@@ -2182,7 +2182,7 @@ dojo.declare("alfresco.xforms.MonthPicker",
|
||||
{
|
||||
var result = [];
|
||||
result.push({id: "month_empty", label: "", value: "", valid: false});
|
||||
for (var i = 0; i <= 12; i++)
|
||||
for (var i = 0; i < 12; i++)
|
||||
{
|
||||
var d = new Date();
|
||||
d.setMonth(i);
|
||||
|
Reference in New Issue
Block a user