ODF additions
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3390 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
@@ -249,6 +249,10 @@
|
|||||||
</aspects>
|
</aspects>
|
||||||
<!-- The list of transformers to show in the transform actions -->
|
<!-- The list of transformers to show in the transform actions -->
|
||||||
<transformers>
|
<transformers>
|
||||||
|
<transformer name="application/vnd.oasis.opendocument.text"/>
|
||||||
|
<transformer name="application/vnd.oasis.opendocument.presentation"/>
|
||||||
|
<transformer name="application/vnd.oasis.opendocument.spreadsheet"/>
|
||||||
|
<transformer name="application/rtf"/>
|
||||||
<transformer name="text/html"/>
|
<transformer name="text/html"/>
|
||||||
<transformer name="application/pdf"/>
|
<transformer name="application/pdf"/>
|
||||||
<transformer name="text/plain"/>
|
<transformer name="text/plain"/>
|
||||||
@@ -256,6 +260,9 @@
|
|||||||
<transformer name="application/x-shockwave-flash"/>
|
<transformer name="application/x-shockwave-flash"/>
|
||||||
<transformer name="image/gif"/>
|
<transformer name="image/gif"/>
|
||||||
<transformer name="image/jpeg"/>
|
<transformer name="image/jpeg"/>
|
||||||
|
<transformer name="application/msword"/>
|
||||||
|
<transformer name="application/vnd.excel"/>
|
||||||
|
<transformer name="application/vnd.powerpoint"/>
|
||||||
</transformers>
|
</transformers>
|
||||||
<image-transformers>
|
<image-transformers>
|
||||||
<transformer name="image/gif"/>
|
<transformer name="image/gif"/>
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package org.alfresco.web.action.evaluator;
|
package org.alfresco.web.action.evaluator;
|
||||||
|
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
|
import org.alfresco.service.cmr.security.PermissionService;
|
||||||
import org.alfresco.web.action.ActionEvaluator;
|
import org.alfresco.web.action.ActionEvaluator;
|
||||||
import org.alfresco.web.bean.repository.Node;
|
import org.alfresco.web.bean.repository.Node;
|
||||||
|
|
||||||
@@ -33,8 +34,7 @@ public final class ApproveDocEvaluator implements ActionEvaluator
|
|||||||
public boolean evaluate(Node node)
|
public boolean evaluate(Node node)
|
||||||
{
|
{
|
||||||
return (node.getProperties().get("app:approveStep") != null &&
|
return (node.getProperties().get("app:approveStep") != null &&
|
||||||
node.isLocked() == false &&
|
node.isLocked() == false);
|
||||||
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2005 Alfresco, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Mozilla Public License version 1.1
|
||||||
|
* with a permitted attribution clause. You may obtain a
|
||||||
|
* copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.alfresco.org/legal/license.txt
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
|
* either express or implied. See the License for the specific
|
||||||
|
* language governing permissions and limitations under the
|
||||||
|
* License.
|
||||||
|
*/
|
||||||
|
package org.alfresco.web.action.evaluator;
|
||||||
|
|
||||||
|
import org.alfresco.model.ContentModel;
|
||||||
|
import org.alfresco.web.action.ActionEvaluator;
|
||||||
|
import org.alfresco.web.bean.repository.Node;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UI Action Evaluator - 'Approve' workflow step for document.
|
||||||
|
*
|
||||||
|
* @author Kevin Roast
|
||||||
|
*/
|
||||||
|
public final class ApproveNonDraftDocEvaluator implements ActionEvaluator
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
|
||||||
|
*/
|
||||||
|
public boolean evaluate(Node node)
|
||||||
|
{
|
||||||
|
return (node.getProperties().get("app:approveStep") != null &&
|
||||||
|
node.isLocked() == false &&
|
||||||
|
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
<a:booleanEvaluator value='#{r["app:approveStep"] != null && r.workingCopy == false && r.locked == false}'>
|
||||||
|
*/
|
@@ -17,6 +17,7 @@
|
|||||||
package org.alfresco.web.action.evaluator;
|
package org.alfresco.web.action.evaluator;
|
||||||
|
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
|
import org.alfresco.service.cmr.security.PermissionService;
|
||||||
import org.alfresco.web.action.ActionEvaluator;
|
import org.alfresco.web.action.ActionEvaluator;
|
||||||
import org.alfresco.web.bean.repository.Node;
|
import org.alfresco.web.bean.repository.Node;
|
||||||
|
|
||||||
@@ -33,8 +34,7 @@ public final class RejectDocEvaluator implements ActionEvaluator
|
|||||||
public boolean evaluate(Node node)
|
public boolean evaluate(Node node)
|
||||||
{
|
{
|
||||||
return (node.getProperties().get("app:rejectStep") != null &&
|
return (node.getProperties().get("app:rejectStep") != null &&
|
||||||
node.isLocked() == false &&
|
node.isLocked() == false);
|
||||||
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2005 Alfresco, Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the Mozilla Public License version 1.1
|
||||||
|
* with a permitted attribution clause. You may obtain a
|
||||||
|
* copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.alfresco.org/legal/license.txt
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||||
|
* either express or implied. See the License for the specific
|
||||||
|
* language governing permissions and limitations under the
|
||||||
|
* License.
|
||||||
|
*/
|
||||||
|
package org.alfresco.web.action.evaluator;
|
||||||
|
|
||||||
|
import org.alfresco.model.ContentModel;
|
||||||
|
import org.alfresco.web.action.ActionEvaluator;
|
||||||
|
import org.alfresco.web.bean.repository.Node;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* UI Action Evaluator - 'Reject' workflow step for document.
|
||||||
|
*
|
||||||
|
* @author Kevin Roast
|
||||||
|
*/
|
||||||
|
public final class RejectNonDraftDocEvaluator implements ActionEvaluator
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
|
||||||
|
*/
|
||||||
|
public boolean evaluate(Node node)
|
||||||
|
{
|
||||||
|
return (node.getProperties().get("app:rejectStep") != null &&
|
||||||
|
node.isLocked() == false &&
|
||||||
|
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
<a:booleanEvaluator value='#{r["app:rejectStep"] != null && r.workingCopy == false && r.locked == false}'>
|
||||||
|
*/
|
@@ -1,128 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
BIN
source/web/images/filetypes/odf.gif
Normal file
After Width: | Height: | Size: 1019 B |
BIN
source/web/images/filetypes/odg.gif
Normal file
After Width: | Height: | Size: 1021 B |
BIN
source/web/images/filetypes/odp.gif
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
source/web/images/filetypes/ods.gif
Normal file
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1010 B |
BIN
source/web/images/filetypes32/odf.gif
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
source/web/images/filetypes32/odg.gif
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
source/web/images/filetypes32/odp.gif
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
source/web/images/filetypes32/ods.gif
Normal file
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -126,9 +126,6 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td><a:actionLink value="#{msg.node_browser}" image="/images/icons/node_browser.gif" action="dialog:showNodeBrowser" styleClass="title" /></td>
|
<td><a:actionLink value="#{msg.node_browser}" image="/images/icons/node_browser.gif" action="dialog:showNodeBrowser" styleClass="title" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td><h:outputText value="#{LicenseBean.licenseDescription}" /></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "ballongrey"); %>
|
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "ballongrey"); %>
|
||||||
|
|
||||||
|