You are on page 1of 2

descripcion general

http://wiki.alfresco.com/wiki/Web_Scripts
Ejemplos basicos
http://wiki.alfresco.com/wiki/Web_Scripts_Examples
Interesante para implementar la api de servicios basicos:
http://wiki.alfresco.com/wiki/Alfresco_REST_Design_Guidelines#Data_Pagin
g

Listas de webscripts
http://localhost:8080/alfresco/service/index
http://localhost:8081/share/service/index

Dosmetodos de validacion
1. HTTP BASIC Authentication - the authentication process follows the handsha
ke as defined by RFC2617
/service
2. Alfresco Explorer Authentication - the authentication process supported by
the Explorer Web Client
/wcservice
Ticket para la validacion
?alf_ticket=<ticket>

Tipos de ficheros
helloworld.get.desc.xml
helloworld.get.js
helloworld.get.html.ftl
helloworld.get.xml.ftl
helloworld.get.html.400.ftl
helloworld.get.xml.400.ftl
helloworld.get.config.xml
helloworld.get.properties
Ubicaciones
1. repository folder: /Company Home/Data Dictionary/Web Scripts Extensions
2. repository folder: /Company Home/Data Dictionary/Web Scripts
-> 3. class path folder: /alfresco/extension/templates/webscripts
4. class path folder: /alfresco/templates/webscripts

Fichero de descripcion
* shortname is a human readable name for the Web Script
* description (optional) is documentation for the Web Script
* url (one or more) is a URI Template to which the Web Script is bound; vari
ants of the URI template which specify a format do not need to be registered, ho
wever, they are useful for documentation purposes
* format (optional) controls how the content-type of the response can be spe
cified via the URI; valid values are:
o argument the content-type is specified via the format query string p
arameter, for example /helloworld?to=dave&format=xml
o extension the content-type is specified via the URI extension, for e
xample /hello/world.xml?to=dave
o any either of the above can be used
o Note: if not specified, the default value is any
o Note: if the caller does not specify a required content-type at all,
the default content-type is taken from the (optional) default attribute of the
format element. By default, if not set, the html format is assumed. In some case
s, a URI may decide upon a response content-type at runtime. For these URIs, spe
cify an empty format, for example format default=""
* authentication (optional) is the required level of authentication; valid v
alues are:
o none specifies that no authentication is required at all
o guest specifies that at least guest authentication is required
o user specifies that at least named user authentication is required
o admin specifies that at least a named admin authentication is requir
ed
o Note: if not specified, the default value is none
o Note: The optional runas attribute can be used to force the executio
n of a web script as a specific user. This can only be specified for web scripts
that are stored in the Java Class path.
The description provides Alfresco with all the necessary information to
bind the web script to one or more URIs. It also provides enough to document the
Web Script.

Uri Templates
/content/a/b/c/d.txt
/sample/helloworld?to={name?}
/blog/search?q={searchTerm}&amp;n={numResults}
/people/{personName}/profile/{profileStyle}
/blog/category/{category}?n={itemsperpage?}
/user/{userid}

You might also like