02-06-2009 06:29 AM
if (nodeService.exists( pActionedUponNodeRef ))
{
// on increment le compteur de nombre de document scannes
NodeRef lEditerFolder = mscSearchService
.getFolder( MscFolderEnum.FOLDER_EDITER.getFolderName() );
int lCounter = 1;
// add the cm:countable aspect as required
if (!nodeService.hasAspect( lEditerFolder,
ContentModel.ASPECT_COUNTABLE ))
{
// set the value to 1 by default
Map<QName, Serializable> props = new HashMap<QName, Serializable>(
1 );
props.put( ContentModel.PROP_COUNTER, lCounter );
nodeService.addAspect( lEditerFolder,
ContentModel.ASPECT_COUNTABLE, props );
}
else
{
// increment the value and handle possibility that no value has
// been set yet
lCounter = (Integer) nodeService.getProperty( lEditerFolder,
ContentModel.PROP_COUNTER );
nodeService.setProperty( lEditerFolder,
ContentModel.PROP_COUNTER, ++lCounter );
}
// valeurs des métadonnées par défaut
// nom de fichier
SimpleDateFormat lDateFormat = new SimpleDateFormat( "ddMMyy",
Locale.FRANCE );
String lToday = lDateFormat.format( new Date() );
NumberFormat lNumberFormat = NumberFormat.getInstance();
lNumberFormat.setMinimumIntegerDigits( PAD_LENGTH );
lNumberFormat.setGroupingUsed( false );
String lDocName = lToday
+ lNumberFormat.format( lCounter
% Math.pow( 10, PAD_LENGTH ) ) + PDF_EXTENSION;
// content type
Map<QName, Serializable> lPropertiesMap = nodeService
.getProperties( pActionedUponNodeRef );
// msc:courrier par défaut
lPropertiesMap.putAll( MscPropertyEnum.getInitialPropertiesMap() );
// msc:trace
Date lCreated = (Date) nodeService.getProperty(
pActionedUponNodeRef, ContentModel.PROP_CREATED );
MscPropertyTrace lTrace = new MscPropertyTrace();
lTrace.setWhen( lCreated );
lTrace.setWho( "" );
lPropertiesMap.put( MscPropertyEnum.PROPERTY_TRACE.getQName(),
lTrace.toString() );
// cm:name
lPropertiesMap.put( ContentModel.PROP_NAME, lDocName );
nodeService.setProperties( pActionedUponNodeRef, lPropertiesMap );
}
02-06-2009 10:12 AM
<alfresco-config area="file-servers">
<!– To override the default Alfresco filesystem use replace="true", to –>
<!– add additional filesystems remove the replace="true" attribute –>
<config evaluator="string-compare" condition="Filesystems" replace="true">
<filesystems>
<filesystem name="Alfresco">
<store>workspace://SpacesStore</store>
<rootPath>/app:company_home</rootPath>
<relativePath>/Importes</relativePath>
<!– Add a URL file to each folder that links back to the web client –>
<urlFile>
<filename>__Alfresco.url</filename>
<webpath>http://${localname}:8080/alfresco/</webpath>
</urlFile>
<!– Mark locked files as offline –>
<offlineFiles/>
<!– Desktop actions –>
<desktopActions>
<global>
<path>alfresco/desktop/Alfresco.exe</path>
<webpath>http://${localname}:8080/fr.intuitiv.msc/</webpath>
</global>
<action>
<class>org.alfresco.filesys.smb.server.repo.desk.CheckInOutDesktopAction</class>
<name>CheckInOut</name>
<filename>__CheckInOut.exe</filename>
</action>
<action>
<class>org.alfresco.filesys.smb.server.repo.desk.JavaScriptDesktopAction</class>
<name>JavaScriptURL</name>
<filename>__ShowDetails.exe</filename>
<script>alfresco/desktop/showDetails.js</script>
<attributes>anyFiles</attributes>
<preprocess>copyToTarget</preprocess>
</action>
</desktopActions>
<!–
<accessControl default="Write">
<user name="admin" access="Write"/>
<address subnet="90.1.0.0" mask="255.255.0.0" access="Write"/>
</accessControl>
–>
</filesystem>
<!– AVM virtualization view of all stores/versions for WCM –>
<avmfilesystem name="AVM">
<virtualView/>
</avmfilesystem>
</filesystems>
</config>
<config evaluator="string-compare" condition="CIFS Server" replace="true">
<serverEnable enabled="true"/>
<host name="AlfrescoA"/>
<comment>Alfresco CIFS Server</comment>
<!– Set to the broadcast mask for the subnet –>
<broadcast>255.255.255.0</broadcast>
<!– Use Java socket based NetBIOS over TCP/IP and native SMB on linux –>
<tcpipSMB platforms="linux,solaris,macosx"/>
<netBIOSSMB platforms="linux,solaris,macosx"/>
<!– Can be mapped to non-privileged ports, then use firewall rules to forward
requests from the standard ports –>
<!–
<tcpipSMB port="1445" platforms="linux,solaris,macosx"/>
<netBIOSSMB sessionPort="1139" namePort="1137" datagramPort="1138" platforms="linux,solaris,macosx"/>
–>
<hostAnnounce interval="5"/>
<!– Use Win32 NetBIOS interface on Windows –>
<Win32NetBIOS/>
<Win32Announce interval="5"/>
<!–
<WINS>
<primary>1.2.3.4</primary>
<secondary>5.6.7.8</secondary>
</WINS>
–>
<sessionDebug flags="Negotiate,Socket"/>
</config>
<config evaluator="string-compare" condition="FTP Server">
<serverEnable enabled="false"/>
<port>22</port>
<rootDirectory>/Alfresco</rootDirectory>
</config>
</alfresco-config>
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.