Hi,
I am new to CSSDK. I have a task where i need to read the files from the team site server to get the extended attributes using java, i was able to make connection to the server using the following code.
Properties configProperties = new Properties();
String host = <servername>;
configProperties.setProperty("com.interwoven.cssdk.factory.CSFactory", "com.interwoven.cssdk.factory.CSJavaFactory");
configProperties.setProperty("defaultTSServer",host);
configProperties.setProperty("ts.server.os","linux");
CSFactory factory = CSFactory.getFactory(configProperties);
CSClient client;
try {
client = factory.getClient(<username>, "", <password>, Locale.getDefault(),"JavaTSClient", host);
CSVPath path = new CSVPath(<PathOfFile>);
CSFile csfile=client.getFile(path);
CSSimpleFile xslTemplateFile = (CSSimpleFile) csfile;
System.out.println("CSSimpleFile ===="+xslTemplateFile);
CSExtendedAttribute[] extendedAttributes= xslTemplateFile.getExtendedAttributes(new String[] {"FAS_Title","FAS_Description","Creation_date","Expiration_date","FAS_Keywords","Emailable"});
System.out.println("extendedAttribute::"+extendedAttributes[2].getValue());
} catch (CSAuthenticationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (CSRemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (CSException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Here is the out put of the program
CSSimpleFile ====
---
com.interwoven.cssdk.filesys.impl.CSSimpleFileImpl{
name=VYMI_onepager.pdf
creationDate=Tue Aug 16 10:02:55 EDT 2016
creator=root
owner=root
group=fas_sites
permissions=rwxrwxr-x
locked=false
lockComment="null"
lockOwner=null
lockCreator=null
lockAreaVPath=null
lockCreationDate=null
contentModificationDate=Tue Aug 16 10:02:55 EDT 2016
attributeModificationDate=Tue Dec 20 10:55:42 EST 2016
kind=1
modified=true
lastModifier=root
readable=true
writable=false
privateToWorkarea=false
vpath=//dvlva162/fas/main/sites/xfa/WORKAREA/content/WEB/iPadANDeConnect/VYMI_onepager.pdf
size=220132
revisionString=/main/sites/xfa/1+
revisionComment=
revisionNumber=1
revisionBranch=//dvlva162/fas/main/sites/xfa
}
---
extendedAttribute::null
I am able to see the file have TeamSite/Metadata/Creation_date: 2016-08-12 as extended attribute.