04-07-2014 05:49 AM
04-07-2014 07:34 AM
04-07-2014 12:05 PM
04-07-2014 11:47 PM
04-14-2014 11:51 AM
// Búsquda del fichero .pdf con el nombre indicado como parámetro
var spath="'+PATH:\"app:company_home/app:intranet//*\" + ";
var scontent="@\\{http\\://www.alfresco.org/model/content/1.0\\}content.mimetype:application/pdf + ";
var qname = "@cm\\:name:" + args.name;
var strq=spath+scontent+qname;
var content=search.luceneSearch(strq);
// buscar usuario indicado como parámetro
var luceneQuery = "+@cm\\:userName:"+args.user;
var users = search.luceneSearch(luceneQuery);
// Mostrar error al no encontrar el fichero y/o el usuario
if (content.length != 1 || users.length!=1)
{
status.code = 404;
status.message = "File " + url.extension + " not found.";
status.redirect = true;
}
model.fichero = content[0];
model.ticket = session.getTicket();
<webscript>
<shortname>Show Content</shortname>
<description>Show user specific content identified by parameters </description>
<url>/showContent?name={nameArgument}&user={userName}</url>
<authentication>none</authentication>
<transaction>required</transaction>
</webscript>
<html>
<head>
<title>Mostrar fichero</title>
</head>
<body>
<script>
window.location.href = "${url.serviceContext}/api/node/content/${fichero.nodeRef.storeRef.protocol}/${fichero.nodeRef.storeRef.identifier}/${fichero.nodeRef.id}/${fichero.name?url}?alf_ticket=${ticket} ";
</script>
</body>
</html>
The Web Script /alfresco/service/showContent has responded with a status of 500 - Internal Error.
500 Description: An error inside the HTTP server which prevented it from fulfilling the request.
Message: Wrapped Exception (with status template): A valid SecureContext was not provided in the RequestContext
Exception: net.sf.acegisecurity.AuthenticationCredentialsNotFoundException - A valid SecureContext was not provided in the RequestContext
04-15-2014 06:13 AM
04-14-2014 01:12 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.