星期日, 1月 30, 2011

[Alfresco] Constants.java

Constants.java
Language: Java
License: GPL
Copyright: (C) 2005-2007 Alfresco Software Limited.
LOC: 74

[Alfresco] ContentModel.java

ContentModel.java
Language: Java
License: GPL
Copyright: (C) 2005-2007 Alfresco Software Limited.
LOC: 171

星期四, 1月 27, 2011

[Alfresco] Peer-Association 範例

BaseWebServiceSystemTest.java 
使用foundation api範例

[Alfresco] Avatar

--UserManager printProperties--
{http://www.alfresco.org/model/content/1.0}name:myfbphoto.jpg
{http://www.alfresco.org/model/system/1.0}node-dbid:20391
{http://www.alfresco.org/model/system/1.0}store-identifier:SpacesStore
{http://www.alfresco.org/model/content/1.0}content:contentUrl=store://2011/1/14/10/30/a9fc0ee8-f528-40c8-b4f2-f53459120a47.bin|mimetype=image/jpeg|size=13245|encoding=utf-8|locale=zh_TW_
{http://www.alfresco.org/model/content/1.0}modified:2011-01-14T10:30:51.377+08:00
{http://www.alfresco.org/model/system/1.0}node-uuid:100cbbf4-39c3-41cc-8d79-a80b112347a2
{http://www.alfresco.org/model/content/1.0}created:2011-01-14T10:30:51.377+08:00
{http://www.alfresco.org/model/system/1.0}store-protocol:workspace
{http://www.alfresco.org/model/content/1.0}creator:Ken
{http://www.alfresco.org/model/content/1.0}modifier:Ken
associationType:{http://www.alfresco.org/model/content/1.0}avatar
{http://www.alfresco.org/model/content/1.0}path:/{http://www.alfresco.org/model/system/1.0}system/{http://www.alfresco.org/model/system/1.0}people/{http://www.alfresco.org/model/content/1.0}ken/{http://www.alfresco.org/model/content/1.0}myfbphoto.jpg
--/UserManager printProperties--

星期三, 1月 26, 2011

[ZK] comfirm in zk component

使用程式控制替元件加入comfirm javascript。
範例如下:
//removePhoto.setWidgetListener("onClick", "alert('test');");
removePhoto.setWidgetListener("onClick", "if(!confirm('Remove Your Picture?')){evt.stop({au:true});}");

A client-side event listener could stop the sending of a widget event to the server by invoking Event.stop(Map) with {au:true}, such as

evt.stop({au: true});

Reference:
ZK Client-side Reference/Notifications/Widget Events
ZK Client-side Reference/Communication/AU Requests/Client-side Firing

星期一, 1月 24, 2011

[Alfresco] AdministrationServiceSystemTest.java

AdministrationServiceSystemTest.java
Language: Java
License: GPL
Copyright: (C) 2005-2007 Alfresco Software Limited.
LOC: 304
使用alfresco webservice提供簡單的User management測試範例,值得參考。


Reference:
AdministrationServiceSystemTest.java 

星期三, 1月 12, 2011

[Windows] 使用 net use 指令連線網路磁碟機

如果想要把連線指定到你本機的磁碟機p:,那可以這樣用
net use p: "\\serverip\foldername" /user:useraccount password /persistent:no

星期日, 1月 09, 2011

[Asp.Net] Https using WebClient

等入驗證之前先補上這一段就可以取得加密的憑證

即可用正常的webclient
try
{
System.Net.ServicePointManager.ServerCertificateValidationCallback =
delegate(object senderX, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
{
return true;
};
HtmlText = wc.DownloadString(wc.BaseAddress);

}
catch
{
System.Environment.Exit(System.Environment.ExitCode);
}

[Alfresco] Node References and Store Protocols

了解Alfresco的NodeRef與StoreRef的差異。

Reference:
Node References and Store Protocols

SourceCode:
NodeArchiveServiceImpl.java 
NodeRefTest.java
ArchiveAndRestoreTest.java

星期二, 1月 04, 2011

[Alfresco] Content Domain Model Notes

這隻ContentModel.java實作Alfresco Data Domain Model相關的QNAME,
簡單來說,就是把各個Data Domain Model內定義的QNAME,
用程式控制來取得完整的QName String

QNAME Format:{NameSapce}Name
Example:{http://www.alfresco.org/model/content/1.0}content


簡單分析contentModel.xml的結構:
model(root)
  --imports
  --namespaces
  --constrains
  --types
     --title
     --parent
     --archive
     --association
        --child-association
     --properties
        --property
   --aspects
      --aspect
      --title(aspect標題)
      --properties(aspect擁有的屬性集)
        --property
           --title(property標題)
           --type(屬性資料型態)
           --default(資料是否有預設值)
           --protected
           --index
           --mandatory
  --mandotory-aspects
     --aspect
  --associations
     --association
     --child-association

看ContentModel.xml原始碼

Reference:
ContentModel.java

其他你感興趣的文章

Related Posts with Thumbnails