SlideShare uma empresa Scribd logo
1 de 20
Baixar para ler offline
WebDAV Home
Alfresco
Alfresco
WebScript Alfresco Solr
Alfresco SDK
grep
find
: WebDAV
<servlet>
<servlet-name>WebDAV</servlet-name>
<servlet-class>org.alfresco.repo.webdav.WebDAVServlet</
servlet-class>
<load-on-startup>5</load-on-startup>
</servlet>
: WebDAV
m_davMethods = new Hashtable<String, Class<? extends
WebDAVMethod>>();
m_davMethods.put(WebDAV.METHOD_PROPFIND, PropFindMethod.class);
m_davMethods.put(WebDAV.METHOD_PROPPATCH, PropPatchMethod.class);
m_davMethods.put(WebDAV.METHOD_COPY, CopyMethod.class);
m_davMethods.put(WebDAV.METHOD_DELETE, DeleteMethod.class);
m_davMethods.put(WebDAV.METHOD_GET, GetMethod.class);
m_davMethods.put(WebDAV.METHOD_HEAD, HeadMethod.class);
m_davMethods.put(WebDAV.METHOD_LOCK, LockMethod.class);
m_davMethods.put(WebDAV.METHOD_MKCOL, MkcolMethod.class);
m_davMethods.put(WebDAV.METHOD_MOVE, MoveMethod.class);
m_davMethods.put(WebDAV.METHOD_OPTIONS, OptionsMethod.class);
m_davMethods.put(WebDAV.METHOD_POST, PostMethod.class);
m_davMethods.put(WebDAV.METHOD_PUT, PutMethod.class);
m_davMethods.put(WebDAV.METHOD_UNLOCK, UnlockMethod.class);
: WebDAV
protected void executeImpl() throws WebDAVServerException, Exception
{
FileFolderService fileFolderService = getFileFolderService();
NodeRef rootNodeRef = getRootNodeRef();
String path = getPath();
...
FileInfo nodeInfo = null;
try
{
nodeInfo = getDAVHelper().getNodeForPath(rootNodeRef, path);
}
: WebDAV
WebDAVServlet
GetMethod
DeleteMethod
…
WebDAVMethod
WebDAVHelper
getDAVHelper()
Bean
<bean id="webdav.initParams"
class="org.alfresco.repo.webdav.WebDAVServlet$WebDAVInitParameters">
<property name="enabled" value="${system.webdav.servlet.enabled}" />
<property name="storeName" value="${system.webdav.storeName}" />
<property name="rootPath" value="${system.webdav.rootPath}" />
</bean>
…
<bean id="webDAVHelper" class="org.alfresco.repo.webdav.WebDAVHelper"
parent="baseWebDAVHelper" />
remote-api-context.xml
public class WebDAVHelper extends org.alfresco.repo.webdav.WebDAVHelper
{
public List<FileInfo> getChildren(FileInfo fileInfo) throws
WebDAVServerException
{
List<FileInfo> children =
this.getFileFolderService().list(fileInfo.getNodeRef());
if ( this.rootNodeRefs.contains(fileInfo.getNodeRef())) {
YourHomeFileInfo yourHome = new YourHomeFileInfo();
children.add(yourHome);
}
return children;
}
YourHome
public FileInfo getNodeForPath(NodeRef rootNodeRef, String path) throws
FileNotFoundException
{
…
if ( path.startsWith("/" + YOUR_HOME)) {
// resolve your your name
String userName =
this.getAuthenticationService().getCurrentUserName();
NodeRef person = this.personService.getPerson(userName);
NodeRef homeFolderRef =
(NodeRef)this.getNodeService().getProperty(person,
ContentModel.PROP_HOMEFOLDER);
if ( homeFolderRef != null ) {
FileInfo userHome =
this.getFileFolderService().getFileInfo(homeFolderRef);
String pathLeft = path.replace("/" + YOUR_HOME, "");
if ( pathLeft.length() > 0 ) {
List<String> splitPath = splitAllPaths(pathLeft);
return
this.getFileFolderService().resolveNamePath(userHome.getNodeRef(),
splitPath);
}
else {
return
this.getFileFolderService().getFileInfo(homeFolderRef);
}
}
YourHome
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="webDAVHelper"
class="jp.aegif.study.alfresco.webdav2.WebDAVHelper"
parent="baseWebDAVHelper" >
<property name="personService" ref="PersonService" />
</bean>
</beans>
bean
custom-wedav—context.xml
Alfresco
WebDAV
Alfresco study presentation 38th customize How-To WebDAV
Alfresco study presentation 38th customize How-To WebDAV

Mais conteúdo relacionado

Mais procurados

Python Flask app deployed to OPenShift using Wercker CI
Python Flask app deployed to OPenShift using Wercker CIPython Flask app deployed to OPenShift using Wercker CI
Python Flask app deployed to OPenShift using Wercker CIBruno Rocha
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)Robert Swisher
 
Deploy Rails Application by Capistrano
Deploy Rails Application by CapistranoDeploy Rails Application by Capistrano
Deploy Rails Application by CapistranoTasawr Interactive
 
深入淺出 MVC
深入淺出 MVC深入淺出 MVC
深入淺出 MVCJace Ju
 
Learn flask in 90mins
Learn flask in 90minsLearn flask in 90mins
Learn flask in 90minsLarry Cai
 
快快樂樂用Homestead
快快樂樂用Homestead快快樂樂用Homestead
快快樂樂用HomesteadChen Cheng-Wei
 
[Community Open Camp] 給 PHP 開發者的 VS Code 指南
[Community Open Camp] 給 PHP 開發者的 VS Code 指南[Community Open Camp] 給 PHP 開發者的 VS Code 指南
[Community Open Camp] 給 PHP 開發者的 VS Code 指南Shengyou Fan
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidenceJohn Congdon
 
Datagrids with Symfony 2, Backbone and Backgrid
Datagrids with Symfony 2, Backbone and BackgridDatagrids with Symfony 2, Backbone and Backgrid
Datagrids with Symfony 2, Backbone and Backgrideugenio pombi
 
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...Alex Soto
 
[Spring Camp 2013] Java Configuration 없인 못살아!
[Spring Camp 2013] Java Configuration 없인 못살아![Spring Camp 2013] Java Configuration 없인 못살아!
[Spring Camp 2013] Java Configuration 없인 못살아!Arawn Park
 
Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)Dave Hulbert
 
RESTful in Drupal 8 and Services module - New`n`Tasty!
RESTful in Drupal 8 and Services module - New`n`Tasty!RESTful in Drupal 8 and Services module - New`n`Tasty!
RESTful in Drupal 8 and Services module - New`n`Tasty!Dmytro Olaresko
 
Python from zero to hero (Twitter Explorer)
Python from zero to hero (Twitter Explorer)Python from zero to hero (Twitter Explorer)
Python from zero to hero (Twitter Explorer)Yuriy Senko
 
Laravel5 Introduction and essentials
Laravel5 Introduction and essentialsLaravel5 Introduction and essentials
Laravel5 Introduction and essentialsPramod Kadam
 
LvivPy - Flask in details
LvivPy - Flask in detailsLvivPy - Flask in details
LvivPy - Flask in detailsMax Klymyshyn
 

Mais procurados (20)

Python Flask app deployed to OPenShift using Wercker CI
Python Flask app deployed to OPenShift using Wercker CIPython Flask app deployed to OPenShift using Wercker CI
Python Flask app deployed to OPenShift using Wercker CI
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)
 
Deploy Rails Application by Capistrano
Deploy Rails Application by CapistranoDeploy Rails Application by Capistrano
Deploy Rails Application by Capistrano
 
Flask SQLAlchemy
Flask SQLAlchemy Flask SQLAlchemy
Flask SQLAlchemy
 
深入淺出 MVC
深入淺出 MVC深入淺出 MVC
深入淺出 MVC
 
Learn flask in 90mins
Learn flask in 90minsLearn flask in 90mins
Learn flask in 90mins
 
快快樂樂用Homestead
快快樂樂用Homestead快快樂樂用Homestead
快快樂樂用Homestead
 
[Community Open Camp] 給 PHP 開發者的 VS Code 指南
[Community Open Camp] 給 PHP 開發者的 VS Code 指南[Community Open Camp] 給 PHP 開發者的 VS Code 指南
[Community Open Camp] 給 PHP 開發者的 VS Code 指南
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidence
 
Datagrids with Symfony 2, Backbone and Backgrid
Datagrids with Symfony 2, Backbone and BackgridDatagrids with Symfony 2, Backbone and Backgrid
Datagrids with Symfony 2, Backbone and Backgrid
 
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
Develop and Deploy your JavaEE micro service in less than 5 minutes with Apac...
 
Write php deploy everywhere
Write php deploy everywhereWrite php deploy everywhere
Write php deploy everywhere
 
[Spring Camp 2013] Java Configuration 없인 못살아!
[Spring Camp 2013] Java Configuration 없인 못살아![Spring Camp 2013] Java Configuration 없인 못살아!
[Spring Camp 2013] Java Configuration 없인 못살아!
 
Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)Silex and Twig (PHP Dorset talk)
Silex and Twig (PHP Dorset talk)
 
Web-Performance
Web-PerformanceWeb-Performance
Web-Performance
 
RESTful in Drupal 8 and Services module - New`n`Tasty!
RESTful in Drupal 8 and Services module - New`n`Tasty!RESTful in Drupal 8 and Services module - New`n`Tasty!
RESTful in Drupal 8 and Services module - New`n`Tasty!
 
Python from zero to hero (Twitter Explorer)
Python from zero to hero (Twitter Explorer)Python from zero to hero (Twitter Explorer)
Python from zero to hero (Twitter Explorer)
 
Laravel5 Introduction and essentials
Laravel5 Introduction and essentialsLaravel5 Introduction and essentials
Laravel5 Introduction and essentials
 
Laravel 5.3 - Web Development Php framework
Laravel 5.3 - Web Development Php frameworkLaravel 5.3 - Web Development Php framework
Laravel 5.3 - Web Development Php framework
 
LvivPy - Flask in details
LvivPy - Flask in detailsLvivPy - Flask in details
LvivPy - Flask in details
 

Destaque

Alfresco勉強会#40 QRコードによる文書の振り分け
Alfresco勉強会#40 QRコードによる文書の振り分けAlfresco勉強会#40 QRコードによる文書の振り分け
Alfresco勉強会#40 QRコードによる文書の振り分けTakeshi Totani
 
Alfresco study41 alfresco_sdk3_introduction
Alfresco study41 alfresco_sdk3_introductionAlfresco study41 alfresco_sdk3_introduction
Alfresco study41 alfresco_sdk3_introductionTakeshi Totani
 
0からわかるAlfresco 2017年1月版
0からわかるAlfresco 2017年1月版0からわかるAlfresco 2017年1月版
0からわかるAlfresco 2017年1月版MoritakaSoma
 
Share UIカスタマイズの第一歩
Share UIカスタマイズの第一歩Share UIカスタマイズの第一歩
Share UIカスタマイズの第一歩MoritakaSoma
 
Alfresco勉強会#35 AlfrescoのアクティビティフィードをSlackに送るカスタマイズ
Alfresco勉強会#35 AlfrescoのアクティビティフィードをSlackに送るカスタマイズAlfresco勉強会#35 AlfrescoのアクティビティフィードをSlackに送るカスタマイズ
Alfresco勉強会#35 AlfrescoのアクティビティフィードをSlackに送るカスタマイズJun Terashita
 
Alfresco勉強会#36 alfresco 5でカスタムREST APIを作ってみよう
Alfresco勉強会#36 alfresco 5でカスタムREST APIを作ってみようAlfresco勉強会#36 alfresco 5でカスタムREST APIを作ってみよう
Alfresco勉強会#36 alfresco 5でカスタムREST APIを作ってみようTasuku Otani
 
Alfresco Javascript Consoleのご紹介
Alfresco Javascript Consoleのご紹介Alfresco Javascript Consoleのご紹介
Alfresco Javascript Consoleのご紹介MoritakaSoma
 
Alfresco勉強会#34 Alfrescoをカスタマイズする時に知っておくと便利なこと
Alfresco勉強会#34 Alfrescoをカスタマイズする時に知っておくと便利なことAlfresco勉強会#34 Alfrescoをカスタマイズする時に知っておくと便利なこと
Alfresco勉強会#34 Alfrescoをカスタマイズする時に知っておくと便利なことJun Terashita
 

Destaque (8)

Alfresco勉強会#40 QRコードによる文書の振り分け
Alfresco勉強会#40 QRコードによる文書の振り分けAlfresco勉強会#40 QRコードによる文書の振り分け
Alfresco勉強会#40 QRコードによる文書の振り分け
 
Alfresco study41 alfresco_sdk3_introduction
Alfresco study41 alfresco_sdk3_introductionAlfresco study41 alfresco_sdk3_introduction
Alfresco study41 alfresco_sdk3_introduction
 
0からわかるAlfresco 2017年1月版
0からわかるAlfresco 2017年1月版0からわかるAlfresco 2017年1月版
0からわかるAlfresco 2017年1月版
 
Share UIカスタマイズの第一歩
Share UIカスタマイズの第一歩Share UIカスタマイズの第一歩
Share UIカスタマイズの第一歩
 
Alfresco勉強会#35 AlfrescoのアクティビティフィードをSlackに送るカスタマイズ
Alfresco勉強会#35 AlfrescoのアクティビティフィードをSlackに送るカスタマイズAlfresco勉強会#35 AlfrescoのアクティビティフィードをSlackに送るカスタマイズ
Alfresco勉強会#35 AlfrescoのアクティビティフィードをSlackに送るカスタマイズ
 
Alfresco勉強会#36 alfresco 5でカスタムREST APIを作ってみよう
Alfresco勉強会#36 alfresco 5でカスタムREST APIを作ってみようAlfresco勉強会#36 alfresco 5でカスタムREST APIを作ってみよう
Alfresco勉強会#36 alfresco 5でカスタムREST APIを作ってみよう
 
Alfresco Javascript Consoleのご紹介
Alfresco Javascript Consoleのご紹介Alfresco Javascript Consoleのご紹介
Alfresco Javascript Consoleのご紹介
 
Alfresco勉強会#34 Alfrescoをカスタマイズする時に知っておくと便利なこと
Alfresco勉強会#34 Alfrescoをカスタマイズする時に知っておくと便利なことAlfresco勉強会#34 Alfrescoをカスタマイズする時に知っておくと便利なこと
Alfresco勉強会#34 Alfrescoをカスタマイズする時に知っておくと便利なこと
 

Semelhante a Alfresco study presentation 38th customize How-To WebDAV

JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンJavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンharuki ueno
 
Overview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkOverview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkIndicThreads
 
Scala based Lift Framework
Scala based Lift FrameworkScala based Lift Framework
Scala based Lift Frameworkvhazrati
 
JavaOne India 2011 - Servlets 3.0
JavaOne India 2011 - Servlets 3.0JavaOne India 2011 - Servlets 3.0
JavaOne India 2011 - Servlets 3.0Arun Gupta
 
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010Arun Gupta
 
Vue js 大型專案架構
Vue js 大型專案架構Vue js 大型專案架構
Vue js 大型專案架構Hina Chen
 
Ajax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorialsAjax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorialsRaghavan Mohan
 
Knowledge Sharing : Java Servlet
Knowledge Sharing : Java ServletKnowledge Sharing : Java Servlet
Knowledge Sharing : Java ServletFahmi Jafar
 
Zend Framework Foundations
Zend Framework FoundationsZend Framework Foundations
Zend Framework FoundationsChuck Reeves
 
Adriano Di Luzio - Davvy - PyconSEI Talk
Adriano Di Luzio - Davvy - PyconSEI TalkAdriano Di Luzio - Davvy - PyconSEI Talk
Adriano Di Luzio - Davvy - PyconSEI Talkaldur999
 
Build your web app with asp.net mvc 2 from scratch
Build your web app with asp.net mvc 2 from scratchBuild your web app with asp.net mvc 2 from scratch
Build your web app with asp.net mvc 2 from scratchChalermpon Areepong
 
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Dilouar Hossain
 
iOS App Module Management
iOS App Module ManagementiOS App Module Management
iOS App Module ManagementRyan Wang
 
Let's play with adf 3.0
Let's play with adf 3.0Let's play with adf 3.0
Let's play with adf 3.0Eugenio Romano
 
Using and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middlewareUsing and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middlewareAlona Mekhovova
 
Jlook web ui framework
Jlook web ui frameworkJlook web ui framework
Jlook web ui frameworkHongSeong Jeon
 

Semelhante a Alfresco study presentation 38th customize How-To WebDAV (20)

JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンJavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオン
 
Overview Of Lift Framework
Overview Of Lift FrameworkOverview Of Lift Framework
Overview Of Lift Framework
 
Overview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web FrameworkOverview of The Scala Based Lift Web Framework
Overview of The Scala Based Lift Web Framework
 
Scala based Lift Framework
Scala based Lift FrameworkScala based Lift Framework
Scala based Lift Framework
 
JavaOne India 2011 - Servlets 3.0
JavaOne India 2011 - Servlets 3.0JavaOne India 2011 - Servlets 3.0
JavaOne India 2011 - Servlets 3.0
 
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
 
Vue js 大型專案架構
Vue js 大型專案架構Vue js 大型專案架構
Vue js 大型專案架構
 
Ajax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorialsAjax, JSF, Facelets, Eclipse & Maven tutorials
Ajax, JSF, Facelets, Eclipse & Maven tutorials
 
Knowledge Sharing : Java Servlet
Knowledge Sharing : Java ServletKnowledge Sharing : Java Servlet
Knowledge Sharing : Java Servlet
 
Zend Framework Foundations
Zend Framework FoundationsZend Framework Foundations
Zend Framework Foundations
 
Adriano Di Luzio - Davvy - PyconSEI Talk
Adriano Di Luzio - Davvy - PyconSEI TalkAdriano Di Luzio - Davvy - PyconSEI Talk
Adriano Di Luzio - Davvy - PyconSEI Talk
 
Build your web app with asp.net mvc 2 from scratch
Build your web app with asp.net mvc 2 from scratchBuild your web app with asp.net mvc 2 from scratch
Build your web app with asp.net mvc 2 from scratch
 
Rest with-spray
Rest with-sprayRest with-spray
Rest with-spray
 
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
 
iOS App Module Management
iOS App Module ManagementiOS App Module Management
iOS App Module Management
 
Jsf
JsfJsf
Jsf
 
Apache Click
Apache ClickApache Click
Apache Click
 
Let's play with adf 3.0
Let's play with adf 3.0Let's play with adf 3.0
Let's play with adf 3.0
 
Using and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middlewareUsing and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middleware
 
Jlook web ui framework
Jlook web ui frameworkJlook web ui framework
Jlook web ui framework
 

Mais de Takeshi Totani

Alfresco study32 introducing5.1
Alfresco study32 introducing5.1Alfresco study32 introducing5.1
Alfresco study32 introducing5.1Takeshi Totani
 
Alfresco study29 activitymonitoring
Alfresco study29 activitymonitoringAlfresco study29 activitymonitoring
Alfresco study29 activitymonitoringTakeshi Totani
 
Alfresco勉強会#25 ワークフロー入門
Alfresco勉強会#25 ワークフロー入門Alfresco勉強会#25 ワークフロー入門
Alfresco勉強会#25 ワークフロー入門Takeshi Totani
 
20140129 alfresco addons
20140129 alfresco addons20140129 alfresco addons
20140129 alfresco addonsTakeshi Totani
 
Alfresco onlineeditbywebdav 2013
Alfresco onlineeditbywebdav 2013Alfresco onlineeditbywebdav 2013
Alfresco onlineeditbywebdav 2013Takeshi Totani
 
20130925 alfresco study18performancetuning
20130925 alfresco study18performancetuning20130925 alfresco study18performancetuning
20130925 alfresco study18performancetuningTakeshi Totani
 
20130801 alfresco study17customizemap
20130801 alfresco study17customizemap20130801 alfresco study17customizemap
20130801 alfresco study17customizemapTakeshi Totani
 
20130606 alfresco study16audit
20130606 alfresco study16audit20130606 alfresco study16audit
20130606 alfresco study16auditTakeshi Totani
 
20130509 alfresco study15permission
20130509 alfresco study15permission20130509 alfresco study15permission
20130509 alfresco study15permissionTakeshi Totani
 
JJUGナイトセミナー オープンソースポータルLiferayの紹介とLiferay IDEを使った簡単ポートレット開発
JJUGナイトセミナー オープンソースポータルLiferayの紹介とLiferay IDEを使った簡単ポートレット開発JJUGナイトセミナー オープンソースポータルLiferayの紹介とLiferay IDEを使った簡単ポートレット開発
JJUGナイトセミナー オープンソースポータルLiferayの紹介とLiferay IDEを使った簡単ポートレット開発Takeshi Totani
 
第7回Alfresco勉強会資料 カスタムのオンライン編集
第7回Alfresco勉強会資料 カスタムのオンライン編集第7回Alfresco勉強会資料 カスタムのオンライン編集
第7回Alfresco勉強会資料 カスタムのオンライン編集Takeshi Totani
 
Alfresco study3 alfresco4
Alfresco study3 alfresco4Alfresco study3 alfresco4
Alfresco study3 alfresco4Takeshi Totani
 

Mais de Takeshi Totani (12)

Alfresco study32 introducing5.1
Alfresco study32 introducing5.1Alfresco study32 introducing5.1
Alfresco study32 introducing5.1
 
Alfresco study29 activitymonitoring
Alfresco study29 activitymonitoringAlfresco study29 activitymonitoring
Alfresco study29 activitymonitoring
 
Alfresco勉強会#25 ワークフロー入門
Alfresco勉強会#25 ワークフロー入門Alfresco勉強会#25 ワークフロー入門
Alfresco勉強会#25 ワークフロー入門
 
20140129 alfresco addons
20140129 alfresco addons20140129 alfresco addons
20140129 alfresco addons
 
Alfresco onlineeditbywebdav 2013
Alfresco onlineeditbywebdav 2013Alfresco onlineeditbywebdav 2013
Alfresco onlineeditbywebdav 2013
 
20130925 alfresco study18performancetuning
20130925 alfresco study18performancetuning20130925 alfresco study18performancetuning
20130925 alfresco study18performancetuning
 
20130801 alfresco study17customizemap
20130801 alfresco study17customizemap20130801 alfresco study17customizemap
20130801 alfresco study17customizemap
 
20130606 alfresco study16audit
20130606 alfresco study16audit20130606 alfresco study16audit
20130606 alfresco study16audit
 
20130509 alfresco study15permission
20130509 alfresco study15permission20130509 alfresco study15permission
20130509 alfresco study15permission
 
JJUGナイトセミナー オープンソースポータルLiferayの紹介とLiferay IDEを使った簡単ポートレット開発
JJUGナイトセミナー オープンソースポータルLiferayの紹介とLiferay IDEを使った簡単ポートレット開発JJUGナイトセミナー オープンソースポータルLiferayの紹介とLiferay IDEを使った簡単ポートレット開発
JJUGナイトセミナー オープンソースポータルLiferayの紹介とLiferay IDEを使った簡単ポートレット開発
 
第7回Alfresco勉強会資料 カスタムのオンライン編集
第7回Alfresco勉強会資料 カスタムのオンライン編集第7回Alfresco勉強会資料 カスタムのオンライン編集
第7回Alfresco勉強会資料 カスタムのオンライン編集
 
Alfresco study3 alfresco4
Alfresco study3 alfresco4Alfresco study3 alfresco4
Alfresco study3 alfresco4
 

Último

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 

Último (20)

Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 

Alfresco study presentation 38th customize How-To WebDAV

  • 1.
  • 2.
  • 7.
  • 10. : WebDAV m_davMethods = new Hashtable<String, Class<? extends WebDAVMethod>>(); m_davMethods.put(WebDAV.METHOD_PROPFIND, PropFindMethod.class); m_davMethods.put(WebDAV.METHOD_PROPPATCH, PropPatchMethod.class); m_davMethods.put(WebDAV.METHOD_COPY, CopyMethod.class); m_davMethods.put(WebDAV.METHOD_DELETE, DeleteMethod.class); m_davMethods.put(WebDAV.METHOD_GET, GetMethod.class); m_davMethods.put(WebDAV.METHOD_HEAD, HeadMethod.class); m_davMethods.put(WebDAV.METHOD_LOCK, LockMethod.class); m_davMethods.put(WebDAV.METHOD_MKCOL, MkcolMethod.class); m_davMethods.put(WebDAV.METHOD_MOVE, MoveMethod.class); m_davMethods.put(WebDAV.METHOD_OPTIONS, OptionsMethod.class); m_davMethods.put(WebDAV.METHOD_POST, PostMethod.class); m_davMethods.put(WebDAV.METHOD_PUT, PutMethod.class); m_davMethods.put(WebDAV.METHOD_UNLOCK, UnlockMethod.class);
  • 11. : WebDAV protected void executeImpl() throws WebDAVServerException, Exception { FileFolderService fileFolderService = getFileFolderService(); NodeRef rootNodeRef = getRootNodeRef(); String path = getPath(); ... FileInfo nodeInfo = null; try { nodeInfo = getDAVHelper().getNodeForPath(rootNodeRef, path); }
  • 13. Bean <bean id="webdav.initParams" class="org.alfresco.repo.webdav.WebDAVServlet$WebDAVInitParameters"> <property name="enabled" value="${system.webdav.servlet.enabled}" /> <property name="storeName" value="${system.webdav.storeName}" /> <property name="rootPath" value="${system.webdav.rootPath}" /> </bean> … <bean id="webDAVHelper" class="org.alfresco.repo.webdav.WebDAVHelper" parent="baseWebDAVHelper" /> remote-api-context.xml
  • 14.
  • 15. public class WebDAVHelper extends org.alfresco.repo.webdav.WebDAVHelper { public List<FileInfo> getChildren(FileInfo fileInfo) throws WebDAVServerException { List<FileInfo> children = this.getFileFolderService().list(fileInfo.getNodeRef()); if ( this.rootNodeRefs.contains(fileInfo.getNodeRef())) { YourHomeFileInfo yourHome = new YourHomeFileInfo(); children.add(yourHome); } return children; } YourHome
  • 16. public FileInfo getNodeForPath(NodeRef rootNodeRef, String path) throws FileNotFoundException { … if ( path.startsWith("/" + YOUR_HOME)) { // resolve your your name String userName = this.getAuthenticationService().getCurrentUserName(); NodeRef person = this.personService.getPerson(userName); NodeRef homeFolderRef = (NodeRef)this.getNodeService().getProperty(person, ContentModel.PROP_HOMEFOLDER); if ( homeFolderRef != null ) { FileInfo userHome = this.getFileFolderService().getFileInfo(homeFolderRef); String pathLeft = path.replace("/" + YOUR_HOME, ""); if ( pathLeft.length() > 0 ) { List<String> splitPath = splitAllPaths(pathLeft); return this.getFileFolderService().resolveNamePath(userHome.getNodeRef(), splitPath); } else { return this.getFileFolderService().getFileInfo(homeFolderRef); } } YourHome
  • 17. <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <bean id="webDAVHelper" class="jp.aegif.study.alfresco.webdav2.WebDAVHelper" parent="baseWebDAVHelper" > <property name="personService" ref="PersonService" /> </bean> </beans> bean custom-wedav—context.xml Alfresco