Moving to root below branch label

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2005 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2005-12-08 07:13:07 +00:00
commit e1e6508fec
1095 changed files with 230566 additions and 0 deletions

10
.classpath Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="source/java"/>
<classpathentry kind="src" path="config"/>
<classpathentry kind="src" path="source/test-resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="/Core"/>
<classpathentry kind="src" path="/3rd Party"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
<stringAttribute key="process_factory_id" value="org.eclipse.ant.ui.remoteAntProcessFactory"/>
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="true"/>
<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="true"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ant.internal.ui.antsupport.InternalAntRunner"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="incremental,auto,"/>
<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:Repository}"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS" value="compile-jibx,"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_TYPE_ID" value="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType"/>
<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AUTO_TARGETS" value="compile-jibx,"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_NAME" value="jdk1.5.0_03"/>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.5.0_02&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.ant.ui.classpathentry.antHome&quot;&gt;&#10;&lt;memento default=&quot;true&quot;/&gt;&#10;&lt;/runtimeClasspathEntry&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.ant.ui.classpathentry.extraClasspathEntries&quot;&gt;&#10;&lt;memento/&gt;&#10;&lt;/runtimeClasspathEntry&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/3rd Party/lib/jibx/jibx-run.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/3rd Party/lib/jibx/jibx-bind.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/3rd Party/lib/bcel.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/3rd Party/lib/xpp3.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
</listAttribute>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/Repository/project-build.xml}"/>
</launchConfiguration>

28
.project Normal file
View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Repository</name>
<comment>JavaCC Nature</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>auto,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/JibX.launch</value>
</dictionary>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>rk.eclipse.javacc.javaccnature</nature>
</natures>
</projectDescription>

View File

@@ -0,0 +1,299 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- Action Service -->
<bean id="actionService" class="org.alfresco.repo.action.ActionServiceImpl" init-method="initialise">
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="policyComponent">
<ref bean="policyComponent"/>
</property>
<property name="searchService">
<ref bean="SearchService" />
</property>
<property name="transactionService">
<ref bean="transactionComponent"/>
</property>
<property name="asynchronousActionExecutionQueue">
<ref bean="asynchronousActionExecutionQueue"/>
</property>
</bean>
<bean id="asynchronousActionExecutionQueue" class="org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl">
<property name="transactionService">
<ref bean="transactionComponent"/>
</property>
<property name="authenticationComponent">
<ref bean="authenticationComponent"/>
</property>
</bean>
<!-- Actions Aspect -->
<bean id="actionsAspect" class="org.alfresco.repo.action.ActionsAspect" init-method="init">
<property name="nodeService">
<ref bean="nodeService"/>
</property>
<property name="policyComponent">
<ref bean="policyComponent"/>
</property>
<property name="ruleService">
<ref bean="ruleService"/>
</property>
</bean>
<!-- I18N -->
<bean id="actionResourceBundles" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>
<value>alfresco.messages.action-service</value>
<value>alfresco.messages.action-config</value>
</list>
</property>
</bean>
<!-- Action Conditions -->
<bean id="action-condition-evaluator" init-method="init">
<property name="runtimeActionService">
<ref bean="actionService" />
</property>
</bean>
<bean id="no-condition" class="org.alfresco.repo.action.evaluator.NoConditionEvaluator" parent="action-condition-evaluator">
</bean>
<bean id="compare-property-value" class="org.alfresco.repo.action.evaluator.ComparePropertyValueEvaluator" parent="action-condition-evaluator">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="contentService">
<ref bean="contentService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="propertyValueComparators">
<list>
<bean class="org.alfresco.repo.action.evaluator.compare.TextPropertyValueComparator"/>
<bean class="org.alfresco.repo.action.evaluator.compare.NumericPropertyValueComparator"/>
<bean class="org.alfresco.repo.action.evaluator.compare.DatePropertyValueComparator"/>
</list>
</property>
</bean>
<bean id="compare-mime-type" class="org.alfresco.repo.action.evaluator.CompareMimeTypeEvaluator" parent="compare-property-value"/>
<bean id="in-category" class="org.alfresco.repo.action.evaluator.InCategoryEvaluator" parent="action-condition-evaluator">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
</bean>
<bean id="is-subtype" class="org.alfresco.repo.action.evaluator.IsSubTypeEvaluator" parent="action-condition-evaluator">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
</bean>
<bean id="has-aspect" class="org.alfresco.repo.action.evaluator.HasAspectEvaluator" parent="action-condition-evaluator">
<property name="nodeService">
<ref bean="nodeService" />
</property>
</bean>
<bean id="has-version-history" class="org.alfresco.repo.action.evaluator.HasVersionHistoryEvaluator" parent="action-condition-evaluator">
<property name="publicCondition">
<value>false</value>
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="versionService">
<ref bean="versionService" />
</property>
</bean>
<!-- Actions -->
<bean id="action-executer" init-method="init">
<property name="runtimeActionService">
<ref bean="actionService" />
</property>
</bean>
<bean id="composite-action" class="org.alfresco.repo.action.executer.CompositeActionExecuter" parent="action-executer">
<property name="publicAction">
<value>false</value>
</property>
<property name="actionService">
<ref bean="actionService"/>
</property>
</bean>
<bean id="create-version" class="org.alfresco.repo.action.executer.CreateVersionActionExecuter" parent="action-executer">
<property name="publicAction">
<value>false</value>
</property>
<property name="nodeService">
<ref bean="nodeService"/>
</property>
<property name="versionService">
<ref bean="versionService"/>
</property>
</bean>
<bean id="add-features" class="org.alfresco.repo.action.executer.AddFeaturesActionExecuter" parent="action-executer">
<property name="nodeService">
<ref bean="nodeService" />
</property>
</bean>
<bean id="specialise-type" class="org.alfresco.repo.action.executer.SpecialiseTypeActionExecuter" parent="action-executer">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
</bean>
<bean id="link-category" class="org.alfresco.repo.action.executer.LinkCategoryActionExecuter" parent="action-executer">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
</bean>
<bean id="simple-workflow" class="org.alfresco.repo.action.executer.SimpleWorkflowActionExecuter" parent="action-executer">
<property name="nodeService">
<ref bean="nodeService" />
</property>
</bean>
<bean id="transform" class="org.alfresco.repo.action.executer.TransformActionExecuter" parent="action-executer">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="contentService">
<ref bean="contentService" />
</property>
<property name="copyService">
<ref bean="copyService" />
</property>
<property name="mimetypeService">
<ref bean="mimetypeMap" />
</property>
</bean>
<bean id="transform-image" class="org.alfresco.repo.action.executer.ImageTransformActionExecuter"
parent="transform">
<property name="imageMagickContentTransformer">
<ref bean="transformer.ImageMagick" />
</property>
</bean>
<bean id="copy" class="org.alfresco.repo.action.executer.CopyActionExecuter" parent="action-executer">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="copyService">
<ref bean="copyService" />
</property>
</bean>
<bean id="move" class="org.alfresco.repo.action.executer.MoveActionExecuter" parent="action-executer">
<property name="nodeService">
<ref bean="nodeService" />
</property>
</bean>
<bean id="check-in" class="org.alfresco.repo.action.executer.CheckInActionExecuter" parent="action-executer">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="cociService">
<ref bean="checkOutCheckInService"></ref>
</property>
</bean>
<bean id="check-out" class="org.alfresco.repo.action.executer.CheckOutActionExecuter" parent="action-executer">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="cociService">
<ref bean="checkOutCheckInService"></ref>
</property>
</bean>
<bean id="mail" class="org.alfresco.repo.action.executer.MailActionExecuter" parent="action-executer">
<property name="mailService">
<ref bean="mailService"></ref>
</property>
</bean>
<bean id="set-property-value" class="org.alfresco.repo.action.executer.SetPropertyValueActionExecuter" parent="action-executer">
<property name="publicAction">
<value>false</value>
</property>
<property name="nodeService">
<ref bean="nodeService"></ref>
</property>
</bean>
<bean id="extract-metadata" class="org.alfresco.repo.action.executer.ContentMetadataExtracter" parent="action-executer">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="contentService">
<ref bean="contentService" />
</property>
<property name="metadataExtracterRegistry">
<ref bean="metadataExtracterRegistry" />
</property>
</bean>
<bean id="import" class="org.alfresco.repo.action.executer.ImporterActionExecuter" parent="action-executer">
<property name="importerService">
<ref bean="ImporterService"/>
</property>
<property name="nodeService">
<ref bean="nodeService"></ref>
</property>
<property name="contentService">
<ref bean="contentService" />
</property>
</bean>
<bean id="export" class="org.alfresco.repo.action.executer.ExporterActionExecuter" parent="action-executer">
<property name="publicAction">
<value>false</value>
</property>
<property name="exporterService">
<ref bean="ExporterService"/>
</property>
<property name="nodeService">
<ref bean="nodeService"></ref>
</property>
<property name="contentService">
<ref bean="contentService" />
</property>
</bean>
</beans>

View File

@@ -0,0 +1,863 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!-- This file must be split up once the number and spread of beans increases qweqwe -->
<beans>
<import resource="classpath:alfresco/public-services-context.xml" />
<import resource="classpath:alfresco/model-specific-services-context.xml" />
<import resource="classpath:alfresco/action-services-context.xml" />
<import resource="classpath:alfresco/rule-services-context.xml" />
<import resource="classpath:alfresco/node-services-context.xml" />
<import resource="classpath:alfresco/scheduled-jobs-context.xml" />
<import resource="classpath:alfresco/network-protocol-context.xml" />
<import resource="classpath:alfresco/content-services-context.xml" />
<import resource="classpath:alfresco/hibernate-context.xml" />
<import resource="classpath:alfresco/ownable-services-context.xml" />
<import resource="classpath:alfresco/template-services-context.xml" />
<import resource="classpath:alfresco/index-recovery-context.xml" />
<import resource="classpath:alfresco/extension/extension-context.xml" />
<import resource="classpath:alfresco/authority-services-context.xml" />
<import resource="classpath:alfresco/authentication-services-context.xml" />
<!-- Descriptor Service -->
<bean id="descriptorComponent" class="org.alfresco.repo.descriptor.DescriptorServiceImpl" init-method="init">
<property name="serverDescriptor">
<value>classpath:alfresco/version.properties</value>
</property>
<property name="systemBootstrap">
<ref local="systemBootstrap"/>
</property>
<property name="transactionService">
<ref bean="transactionComponent"/>
</property>
<property name="namespaceService">
<ref bean="namespaceService"/>
</property>
<property name="nodeService">
<ref bean="nodeService"/>
</property>
<property name="searchService">
<ref bean="searchService"/>
</property>
</bean>
<!-- -->
<!-- PERSISTENCE -->
<!-- -->
<!-- load common properties -->
<bean id="repository-properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders">
<value>true</value>
</property>
<property name="locations">
<list>
<value>classpath:alfresco/repository.properties</value>
<value>classpath:alfresco/version.properties</value>
<value>classpath:alfresco/domain/transaction.properties</value>
</list>
</property>
</bean>
<!-- Datasource bean -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName">
<value>${db.driver}</value>
</property>
<property name="url">
<value>${db.url}</value>
</property>
<property name="username">
<value>${db.username}</value>
</property>
<property name="password">
<value>${db.password}</value>
</property>
<property name="initialSize" >
<value>20</value>
</property>
<property name="maxActive" >
<value>20</value>
</property>
</bean>
<!-- transaction service -->
<bean id="transactionComponent" class="org.alfresco.repo.transaction.TransactionComponent">
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="allowWrite">
<value>${server.transaction.allow-writes}</value>
</property>
</bean>
<!-- use around method calls to debug - see class comments for details -->
<bean id="methodCallLogAdvice" class="org.alfresco.util.debug.MethodCallLogAdvice" />
<!-- -->
<!-- I18N -->
<!-- -->
<bean id="resourceBundles" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>
<value>alfresco.messages.version-service</value>
<value>alfresco.messages.permissions-service</value>
<value>alfresco.messages.content-service</value>
<value>alfresco.messages.coci-service</value>
<value>alfresco.messages.template-service</value>
</list>
</property>
</bean>
<!-- -->
<!-- MAIL SERVICE -->
<!-- -->
<bean id="mailService" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host">
<value>${mail.host}</value>
</property>
<property name="port">
<value>${mail.port}</value>
</property>
<property name="username">
<value>${mail.username}</value>
</property>
<property name="password">
<value>${mail.password}</value>
</property>
</bean>
<!-- -->
<!-- CONFIGURATION SERVICES -->
<!-- -->
<bean id="repoConfigService" class="org.alfresco.config.xml.XMLConfigService" init-method="init">
<constructor-arg>
<bean class="org.alfresco.config.source.ClassPathConfigSource">
<constructor-arg>
<list>
<value>alfresco/mimetype-map.xml</value>
</list>
</constructor-arg>
</bean>
</constructor-arg>
</bean>
<!-- -->
<!-- Indexing and Search API -->
<!-- -->
<bean id="indexerComponent" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.repo.search.Indexer</value>
</property>
<property name="target">
<bean class="org.alfresco.repo.search.IndexerComponent">
<property name="indexerAndSearcherFactory">
<ref bean="indexerAndSearcherFactory" />
</property>
</bean>
</property>
<!-- use for debugging
<property name="interceptorNames">
<list>
<idref bean="methodCallLogAdvice" />
<idref local="indexerComponent_PerformanceMonitorAdvice" />
</list>
</property>
-->
</bean>
<bean id="indexerComponent_PerformanceMonitorAdvice" class="org.alfresco.util.perf.PerformanceMonitorAdvice">
<constructor-arg>
<value>indexerComponent</value>
</constructor-arg>
</bean>
<bean id="searchService" class="org.alfresco.repo.search.SearcherComponent">
<property name="indexerAndSearcherFactory">
<ref bean="indexerAndSearcherFactory" />
</property>
</bean>
<!-- -->
<!-- Generic factory for making indexers and searchers for a given protol or store -->
<!-- -->
<bean id="indexerAndSearcherFactory" class="org.alfresco.repo.service.StoreRedirectorProxyFactory">
<property name="proxyInterface">
<value>org.alfresco.repo.search.IndexerAndSearcher</value>
</property>
<property name="defaultBinding">
<ref bean="luceneIndexerAndSearcherFactory"></ref>
</property>
<property name="redirectedProtocolBindings">
<map>
<entry key="workspace">
<ref bean="luceneIndexerAndSearcherFactory"></ref>
</entry>
<entry key="versionStore">
<ref bean="luceneIndexerAndSearcherFactory"></ref>
</entry>
</map>
</property>
</bean>
<bean id="categoryService" class="org.alfresco.repo.service.StoreRedirectorProxyFactory">
<property name="proxyInterface">
<value>org.alfresco.service.cmr.search.CategoryService</value>
</property>
<property name="defaultBinding">
<ref bean="luceneCategoryService"></ref>
</property>
<property name="redirectedProtocolBindings">
<map>
<entry key="workspace">
<ref bean="luceneCategoryService"></ref>
</entry>
<entry key="versionStore">
<ref bean="luceneCategoryService"></ref>
</entry>
</map>
</property>
</bean>
<!-- Indexer and searchers for lucene -->
<bean id="luceneIndexerAndSearcherFactory"
class="org.alfresco.repo.search.impl.lucene.LuceneIndexerAndSearcherFactory">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="nameSpaceService">
<ref bean="namespaceService" />
</property>
<property name="luceneIndexLock">
<ref bean="luceneIndexLock" />
</property>
<property name="luceneFullTextSearchIndexer">
<ref bean="LuceneFullTextSearchIndexer" />
</property>
<property name="indexRootLocation">
<value>${dir.indexes}</value>
</property>
<property name="contentService">
<ref bean="contentService" />
</property>
<property name="queryRegister">
<ref bean="queryRegisterComponent" />
</property>
<property name="queryMaxClauses">
<value>${lucene.query.maxClauses}</value>
</property>
<property name="indexerBatchSize">
<value>${lucene.indexer.batchSize}</value>
</property>
<property name="indexerMinMergeDocs">
<value>${lucene.indexer.minMergeDocs}</value>
</property>
<property name="indexerMergeFactor">
<value>${lucene.indexer.mergeFactor}</value>
</property>
<property name="indexerMaxMergeDocs">
<value>${lucene.indexer.maxMergeDocs}</value>
</property>
<property name="lockDirectory">
<value>${dir.indexes.lock}</value>
</property>
<property name="indexerMaxFieldLength">
<value>${lucene.indexer.maxFieldLength}</value>
</property>
</bean>
<!-- Indexer and searchers for lucene -->
<bean id="luceneCategoryService" class="org.alfresco.repo.search.impl.lucene.LuceneCategoryServiceImpl">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="namespacePrefixResolver">
<ref bean="namespaceService" />
</property>
<property name="indexerAndSearcher">
<ref bean="luceneIndexerAndSearcherFactory" />
</property>
</bean>
<!-- Support for locking lucene indexes for deletion and update -->
<bean id="luceneIndexLock" class="org.alfresco.repo.search.transaction.LuceneIndexLock"></bean>
<!-- -->
<!-- Lock Service -->
<!-- -->
<bean id="lockService" class="org.alfresco.repo.lock.LockServiceImpl" init-method="initialise">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="policyComponent">
<ref bean="policyComponent" />
</property>
<property name="authenticationService">
<ref bean="authenticationServiceImpl"></ref>
</property>
<property name="ownableService">
<ref bean="ownableService"></ref>
</property>
<property name="searchService">
<ref bean="searchService"></ref>
</property>
</bean>
<!-- -->
<!-- Version Service -->
<!-- -->
<bean id="versionService" class="org.alfresco.repo.version.VersionServiceImpl" init-method="initialise">
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="dbNodeService">
<ref bean="dbNodeService" />
</property>
<property name="versionCounterDaoService">
<ref bean="versionCounterDaoService" />
</property>
<property name="searcher">
<ref bean="searchService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="policyComponent">
<ref bean="policyComponent" />
</property>
<property name="policyBehaviourFilter">
<ref bean="policyBehaviourFilter" />
</property>
</bean>
<bean id="versionNodeService" class="org.alfresco.repo.version.NodeServiceImpl">
<property name="dbNodeService">
<ref bean="dbNodeService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
</bean>
<bean id="versionCounterDaoService" class="org.alfresco.repo.version.common.counter.hibernate.HibernateVersionCounterDaoServiceImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="versionBootstrap" class="org.alfresco.repo.version.VersionBootstrap" init-method="bootstrap">
<property name="transactionService">
<ref bean="transactionComponent"/>
</property>
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="authenticationComponent">
<ref bean="authenticationComponent" />
</property>
<property name="permissionService">
<ref bean="permissionService" />
</property>
</bean>
<bean id="versionableAspect" class="org.alfresco.repo.version.VersionableAspect" init-method="init">
<property name="policyComponent">
<ref bean="policyComponent" />
</property>
<property name="ruleService">
<ref bean="ruleService"/>
</property>
<property name="nodeService">
<ref bean="nodeService"/>
</property>
<property name="actionService">
<ref bean="actionService"/>
</property>
</bean>
<!-- -->
<!-- Data Dictionary -->
<!-- -->
<bean id="namespaceDAO" class="org.alfresco.repo.dictionary.NamespaceDAOImpl" />
<bean id="dictionaryModelType" class="org.alfresco.repo.dictionary.DictionaryModelType" init-method="init">
<property name="dictionaryDAO">
<ref bean="dictionaryDAO" />
</property>
<property name="namespaceDAO">
<ref bean="namespaceDAO" />
</property>
<property name="nodeService">
<ref bean="nodeService"/>
</property>
<property name="contentService">
<ref bean="contentService"/>
</property>
<property name="policyComponent">
<ref bean="policyComponent"/>
</property>
</bean>
<bean id="dictionaryDAO" class="org.alfresco.repo.dictionary.DictionaryDAOImpl">
<constructor-arg index="0">
<ref bean="namespaceDAO" />
</constructor-arg>
</bean>
<bean id="dictionaryService" class="org.alfresco.repo.dictionary.DictionaryComponent" depends-on="extension.dictionaryBootstrap">
<property name="dictionaryDAO">
<ref bean="dictionaryDAO" />
</property>
</bean>
<bean id="namespaceService" class="org.alfresco.repo.dictionary.DictionaryNamespaceComponent"
depends-on="dictionaryDAO">
<property name="namespaceDAO">
<ref bean="namespaceDAO" />
</property>
</bean>
<bean id="dictionaryBootstrap" class="org.alfresco.repo.dictionary.DictionaryBootstrap" init-method="bootstrap">
<property name="dictionaryDAO"><ref local="dictionaryDAO"/></property>
<property name="models">
<list>
<value>alfresco/model/dictionaryModel.xml</value>
<value>alfresco/model/systemModel.xml</value>
<value>alfresco/model/contentModel.xml</value>
<value>alfresco/model/applicationModel.xml</value>
<value>alfresco/model/forumModel.xml</value>
<!-- Implementation models -->
<value>org/alfresco/repo/security/authentication/userModel.xml</value>
<value>org/alfresco/repo/action/actionModel.xml</value>
<value>org/alfresco/repo/rule/ruleModel.xml</value>
<value>org/alfresco/repo/version/version_model.xml</value>
</list>
</property>
<property name="labels">
<list>
<value>alfresco/model/dataTypeAnalyzers</value>
<value>alfresco/messages/system-model</value>
<value>alfresco/messages/dictionary-model</value>
<value>alfresco/messages/content-model</value>
<value>alfresco/messages/application-model</value>
<value>alfresco/messages/forum-model</value>
</list>
</property>
</bean>
<bean id="dictionaryRepositoryBootstrap" class="org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap" init-method="bootstrap">
<property name="dictionaryDAO">
<ref local="dictionaryDAO"/>
</property>
<property name="contentService">
<ref bean="contentService"/>
</property>
<property name="searchService">
<ref bean="searchService"/>
</property>
<property name="transactionService">
<ref bean="transactionComponent"/>
</property>
<property name="authenticationComponent">
<ref bean="authenticationComponent"/>
</property>
</bean>
<!-- -->
<!-- Copy Service -->
<!-- -->
<!-- Note this uses the node service that enforces permissions so you can only copy what you can see -->
<bean id="copyService" class="org.alfresco.repo.copy.CopyServiceImpl" init-method="init">
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="policyComponent">
<ref bean="policyComponent" />
</property>
<property name="ruleService">
<ref bean="ruleService" />
</property>
</bean>
<!-- -->
<!-- CheckOut/CheckIn Service -->
<!-- -->
<bean id="checkOutCheckInService" class="org.alfresco.repo.coci.CheckOutCheckInServiceImpl">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="versionService">
<ref bean="versionService" />
</property>
<property name="lockService">
<ref bean="LockService" />
</property>
<property name="copyService">
<ref bean="CopyService" />
</property>
<property name="authenticationService">
<ref bean="authenticationService" />
</property>
<property name="searchService">
<ref bean="searchService" />
</property>
<property name="versionableAspect">
<ref bean="versionableAspect" />
</property>
</bean>
<bean id="workingCopyAspect" class="org.alfresco.repo.coci.WorkingCopyAspect" init-method="init">
<property name="policyComponent">
<ref bean="policyComponent" />
</property>
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="lockService">
<ref bean="LockService" />
</property>
</bean>
<!-- Policy Support -->
<bean id="policyBehaviourFilter" class="org.alfresco.repo.policy.BehaviourFilterImpl">
<property name="dictionaryService">
<ref bean="dictionaryService"/>
</property>
</bean>
<bean id="policyComponent" class="org.alfresco.repo.policy.PolicyComponentImpl">
<constructor-arg index="0">
<ref bean="dictionaryService"/>
</constructor-arg>
<property name="behaviourFilter">
<ref bean="policyBehaviourFilter"/>
</property>
</bean>
<!-- Bean to support full text search -->
<bean id="LuceneFullTextSearchIndexer"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexer</value>
</property>
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="target">
<bean class="org.alfresco.repo.search.impl.lucene.fts.FullTextSearchIndexerImpl">
<property name="luceneIndexerAndSearcherFactory">
<ref bean="luceneIndexerAndSearcherFactory" />
</property>
</bean>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<!-- Bean to backup Lucene indexes -->
<bean id="luceneIndexBackupComponent"
class="org.alfresco.repo.search.impl.lucene.LuceneIndexerAndSearcherFactory$LuceneIndexBackupComponent">
<property name="transactionService">
<ref bean="transactionComponent" />
</property>
<property name="factory">
<ref bean="luceneIndexerAndSearcherFactory" />
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="targetLocation">
<value>${dir.root}/backup-lucene-indexes</value>
</property>
</bean>
<!-- -->
<!-- Thread Pool -->
<!-- -->
<bean id="threadPoolExecutor" class="org.alfresco.util.ThreadPoolExecutorFactoryBean" singleton="true" >
<property name="corePoolSize">
<value>5</value>
</property>
<property name="maximumPoolSize">
<value>20</value>
</property>
<property name="keepAliveTime">
<value>60</value>
</property>
</bean>
<!-- Query Register Component -->
<bean id="queryRegisterComponent" class="org.alfresco.repo.search.QueryRegisterComponentImpl">
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="namespaceService">
<ref bean="namespaceService" />
</property>
<!-- Query collections should be loaded on demand using this component - once loaded thay are available for use -->
</bean>
<!-- Security related beans -->
<!-- Importer -->
<bean id="viewParser" class="org.alfresco.repo.importer.view.ViewParser">
<property name="namespaceService">
<ref bean="namespaceService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
</bean>
<bean id="importerComponent" class="org.alfresco.repo.importer.ImporterComponent">
<!-- For now, hard-wire the view parser -->
<property name="viewParser">
<ref bean="viewParser" />
</property>
<property name="namespaceService">
<ref bean="namespaceService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="behaviourFilter">
<ref bean="policyBehaviourFilter" />
</property>
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="searchService">
<ref bean="SearchService" />
</property>
<property name="contentService">
<ref bean="ContentService" />
</property>
<property name="ruleService">
<ref bean="ruleService" />
</property>
</bean>
<bean id="systemBootstrap" class="org.alfresco.repo.importer.ImporterBootstrap" init-method="bootstrap" depends-on="nodeIndexer, auditableAspect">
<property name="transactionService">
<ref bean="transactionComponent"/>
</property>
<property name="nodeService">
<ref bean="nodeService"/>
</property>
<property name="importerService">
<ref bean="importerComponent"/>
</property>
<property name="namespaceService">
<ref bean="namespaceService"/>
</property>
<property name="authenticationComponent">
<ref bean="authenticationComponent" />
</property>
<property name="storeUrl">
<value>${system.store}</value>
</property>
<property name="allowWrite">
<value>${server.transaction.allow-writes}</value>
</property>
<property name="mustNotExistStoreUrls">
<list>
<value>${spaces.store}</value>
</list>
</property>
<property name="configuration">
<props>
<prop key="version.major">${version.major}</prop>
<prop key="version.minor">${version.minor}</prop>
<prop key="version.revision">${version.revision}</prop>
<prop key="version.label">${version.label}</prop>
<prop key="system.descriptor.childname">${system.descriptor.childname}</prop>
</props>
</property>
<property name="bootstrapViews">
<list>
<props>
<prop key="path">/</prop>
<prop key="location">alfresco/bootstrap/descriptor.xml</prop>
</props>
</list>
</property>
</bean>
<bean id="importerBootstrap" class="org.alfresco.repo.importer.ImporterBootstrap" init-method="bootstrap" depends-on="systemBootstrap">
<property name="transactionService">
<ref bean="transactionComponent"/>
</property>
<property name="nodeService">
<ref bean="nodeService"/>
</property>
<property name="importerService">
<ref bean="importerComponent"/>
</property>
<property name="namespaceService">
<ref bean="namespaceService"/>
</property>
<property name="authenticationComponent">
<ref bean="authenticationComponent" />
</property>
<property name="storeUrl">
<value>${spaces.store}</value>
</property>
<property name="allowWrite">
<value>${server.transaction.allow-writes}</value>
</property>
<property name="configuration">
<props>
<prop key="spaces.company_home.childname">${spaces.company_home.childname}</prop>
<prop key="spaces.dictionary.childname">${spaces.dictionary.childname}</prop>
<prop key="spaces.templates.childname">${spaces.templates.childname}</prop>
<prop key="spaces.templates.content.childname">${spaces.templates.content.childname}</prop>
</props>
</property>
<!-- To specify a locale other than the system default, uncomment the following
<property name="locale">
<value>en_GB</value>
</property>
-->
<property name="bootstrapViews">
<list>
<props>
<prop key="path">/</prop>
<prop key="location">alfresco/bootstrap/categories.xml</prop>
</props>
<props>
<prop key="path">/</prop>
<prop key="location">alfresco/bootstrap/spaces.xml</prop>
<prop key="messages">alfresco/messages/bootstrap-spaces</prop>
</props>
<props>
<prop key="path">/${spaces.company_home.childname}</prop>
<prop key="location">alfresco/bootstrap/tutorial.xml</prop>
<prop key="messages">alfresco/messages/bootstrap-tutorial</prop>
</props>
<props>
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.childname}</prop>
<prop key="location">alfresco/templates/software_engineering_project.xml</prop>
<prop key="messages">alfresco/messages/bootstrap-templates</prop>
</props>
<props>
<prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.templates.content.childname}</prop>
<prop key="location">alfresco/templates/content_template_examples.xml</prop>
</props>
</list>
</property>
</bean>
<!-- Exporter -->
<bean id="exporterComponent" class="org.alfresco.repo.exporter.ExporterComponent">
<property name="namespaceService">
<ref bean="namespaceService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="searchService">
<ref bean="searchService" />
</property>
<property name="contentService">
<ref bean="contentService" />
</property>
<property name="descriptorService">
<ref bean="DescriptorService" />
</property>
<property name="authenticationService">
<ref bean="authenticationService" />
</property>
</bean>
<!-- Audit -->
<bean id="auditableAspect" class="org.alfresco.repo.audit.AuditableAspect" init-method="init">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="policyComponent">
<ref bean="policyComponent" />
</property>
<property name="authenticationService">
<ref bean="authenticationService" />
</property>
</bean>
<!-- Referenceable -->
<bean id="referenceableAspect" class="org.alfresco.repo.node.ReferenceableAspect" init-method="init">
<property name="policyComponent">
<ref bean="policyComponent" />
</property>
</bean>
<!-- Configurable service -->
<bean id="configurableService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.repo.configuration.ConfigurableService</value>
</property>
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="target">
<bean class="org.alfresco.repo.configuration.ConfigurableServiceImpl">
<property name="nodeService">
<ref bean="nodeService" />
</property>
</bean>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<!-- caching -->
<bean name="ehCacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="configLocation">
<value>classpath:ehcache.xml</value>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,282 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!-- =================================================================== -->
<!-- This file contains the bean definitions that support authentication -->
<!-- =================================================================== -->
<!-- -->
<!-- Acegi is used for authentication and protecting method calls on public -->
<!-- services. To do this requires our authentication mechanism to work -->
<!-- within the acegi framework. -->
<!-- -->
<!-- It is important to decide if user names are case sensitive or not. -->
<!-- This is configured in repository.properties. -->
<!-- -->
<!-- -->
<!-- TODO: -->
<!-- -->
<!-- The transactional wrappers should be removed from the beans in this -->
<!-- file. This should be done in the public services definitions. -->
<!-- This requires some tests to be fixed up. -->
<!-- -->
<beans>
<!-- -->
<!-- The Acegi authentication manager. -->
<!-- -->
<!-- Provders are asked to authenticate in order. -->
<!-- First, is a provider that checks if an acegi authentication object -->
<!-- is already bound to the executing thread. If it is, and it is set -->
<!-- as authenticated then no further authentication is required. If -->
<!-- this is absent, Acegi validates the password for every method -->
<!-- invocation, which is too CPU expensive. If we set an -->
<!-- authentication based on a ticket etc .... or we want to set the -->
<!-- the system user as the current user ... we do not have the -->
<!-- password. So if we have set an authentication and set it as -->
<!-- authenticated that is sufficient to validate the user. -->
<!-- -->
<!-- If the authentication bound to the current thread is not set as -->
<!-- authenticated the standard Acegi DAO Authentication provider -->
<!-- is used to authenticate. -->
<!-- -->
<bean id="authenticationManager" class="net.sf.acegisecurity.providers.ProviderManager">
<property name="providers">
<list>
<ref bean="authenticatedAuthenticationPassthroughProvider" />
<ref bean="daoAuthenticationProvider" />
</list>
</property>
</bean>
<!-- We provide a DAO to plug into the Acegi DaoAuthenticationProvider -->
<bean id="daoAuthenticationProvider" class="net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider">
<property name="authenticationDao">
<ref bean="alfDaoImpl" />
</property>
<property name="saltSource">
<ref bean="saltSource" />
</property>
<property name="passwordEncoder">
<ref bean="passwordEncoder" />
</property>
</bean>
<!-- An authentication Provider that just believes authentications -->
<!-- bound to the local thread are valid if they are set as -->
<!-- authenticated. -->
<bean id="authenticatedAuthenticationPassthroughProvider" class="org.alfresco.repo.security.authentication.AuthenticatedAuthenticationPassthroughProvider" />
<!-- The authroity DAO implements an interface extended from the Acegi -->
<!-- DAO that supports CRUD. -->
<bean id="alfDaoImpl" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.repo.security.authentication.MutableAuthenticationDao</value>
</property>
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="target">
<bean class="org.alfresco.repo.security.authentication.RepositoryAuthenticationDao">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="namespaceService">
<ref bean="namespaceService" />
</property>
<property name="passwordEncoder">
<ref bean="passwordEncoder" />
</property>
<property name="searchService">
<ref bean="searchService" />
</property>
<property name="userNamesAreCaseSensitive">
<value>${user.name.caseSensitive}</value>
</property>
</bean>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<!-- The DAO also acts as a salt provider. -->
<alias alias="saltSource" name="alfDaoImpl"/>
<!-- Passwords are encoded using MD4 -->
<!-- This is not ideal and only done to be compatible with NTLM -->
<!-- authentication against the default authentication mechanism. -->
<bean id="passwordEncoder" class="org.alfresco.repo.security.authentication.MD4PasswordEncoderImpl"></bean>
<!-- A transactional wrapper around the implementation. -->
<!-- TODO: This should be removed. -->
<bean id="authenticationService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.security.AuthenticationService</value>
</property>
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="target">
<ref bean="authenticationServiceImpl" />
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<!-- The Authentication Service implementation. -->
<!-- -->
<!-- This delegates its work to two services: -->
<!-- an AuthenticationComponent and a MutableAuthenticationDAO. -->
<!-- -->
<!-- The permissions service is required so that permissions can be -->
<!-- cleaned up when a user is deleted. -->
<bean id="authenticationServiceImpl" class="org.alfresco.repo.security.authentication.AuthenticationServiceImpl">
<property name="authenticationDao">
<ref bean="alfDaoImpl" />
</property>
<property name="ticketComponent">
<ref bean="ticketComponent" />
</property>
<property name="authenticationComponent">
<ref bean="authenticationComponentImpl" />
</property>
<property name="permissionServiceSPI">
<ref bean="permissionServiceImpl" />
</property>
</bean>
<!-- A transactional wrapper that should be removed. -->
<bean id="authenticationComponent" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.repo.security.authentication.AuthenticationComponent</value>
</property>
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="target">
<ref bean="authenticationComponentImpl" />
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<!-- The authentication component. -->
<bean id="authenticationComponentImpl" class="org.alfresco.repo.security.authentication.AuthenticationComponentImpl">
<property name="authenticationDao">
<ref bean="alfDaoImpl" />
</property>
<property name="authenticationManager">
<ref bean="authenticationManager" />
</property>
</bean>
<!-- The person service. -->
<bean id="personService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.security.PersonService</value>
</property>
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="target">
<bean id="personServiceImpl" class="org.alfresco.repo.security.person.PersonServiceImpl">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="searchService">
<ref bean="searchService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="namespacePrefixResolver">
<ref bean="namespaceService" />
</property>
<!-- Configurable properties. -->
<!-- -->
<!-- TODO: -->
<!-- Add support for creating real home spaces adn setting -->
<!-- permissions on the hame space and people created. -->
<!-- -->
<!-- The store in which people are persisted. -->
<property name="storeUrl">
<value>${spaces.store}</value>
</property>
<!-- The path to the company home space, used to set the -->
<!-- default home space for users that are created if -->
<!-- missing. -->
<property name="companyHomePath">
<value>/${spaces.company_home.childname}</value>
</property>
<!-- Some authentication mechanisms may need to create people -->
<!-- in the repository on demand. This enables that feature. -->
<!-- If dsiabled an error will be generated for missing -->
<!-- people. If enabled then a person will be created and -->
<!-- persisted. -->
<!-- -->
<!-- This value should be false or only true if the -->
<!-- repository is mutable; set from the property -->
<!-- ${server.transaction.allow-writes} -->
<property name="createMissingPeople">
<value>${server.transaction.allow-writes}</value>
</property>
<!-- Set is user names are case sensitive - taken from the -->
<!-- repository wide setting - you are advised not to change -->
<!-- this setting. -->
<!-- This value should be ${user.name.caseSensitive} -->
<property name="userNamesAreCaseSensitive">
<value>${user.name.caseSensitive}</value>
</property>
</bean>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<!-- The ticket component. -->
<!-- Used for reauthentication -->
<bean id="ticketComponent" class="org.alfresco.repo.security.authentication.InMemoryTicketComponentImpl">
<!-- The period for which tickets are valid in XML duration format. -->
<!-- The default is P1H for one hour. -->
<property name="validDuration">
<value>P1H</value>
</property>
<!-- Do tickets expire or live for ever? -->
<property name="ticketsExpire">
<value>false</value>
</property>
<!-- Are tickets only valid for a single use? -->
<property name="oneOff">
<value>false</value>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,45 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!-- ========================================================= -->
<!-- The configuration of the Authority Service Implementation -->
<!-- ========================================================= -->
<!-- -->
<!-- This implementation supports the identification of users as admin users. -->
<!-- It does NOT support any other groupings of users. -->
<!-- -->
<beans>
<bean id="authorityService" class="org.alfresco.repo.security.authority.SimpleAuthorityServiceImpl">
<!-- Wiring up of services on which this service depends -->
<property name="authenticationComponent">
<ref bean="authenticationComponent" />
</property>
<property name="personService">
<ref bean="personService" />
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<!-- -->
<!-- A list of users with admin rights. -->
<!-- -->
<!-- If the security framework is case sensitive these values should -->
<!-- be case sensitive user names. If the security framework is not -->
<!-- case sensitive these values should be the lower-case user names. -->
<!-- -->
<!-- By default this includes: -->
<!-- admin (the user name of default alfresco admin user) -->
<!-- administrator (the windows default admin user) -->
<!-- -->
<!-- This assumes that user names are not case sensitive. -->
<!-- -->
<property name="adminUsers">
<set>
<value>admin</value>
<value>administrator</value>
</set>
</property>
</bean>
</beans>

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0"
xmlns:sys="http://www.alfresco.org/model/system/1.0">
<sys:descriptor view:childName="${system.descriptor.childname}">
<sys:versionMajor>${version.major}</sys:versionMajor>
<sys:versionMinor>${version.minor}</sys:versionMinor>
<sys:versionRevision>${version.revision}</sys:versionRevision>
<sys:versionLabel>${version.label}</sys:versionLabel>
</sys:descriptor>
</view:view>

View File

@@ -0,0 +1,38 @@
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0"
xmlns:cm="http://www.alfresco.org/model/content/1.0"
xmlns:app="http://www.alfresco.org/model/application/1.0">
<cm:folder view:childName="${spaces.company_home.childname}">
<app:uifacets />
<cm:name>${spaces.company_home.name}</cm:name>
<app:icon>space-icon-default</app:icon>
<cm:title>${spaces.company_home.name}</cm:title>
<cm:description>${spaces.company_home.description}</cm:description>
<cm:contains>
<cm:folder view:childName="${spaces.dictionary.childname}">
<app:uifacets />
<cm:name>${spaces.dictionary.name}</cm:name>
<app:icon>space-icon-default</app:icon>
<cm:title>${spaces.dictionary.name}</cm:title>
<cm:description>${spaces.dictionary.description}</cm:description>
<cm:contains>
<cm:folder view:childName="${spaces.templates.childname}">
<app:uifacets />
<cm:name>${spaces.templates.name}</cm:name>
<app:icon>space-icon-default</app:icon>
<cm:title>${spaces.templates.name}</cm:title>
<cm:description>${spaces.templates.description}</cm:description>
</cm:folder>
<cm:folder view:childName="${spaces.templates.content.childname}">
<app:uifacets />
<cm:name>${spaces.templates.content.name}</cm:name>
<app:icon>space-icon-default</app:icon>
<cm:title>${spaces.templates.content.name}</cm:title>
<cm:description>${spaces.templates.content.description}</cm:description>
</cm:folder>
</cm:contains>
</cm:folder>
</cm:contains>
</cm:folder>
</view:view>

View File

@@ -0,0 +1,21 @@
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0"
xmlns:cm="http://www.alfresco.org/model/content/1.0"
xmlns:app="http://www.alfresco.org/model/application/1.0">
<cm:folder>
<app:uifacets />
<cm:name>${tutorial.space.name}</cm:name>
<cm:description>${tutorial.space.description}</cm:description>
<app:icon>space-icon-doc</app:icon>
<cm:contains>
<cm:content>
<app:uifacets />
<cm:name>${tutorial.document.name}</cm:name>
<cm:title>${tutorial.document.title}</cm:title>
<cm:description>${tutorial.document.description}</cm:description>
<cm:content>contentUrl=classpath:alfresco/bootstrap/${tutorial.document.name}|mimetype=application/pdf|size=|encoding=</cm:content>
</cm:content>
</cm:contains>
</cm:folder>
</view:view>

View File

@@ -0,0 +1,85 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- ==================================================== -->
<!-- EH Cache Manager to produce in-transaction EH Caches -->
<!-- ==================================================== -->
<bean name="ehCacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" >
<property name="configLocation">
<value>classpath:ehcache.xml</value>
</property>
</bean>
<!-- ================ -->
<!-- Null permissoins -->
<!-- ================ -->
<!-- The cross-transaction shared cache for Null Node Permissions -->
<bean name="nullPermissionSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
<property name="cache">
<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
<property name="cacheName">
<!-- The name of the ehCache area -->
<value>nullPermissionCache</value>
</property>
</bean>
</property>
</bean>
<!-- The transactional cache for Null Node Permissions -->
<bean name="nullPermissionCache" class="org.alfresco.repo.cache.TransactionalCache">
<property name="sharedCache">
<ref bean="nullPermissionSharedCache" />
</property>
<property name="cacheManager" >
<ref bean="ehCacheManager" />
</property>
<!-- Eh cache area -->
<property name="name">
<value>nullPermissionTransactionalCache</value>
</property>
<property name="maxCacheSize">
<value>20000</value>
</property>
</bean>
<!-- ===================================== -->
<!-- Authority container look up for users -->
<!-- ===================================== -->
<!-- The cross-transaction shared cache for Users -->
<bean name="userToAuthoritySharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
<property name="cache">
<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
<property name="cacheName">
<!-- The name of the ehCache area -->
<value>userToAuthorityCache</value>
</property>
</bean>
</property>
</bean>
<!-- The transactional cache for Null Node Permissions -->
<bean name="userToAuthorityCache" class="org.alfresco.repo.cache.TransactionalCache">
<property name="sharedCache">
<ref bean="userToAuthoritySharedCache" />
</property>
<property name="cacheManager" >
<ref bean="ehCacheManager" />
</property>
<!-- Eh cache area -->
<property name="name">
<value>userToAuthorityTransactionalCache</value>
</property>
<property name="maxCacheSize">
<value>20000</value>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,163 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!--
<import resource="classpath:alfresco/replicating-content-services-context.xml" />
-->
<bean id="mimetypeMap" class="org.alfresco.repo.content.MimetypeMap" init-method="init" >
<constructor-arg>
<ref bean="repoConfigService" />
</constructor-arg>
</bean>
<!-- Content Transformations -->
<bean id="transformer.StringExtracter" class="org.alfresco.repo.content.transform.StringExtractingContentTransformer" />
<bean id="transformer.BinaryPassThrough" class="org.alfresco.repo.content.transform.BinaryPassThroughContentTransformer" />
<bean id="transformer.PdfBox" class="org.alfresco.repo.content.transform.PdfBoxContentTransformer" />
<bean id="transformer.Poi" class="org.alfresco.repo.content.transform.PoiHssfContentTransformer" />
<bean id="transformer.TextMining" class="org.alfresco.repo.content.transform.TextMiningContentTransformer" />
<bean id="transformer.HtmlParser" class="org.alfresco.repo.content.transform.HtmlParserContentTransformer" />
<bean id="transformer.OpenOffice" class="org.alfresco.repo.content.transform.UnoContentTransformer" init-method="init">
<property name="mimetypeService">
<ref bean="mimetypeMap" />
</property>
</bean>
<bean id="transformer.complex.OpenOffice.PdfBox" class="org.alfresco.repo.content.transform.ComplexContentTransformer">
<property name="mimetypeService">
<ref bean="mimetypeMap" />
</property>
<property name="transformers">
<list>
<ref bean="transformer.OpenOffice" />
<ref bean="transformer.PdfBox" />
</list>
</property>
<property name="intermediateMimetypes">
<list>
<value>application/pdf</value>
</list>
</property>
</bean>
<!--
<bean id="transformer.JMagick" class="org.alfresco.repo.content.transform.magick.JMagickContentTransformer" init-method="init">
<property name="mimetypeMap">
<ref bean="mimetypeMap" />
</property>
</bean>
-->
<bean id="transformer.ImageMagick" class="org.alfresco.repo.content.transform.magick.ImageMagickContentTransformer" init-method="init">
<property name="mimetypeMap">
<ref bean="mimetypeMap" />
</property>
<property name="executer">
<bean name="transformer.ImageMagick.Command" class="org.alfresco.util.exec.RuntimeExec">
<property name="commandMap">
<map>
<entry key="Linux">
<value>imconvert ${source} ${options} ${target}</value>
</entry>
<entry key="*">
<value>imconvert "${source}" ${options} "${target}"</value>
</entry>
</map>
</property>
<property name="defaultProperties">
<props>
<prop key="options"></prop>
</props>
</property>
</bean>
</property>
</bean>
<!-- Content Transformation Regisitry -->
<bean id="contentTransformerRegistry" class="org.alfresco.repo.content.transform.ContentTransformerRegistry" >
<constructor-arg>
<ref bean="mimetypeMap" />
</constructor-arg>
<!-- explicit transformations to use -->
<property name="explicitTransformations">
<list>
<list>
<value>application/msword</value> <!-- from mimetype -->
<value>text/plain</value> <!-- to mimetype -->
<ref bean="transformer.TextMining" />
</list>
<list>
<value>application/pdf</value>
<value>text/plain</value>
<ref bean="transformer.PdfBox" />
</list>
</list>
</property>
<!-- transformers to fall back on in the event that an explicit transformation isn't defined -->
<property name="transformers">
<list>
<ref bean="transformer.StringExtracter" />
<ref bean="transformer.BinaryPassThrough" />
<ref bean="transformer.PdfBox" />
<ref bean="transformer.Poi" />
<ref bean="transformer.TextMining" />
<ref bean="transformer.HtmlParser" />
<ref bean="transformer.OpenOffice" />
<!-- <ref bean="transformer.JMagick" /> -->
<ref bean="transformer.ImageMagick" />
<ref bean="transformer.complex.OpenOffice.PdfBox" />
</list>
</property>
</bean>
<bean id="metadataExtracterRegistry" class="org.alfresco.repo.content.metadata.MetadataExtracterRegistry" >
<constructor-arg>
<ref bean="mimetypeMap" />
</constructor-arg>
<!-- metadata extracters -->
<property name="extracters">
<list>
<bean class="org.alfresco.repo.content.metadata.PdfBoxMetadataExtracter" />
<bean class="org.alfresco.repo.content.metadata.OfficeMetadataExtracter" />
<bean class="org.alfresco.repo.content.metadata.HtmlMetadataExtracter" />
<bean class="org.alfresco.repo.content.metadata.StringMetadataExtracter" />
<bean class="org.alfresco.repo.content.metadata.MP3MetadataExtracter" />
<bean class="org.alfresco.repo.content.metadata.OpenDocumentMetadataExtracter" />
<bean class="org.alfresco.repo.content.metadata.UnoMetadataExtracter" >
<constructor-arg>
<ref bean="mimetypeMap" />
</constructor-arg>
</bean>
</list>
</property>
</bean>
<bean id="fileContentStore" class="org.alfresco.repo.content.filestore.FileContentStore">
<constructor-arg>
<value>${dir.contentstore}</value>
</constructor-arg>
</bean>
<bean id="contentService" class="org.alfresco.repo.content.RoutingContentService" init-method="init">
<property name="transactionService">
<ref bean="transactionComponent" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="transformerRegistry">
<ref bean="contentTransformerRegistry" />
</property>
<property name="store">
<ref bean="fileContentStore" />
</property>
<property name="policyComponent">
<ref bean="policyComponent" />
</property>
</bean>
</beans>

View File

@@ -0,0 +1,19 @@
#
# Hibernate configuration
#
hibernate.jdbc.use_streams_for_binary=true
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.show_sql=false
hibernate.hbm2ddl.auto=update
hibernate.cache.use_query_cache=true
hibernate.max_fetch_depth=10
hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
hibernate.cache.use_second_level_cache=true
hibernate.default_batch_fetch_size=1
hibernate.jdbc.batch_size=32
hibernate.connection.release_mode=auto
#
# The cache strategy
#
cache.strategy=read-write

View File

@@ -0,0 +1,9 @@
#
# Server read-only or read-write modes
#
server.transaction.mode.readOnly=PROPAGATION_REQUIRED, readOnly
# the properties below should change in tandem
# server.transaction.mode=PROPAGATION_REQUIRED, readOnly
# server.transaction.allow-writes=false
server.transaction.mode.default=PROPAGATION_REQUIRED
server.transaction.allow-writes=true

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Custom Model -->
<!-- Note: This model is pre-configured to load at startup of the Repository. So, all custom -->
<!-- types and aspects added here will automatically be registered -->
<model name="custom:customModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Custom Model</description>
<author></author>
<version>1.0</version>
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</imports>
<!-- Introduction of new namespaces defined by this model -->
<!-- NOTE: The following namespace custom.model should be changed to reflect your own namespace -->
<namespaces>
<namespace uri="custom.model" prefix="custom"/>
</namespaces>
</model>

View File

@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Definition of new Model -->
<!-- The important part here is the name - Note: the use of the my: namespace
which is defined further on in the document -->
<model name="my:mynewmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Example custom Model</description>
<author></author>
<version>1.0</version>
<!-- Imports are required to allow references to definitions in other models -->
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</imports>
<!-- Introduction of new namespaces defined by this model -->
<!-- NOTE: The following namespace my.new.model should be changed to reflect your own namespace -->
<namespaces>
<namespace uri="my.new.model" prefix="my"/>
</namespaces>
<types>
<!-- Definition of new Content Type: Standard Operating Procedure -->
<type name="my:sop">
<title>Standard Operating Procedure</title>
<parent>cm:content</parent>
<properties>
<property name="my:publishedDate">
<type>d:datetime</type>
</property>
<property name="my:authorisedBy">
<type>d:text</type>
</property>
</properties>
<associations>
<association name="my:signOff">
<target>
<class>cm:content</class>
<mandatory>false</mandatory>
<many>false</many>
</target>
</association>
<child-association name="my:processSteps">
<target>
<class>cm:content</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</child-association>
</associations>
</type>
</types>
<!-- Definition of new Content Aspect: Image Classification -->
<aspects>
<aspect name="my:imageClassification">
<title>Image Classfication</title>
<properties>
<property name="my:width">
<type>d:int</type>
</property>
<property name="my:height">
<type>d:int</type>
</property>
<property name="my:resolution">
<type>d:int</type>
</property>
</properties>
</aspect>
</aspects>
</model>

View File

@@ -0,0 +1,18 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- Registration of new models -->
<bean id="extension.dictionaryBootstrap" class="org.alfresco.repo.dictionary.DictionaryBootstrap" init-method="bootstrap" depends-on="dictionaryBootstrap">
<property name="dictionaryDAO"><ref bean="dictionaryDAO"/></property>
<property name="models">
<list>
<value>alfresco/extension/exampleModel.xml</value>
<value>alfresco/extension/customModel.xml</value>
</list>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,70 @@
<alfresco-config area="file-servers">
<config evaluator="string-compare" condition="CIFS Server">
<host name="${localname}_A"/>
<comment>Alfresco CIFS Server</comment>
<!-- Set to the broadcast mask for the subnet -->
<broadcast>255.255.255.255</broadcast>
<!-- Use Java socket based NetBIOS over TCP/IP and native SMB on linux -->
<tcpipSMB platforms="linux,solaris,macosx"/>
<netBIOSSMB 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">
<!-- <debug flags="File,Search,Error,Directory,Info,DataPort"/> -->
</config>
<config evaluator="string-compare" condition="Filesystems">
<filesystem name="Alfresco">
<store>workspace://SpacesStore</store>
<rootPath>/app:company_home</rootPath>
<!--
<accessControl default="Write">
<user name="admin" access="Write"/>
<address subnet="90.1.0.0" mask="255.255.0.0" access="Write"/>
</accessControl>
-->
</filesystem>
</config>
<config evaluator="string-compare" condition="Filesystem Security">
<authenticator type="alfresco">
</authenticator>
<!--
<globalAccessControl default="None">
<user name="admin" access="Write"/>
<address ip="90.1.0.90" access="Write"/>
</globalAccessControl>
<users>
<localuser name="user">
<password>user</password>
<comment>Normal user account</comment>
</localuser>
<localuser name="administrator">
<password>admin</password>
<administrator/>
<comment>Administrator account</comment>
</localuser>
</users>
-->
</config>
</alfresco-config>

View File

@@ -0,0 +1,71 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- load hibernate configuration properties -->
<bean id="hibernateConfigProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list>
<value>classpath:alfresco/domain/hibernate-cfg.properties</value>
</list>
</property>
</bean>
<!-- load hibernate entity cache strategies -->
<bean id="hibernateConfigPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders">
<value>true</value>
</property>
<property name="locations">
<list>
<value>classpath:alfresco/domain/hibernate-cfg.properties</value>
</list>
</property>
</bean>
<!-- Hibernate session factory -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="mappingResources">
<list>
<value>org/alfresco/repo/domain/hibernate/Node.hbm.xml</value>
<value>org/alfresco/repo/domain/hibernate/Store.hbm.xml</value>
<value>org/alfresco/repo/domain/hibernate/VersionCount.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties" ref="hibernateConfigProperties" />
<property name="entityCacheStrategies" >
<props>
<prop key="org.alfresco.repo.domain.hibernate.NodeImpl">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.NodeStatusImpl">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.ChildAssocImpl">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.NodeAssocImpl">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.StoreImpl">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.VersionCountImpl">${cache.strategy}</prop>
</props>
</property>
<property name="collectionCacheStrategies" >
<props>
<prop key="org.alfresco.repo.domain.hibernate.NodeImpl.properties">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.NodeImpl.aspects">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.NodeImpl.parentAssocs">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.NodeImpl.childAssocs">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.NodeImpl.sourceNodeAssocs">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.NodeImpl.targetNodeAssocs">${cache.strategy}</prop>
</props>
</property>
</bean>
<!-- create a transaction manager -->
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="transactionSynchronizationName">
<value>SYNCHRONIZATION_ALWAYS</value>
</property>
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
</beans>

View File

@@ -0,0 +1,80 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- load hibernate configuration properties -->
<bean id="hibernateConfigProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list>
<value>classpath:alfresco/domain/hibernate-cfg.properties</value>
</list>
</property>
</bean>
<!-- load hibernate entity cache strategies -->
<bean id="hibernateConfigPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders">
<value>true</value>
</property>
<property name="locations">
<list>
<value>classpath:alfresco/domain/hibernate-cfg.properties</value>
</list>
</property>
</bean>
<!-- Hibernate session factory -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="mappingResources">
<list>
<value>org/alfresco/repo/domain/hibernate/Node.hbm.xml</value>
<value>org/alfresco/repo/domain/hibernate/Store.hbm.xml</value>
<value>org/alfresco/repo/domain/hibernate/VersionCount.hbm.xml</value>
<value>org/alfresco/repo/security/permissions/impl/hibernate/Permission.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties" ref="hibernateConfigProperties" />
<property name="entityCacheStrategies" >
<props>
<prop key="org.alfresco.repo.domain.hibernate.NodeImpl">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.NodeStatusImpl">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.ChildAssocImpl">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.NodeAssocImpl">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.StoreImpl">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.VersionCountImpl">${cache.strategy}</prop>
<prop key="org.alfresco.repo.security.permissions.impl.hibernate.NodePermissionEntryImpl">${cache.strategy}</prop>
<prop key="org.alfresco.repo.security.permissions.impl.hibernate.PermissionEntryImpl">${cache.strategy}</prop>
<prop key="org.alfresco.repo.security.permissions.impl.hibernate.PermissionReferenceImpl">${cache.strategy}</prop>
<prop key="org.alfresco.repo.security.permissions.impl.hibernate.RecipientImpl">${cache.strategy}</prop>
</props>
</property>
<property name="collectionCacheStrategies" >
<props>
<prop key="org.alfresco.repo.domain.hibernate.NodeImpl.properties">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.NodeImpl.aspects">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.NodeImpl.parentAssocs">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.NodeImpl.childAssocs">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.NodeImpl.sourceNodeAssocs">${cache.strategy}</prop>
<prop key="org.alfresco.repo.domain.hibernate.NodeImpl.targetNodeAssocs">${cache.strategy}</prop>
<prop key="org.alfresco.repo.security.permissions.impl.hibernate.NodePermissionEntryImpl.permissionEntries">${cache.strategy}</prop>
<prop key="org.alfresco.repo.security.permissions.impl.hibernate.RecipientImpl.externalKeys">${cache.strategy}</prop>
</props>
</property>
</bean>
<!-- create a transaction manager -->
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="transactionSynchronizationName">
<value>SYNCHRONIZATION_ALWAYS</value>
</property>
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
</beans>

View File

@@ -0,0 +1,24 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- full node index recovery -->
<bean id="indexRecoveryComponent" class="org.alfresco.repo.node.index.FtsIndexRecoveryComponent" >
<property name="transactionService">
<ref bean="transactionComponent" />
</property>
<property name="ftsIndexer">
<ref bean="LuceneFullTextSearchIndexer" />
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="stores">
<list>
<value>workspace://SpacesStore</value>
</list>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,70 @@
# Action conditions
no-condition.title=All Items
no-condition.description=This condition will match any item added to the space. Use this when you wish to apply an action to everything when it is added to the space.
compare-property-value.title=Items which contain a specific value in its name
compare-property-value.description=The rule is applied to all items that has a specific value in its name.
in-category.title=Items with the specified category value
in-category.description=The rule is applied to all items that has the specified category value.
is-subtype.title=Items of a specified type or its sub-types
is-subtype.description=The rule is applied to all items that are of a specified type or its sub-types
has-aspect.title=Items that have a specific aspect applied
has-aspect.description=The rule is applied to all items that have the specified aspect applied.
compare-mime-type.title=Items with the specified mime type
compare-mime-type.description=The rule is applied to all items that have content of the specified mime type.
# Actions
add-features.title=Add aspect to item
add-features.description=This will add an aspect to the matched item.
simple-workflow.title=Add simple workflow to item
simple-workflow.description=This will add a simple workflow to the matched item. This will allow the item to be moved to a different space for its next step in a workflow. You can also give a space for it to be moved to if you want a reject step.
link-category.title=Link item to category
link-category.description=This will apply a category to the matched item.
transform.title=Transform and copy content to a specific space
transform.description=This will transform the the matched content and copy the result to a specific space
transform-image.title=Transform and copy image to a specific space
transform-image.description=This will transform the matched image and copy the result to a specific space
copy.title=Copy item to a specific space
copy.description=This will copy the matched item to another space.
move.title=Move item to a specific space
move.description=This will move the matched item to another space.
mail.title=Send an email to specified users
mail.description=This will send an email to a list of users when the content matches.
check-in.title=Check in content
check-in.description=This will check in the matched content.
check-out.title=Check out content
check-out.description=This will check out the matched content.
set-property-value.title=Set the value of a property
set-property-value.description=This will set the value of a property to a given value.
import.title=Import an Alfresco content package
import.description=Imports an Alfresco content package into the repository.
extract-metadata.title=Extract common metadata fields from content
extract-metadata.description=Imports title, author and description metadata fields from common content types.
specialise-type.title=Specialise the type of an item
specialise-type.description=This will specialise the matched item to a given type.
export.title=Export a Space
export.description=Exports a Space and optionally it's children to an Alfresco export package.
export.package.description=Alfresco content package for Space ''{0}''.
export.root.package.description=Alfresco content package for complete Repository.
export.package.error=Failed to find temporary file for export

View File

@@ -0,0 +1,9 @@
# Action service externalised display strings
compare_property_value_evaluator.invalid_operation=The operation {0} can not be applied a property of type {1}.
compare_property_value_evaluator.no_content_property=A content proerty must be specified when comparing to a property of type content.
numeric_property_value_comparator.invalid_operation=The operation {0} can not be applied to a numeric property.
text_property_value_comparator.invalid_operation=The operation {0} can not be applied to a text property.
date_property_value_comparator.invalid_operation=The operation {0} can not be applied to a date property.
compare_mime_type_evaluator.not_a_content_type=The specified property is not a content type so mime type can not be compared.
compare_mime_type_evaluator.no_property_definition_found=No defintion can be found for the property specified so mime type can not be compared.

View File

@@ -0,0 +1,45 @@
# Display labels for System Model
app_applicationmodel.description=Alfresco Application Model
app_applicationmodel.type.app_glossary.title=Data Dictionary
app_applicationmodel.type.app_glossary.description=Data Dictionary
app_applicationmodel.type.app_configurations.title=Configurations
app_applicationmodel.type.app_configurations.description=Configurations
app_applicationmodel.aspect.app_uifacets.title=UI Facets
app_applicationmodel.aspect.app_uifacets.description=UI Facets
app_applicationmodel.property.app_icon.title=Icon
app_applicationmodel.property.app_icon.description=Icon
app_applicationmodel.aspect.app_inlineeditable.title=Inline Editable
app_applicationmodel.aspect.app_inlineeditable.description=Inline Editable
app_applicationmodel.property.app_editInline.title=Edit Inline
app_applicationmodel.property.app_editInline.description=Edit Inline
app_applicationmodel.aspect.app_inlineeditable.title=Inline Editable
app_applicationmodel.aspect.app_inlineeditable.description=Inline Editable
app_applicationmodel.aspect.app_workflow.title=Workflow
app_applicationmodel.aspect.app_workflow.description=Workflow
app_applicationmodel.aspect.app_simpleworkflow.title=Workflow
app_applicationmodel.aspect.app_simpleworkflow.description=Workflow
app_applicationmodel.property.app_approveStep.title=Approve Step
app_applicationmodel.property.app_approveStep.description=Approve Step
app_applicationmodel.property.app_approveFolder.title=Approve Folder
app_applicationmodel.property.app_approveFolder.description=Approve Folder
app_applicationmodel.property.app_approveMove.title=Move or Copy
app_applicationmodel.property.app_approveMove.description=Move or Copy
app_applicationmodel.property.app_rejectStep.title=Reject Step
app_applicationmodel.property.app_rejectStep.description=Reject Step
app_applicationmodel.property.app_rejectFolder.title=Reject Folder
app_applicationmodel.property.app_rejectFolder.description=Reject Folder
app_applicationmodel.property.app_rejectMove.title=Move or Copy
app_applicationmodel.property.app_rejectMove.description=Move or Copy
app_applicationmodel.aspect.app_configurable.title=Configurable
app_applicationmodel.aspect.app_configurable.description=Configurable
app_applicationmodel.association.app_configurations.title=Configurations
app_applicationmodel.association.app_configurations.description=Configurations

View File

@@ -0,0 +1,13 @@
# Labels used in bootstrap Space definitions
spaces.company_home.name=Company Home
spaces.company_home.description=The company root space
spaces.dictionary.name=Data Dictionary
spaces.dictionary.description=User managed definitions
spaces.templates.name=Space Templates
spaces.templates.description=Space templates
spaces.templates.content.name=Content Templates
spaces.templates.content.description=Content templates

View File

@@ -0,0 +1,14 @@
# Labels used in bootstrap Template definitions
templates.space.project=Software Engineering Project
templates.space.documentation=Documentation
templates.space.drafts=Drafts
templates.space.pending_approval=Pending Approval
templates.space.published=Published
templates.space.samples=Samples
templates.document.system_overview.title=System Overview
templates.document.system_overview.name=system-overview.html
templates.space.discussions=Discussions
templates.space.ui_design=UI Design
templates.space.presentations=Presentations
templates.space.quality_assurance=Quality Assurance

View File

@@ -0,0 +1,9 @@
# Labels used in bootstrap Tutorial definitions
tutorial.space.name=Alfresco Tutorial
tutorial.space.description=Step by step guide to the Alfresco application
tutorial.document.name=Alfresco-Tutorial.pdf
tutorial.document.title=Alfresco Tutorial
tutorial.document.description=Getting started guide

View File

@@ -0,0 +1,8 @@
# coci service externalised display strings
coci_service.working_copy_label=(Working Copy)
coci_service.err_bad_copy=The original node can not be found. Perhaps the copy has been corrupted or the original has been deleted or moved.
coci_service.err_not_owner=This user is not the owner of the working copy and can not check it in.
coci_service.err_workingcopy_checkout=A working copy can not be checked out.
coci_service.err_not_authenticated=Can not find the currently authenticated user details required by the CheckOutCheckIn service.
coci_service.err_workingcopy_has_no_mimetype=Working copy node ({0}) has no mimetype

View File

@@ -0,0 +1,201 @@
# Display labels for Content Domain Model
cm_contentmodel.description=Alfresco Content Domain Model
cm_contentmodel.type.cm_object.title=Object
cm_contentmodel.type.cm_object.description=Base Content Domain Object
cm_contentmodel.property.cm_name.title=Name
cm_contentmodel.property.cm_name.description=Name
cm_contentmodel.type.cm_folder.title=Folder
cm_contentmodel.type.cm_folder.description=Folder
cm_contentmodel.property.cm_orderedchildren.title=Ordered Children
cm_contentmodel.property.cm_orderedchildren.description=Indicates whether the children of the folder are ordered
cm_contentmodel.association.cm_contains.title=Contains
cm_contentmodel.association.cm_contains.description=Contains
cm_contentmodel.type.cm_content.title=Content
cm_contentmodel.type.cm_content.description=Base Content Object
cm_contentmodel.property.cm_content.title=Content
cm_contentmodel.property.cm_content.description=Content
cm_contentmodel.type.cm_linkfile.title=File Link
cm_contentmodel.type.cm_linkfile.description=Link to another File
cm_contentmodel.property.cm_path.title=Link File Path
cm_contentmodel.property.cm_path.description=Path to the linked File
cm_contentmodel.type.cm_savedquery.title=Saved Query
cm_contentmodel.type.cm_savedquery.description=Saved Query
cm_contentmodel.type.cm_systemfolder.title=System Folder
cm_contentmodel.type.cm_systemfolder.description=Folder for containing system-level items
cm_contentmodel.type.cm_person.title=Person
cm_contentmodel.type.cm_person.description=Person
cm_contentmodel.property.cm_userName.title=User Name
cm_contentmodel.property.cm_userName.description=The Person's user name
cm_contentmodel.property.cm_homeFolder.title=Home Folder
cm_contentmodel.property.cm_homeFolder.description=The Person's home folder
cm_contentmodel.property.cm_firstName.title=First Name
cm_contentmodel.property.cm_firstName.description=The Person's first name
cm_contentmodel.property.cm_lastName.title=Last Name
cm_contentmodel.property.cm_lastName.description=The Person's last name
cm_contentmodel.property.cm_middleName.title=Middle Name
cm_contentmodel.property.cm_middleName.description=The Person's middle name
cm_contentmodel.property.cm_email.title=E-mail Address
cm_contentmodel.property.cm_email.description=The Person's e-mail address
cm_contentmodel.property.cm_organizationId.title=Organization
cm_contentmodel.property.cm_organizationId.description=The Person's organization
cm_contentmodel.type.cm_category_root.title=Category Root
cm_contentmodel.type.cm_category_root.description=Root Category
cm_contentmodel.association.cm_categories.title=Categories
cm_contentmodel.association.cm_categories.description=Categories within Category Root
cm_contentmodel.type.cm_category.title=Category
cm_contentmodel.type.cm_category.description=Category
cm_contentmodel.association.cm_subcategories.title=Categories
cm_contentmodel.association.cm_subcategories.description=Sub-categories within Category
cm_contentmodel.aspect.cm_titled.title=Titled
cm_contentmodel.aspect.cm_titled.description=Titled
cm_contentmodel.property.cm_created.title=Created Date
cm_contentmodel.property.cm_created.description=Created Date
cm_contentmodel.property.cm_creator.title=Creator
cm_contentmodel.property.cm_creator.description=Who created this item
cm_contentmodel.property.cm_modified.title=Modified Date
cm_contentmodel.property.cm_modified.description=When this item as last modified
cm_contentmodel.property.cm_modifier.title=Modifier
cm_contentmodel.property.cm_modifier.description=Who last modified this item
cm_contentmodel.property.cm_accessed.title=Last Accessed Date
cm_contentmodel.property.cm_accessed.description=When this item was last accessed
cm_contentmodel.aspect.cm_localizable.title=Localizable
cm_contentmodel.aspect.cm_localizable.description=Localizable
cm_contentmodel.property.cm_locale.title=Locale
cm_contentmodel.property.cm_locale.description=Locale
cm_contentmodel.aspect.cm_translatable.title=Translatable
cm_contentmodel.aspect.cm_translatable.description=Translatable
cm_contentmodel.association.cm_translations.title=Translations
cm_contentmodel.association.cm_translations.description=Translations
cm_contentmodel.aspect.cm_transformable.title=Transformable
cm_contentmodel.aspect.cm_transformable.description=Transformable
cm_contentmodel.association.cm_formats.title=Formats
cm_contentmodel.association.cm_formats.description=Transformed Items
cm_contentmodel.aspect.cm_templatable.title=Templatable
cm_contentmodel.aspect.cm_templatable.description=Templatable
cm_contentmodel.aspect.cm_template.title=Template
cm_contentmodel.aspect.cm_template.description=Template
cm_contentmodel.aspect.cm_complianceable.title=Complianceable
cm_contentmodel.aspect.cm_complianceable.description=Complianceable
cm_contentmodel.property.cm_removeAfter.title=Remove After
cm_contentmodel.property.cm_removeAfter.description=Remove After
cm_contentmodel.aspect.cm_ownable.title=Ownable
cm_contentmodel.aspect.cm_ownable.description=Ownable
cm_contentmodel.property.cm_owner.title=Owner
cm_contentmodel.property.cm_owner.description=Owner
cm_contentmodel.aspect.cm_dublincore.title=Dublin Core
cm_contentmodel.aspect.cm_dublincore.description=Dublin Core
cm_contentmodel.property.cm_publisher.title=Publisher
cm_contentmodel.property.cm_publisher.description=Publisher
cm_contentmodel.property.cm_contributor.title=Contributor
cm_contentmodel.property.cm_contributor.description=Contributor
cm_contentmodel.property.cm_type.title=Type
cm_contentmodel.property.cm_type.description=Type
cm_contentmodel.property.cm_identifier.title=Identifier
cm_contentmodel.property.cm_identifier.description=Identifier
cm_contentmodel.property.cm_dcsource.title=Source
cm_contentmodel.property.cm_dcsource.description=Source
cm_contentmodel.property.cm_coverage.title=Coverage
cm_contentmodel.property.cm_coverage.description=Coverage
cm_contentmodel.property.cm_rights.title=Rights
cm_contentmodel.property.cm_rights.description=Rights
cm_contentmodel.property.cm_subject.title=Subject
cm_contentmodel.property.cm_subject.description=Subject
cm_contentmodel.aspect.cm_basable.title=Basable
cm_contentmodel.aspect.cm_basable.description=Basable
cm_contentmodel.association.cm_basis.title=Basis
cm_contentmodel.association.cm_basis.description=Basis
cm_contentmodel.aspect.cm_partable.title=Partable
cm_contentmodel.aspect.cm_partable.description=Partable
cm_contentmodel.association.cm_parts.title=Parts
cm_contentmodel.association.cm_parts.description=Parts
cm_contentmodel.aspect.cm_referencing.title=Referencing
cm_contentmodel.aspect.cm_referencing.description=Referencing
cm_contentmodel.association.cm_references.title=References
cm_contentmodel.association.cm_references.description=References
cm_contentmodel.aspect.cm_replacable.title=Replacable
cm_contentmodel.aspect.cm_replacable.description=Replacable
cm_contentmodel.association.cm_replaces.title=Replaces
cm_contentmodel.association.cm_replaces.description=Replaces
cm_contentmodel.aspect.cm_effectivity.title=Effectivity
cm_contentmodel.aspect.cm_effectivity.description=Effectivity
cm_contentmodel.property.cm_from.title=Effective From
cm_contentmodel.property.cm_from.description=Effective From
cm_contentmodel.property.cm_to.title=Effective To
cm_contentmodel.property.cm_to.description=Effective To
cm_contentmodel.aspect.cm_summarizable.title=Summarizable
cm_contentmodel.aspect.cm_summarizable.description=Summarizable
cm_contentmodel.property.cm_summary.title=Summary
cm_contentmodel.property.cm_summary.description=Summary
cm_contentmodel.aspect.cm_countable.title=Countable
cm_contentmodel.aspect.cm_countable.description=Countable
cm_contentmodel.property.cm_hits.title=Hits
cm_contentmodel.property.cm_hits.description=Hits
cm_contentmodel.aspect.cm_copiedFrom.title=Copied From
cm_contentmodel.aspect.cm_copiedFrom.description=Copied From
cm_contentmodel.property.cm_source.title=Source
cm_contentmodel.property.cm_source.description=Source
cm_contentmodel.aspect.cm_workingcopy.title=Working Copy
cm_contentmodel.aspect.cm_workingcopy.description=Working Copy
cm_contentmodel.property.cm_workingCopyOwner.title=Working Copy Owner
cm_contentmodel.property.cm_workingCopyOwner.description=Working Copy Owner
cm_contentmodel.aspect.cm_versionable.title=Versionable
cm_contentmodel.aspect.cm_versionable.description=Versionable
cm_contentmodel.property.cm_versionLabel.title=Version Label
cm_contentmodel.property.cm_versionLabel.description=Version Label
cm_contentmodel.aspect.cm_lockable.title=Lockable
cm_contentmodel.aspect.cm_lockable.description=Lockable
cm_contentmodel.property.cm_lockOwner.title=Lock Owner
cm_contentmodel.property.cm_lockOwner.description=Lock Owner
cm_contentmodel.property.cm_lockType.title=Lock Type
cm_contentmodel.property.cm_lockType.description=Lock Type
cm_contentmodel.property.cm_expiryDate.title=Expiry Date
cm_contentmodel.property.cm_expiryDate.description=Expiry Date
cm_contentmodel.property.cm_lockIsDeep.title=Deep Lock
cm_contentmodel.property.cm_lockIsDeep.description=Deep Lock
cm_contentmodel.aspect.cm_subscribable.title=Subscribable
cm_contentmodel.aspect.cm_subscribable.description=Subscribable
cm_contentmodel.association.cm_subscribedBy.title=Subscribed By
cm_contentmodel.association.cm_subscribedBy.description=Subscribed By
cm_contentmodel.aspect.cm_classifiable.title=Classifiable
cm_contentmodel.aspect.cm_classifiable.description=Classifiable
cm_contentmodel.aspect.cm_generalclassifiable.title=Classifiable
cm_contentmodel.aspect.cm_generalclassifiable.description=Classifiable
cm_contentmodel.property.cm_categories.title=Categories
cm_contentmodel.property.cm_categories.description=Categories
cm_contentmodel.aspect.cm_attachable.title=Attachable
cm_contentmodel.aspect.cm_attachable.description=Allows other repository objects to be attached

View File

@@ -0,0 +1,3 @@
# Content-related messages
content.content_missing=The node''s content is missing: \n node: {0} \n reader: {1} \n Please contact your system administrator.

View File

@@ -0,0 +1,34 @@
# Display labels for Dictionary Model
d_dictionary.description=Alfresco Dictionary Model
d_dictionary.datatype.d_any.title=Any
d_dictionary.datatype.d_any.description=Any
d_dictionary.datatype.d_text.title=Text
d_dictionary.datatype.d_text.description=Text
d_dictionary.datatype.d_content.title=Content
d_dictionary.datatype.d_content.description=Content
d_dictionary.datatype.d_int.title=Integer
d_dictionary.datatype.d_int.description=Integer
d_dictionary.datatype.d_long.title=Long
d_dictionary.datatype.d_long.description=Long
d_dictionary.datatype.d_float.title=Float
d_dictionary.datatype.d_float.description=Float
d_dictionary.datatype.d_double.title=Double
d_dictionary.datatype.d_double.description=Double
d_dictionary.datatype.d_date.title=Date
d_dictionary.datatype.d_date.description=Date
d_dictionary.datatype.d_datetime.title=Date and Time
d_dictionary.datatype.d_datetime.description=Date and Time
d_dictionary.datatype.d_boolean.title=Boolean
d_dictionary.datatype.d_boolean.description=Boolean
d_dictionary.datatype.d_qname.title=Qualified Name
d_dictionary.datatype.d_qname.description=Qualified Name
d_dictionary.datatype.d_guid.title=Unique Identifier
d_dictionary.datatype.d_guid.description=Unique Identifier
d_dictionary.datatype.d_category.title=Category
d_dictionary.datatype.d_category.description=Category
d_dictionary.datatype.d_noderef.title=Reference
d_dictionary.datatype.d_noderef.description=Reference
d_dictionary.datatype.d_path.title=Path
d_dictionary.datatype.d_path.description=Path

View File

@@ -0,0 +1,19 @@
# Display labels for System Model
fm_forummodel.description=Forum Model
fm_forummodel.type.fm_forums.title=Forums
fm_forummodel.type.fm_forum.title=Forum
fm_forummodel.property.fm_status.title=Forum Status
fm_forummodel.property.fm_status.description=Status of forum i.e. locked, read-only
fm_forummodel.type.fm_topic.title=Topic
fm_forummodel.property.fm_type.title=Topic Type
fm_forummodel.property.fm_type.description=Type of topic i.e. sticky, announcement etc.
fm_forummodel.type.fm_post.title=Forum Article
fm_forummodel.aspect.fm_discussable.title=Discussable
fm_forummodel.property.fm_forum.title=Forum
fm_forummodel.property.fm_forum.description=The forum holding the discussion on the object the aspect is applied to

View File

@@ -0,0 +1 @@
permissions.err_access_denied=Access Denied. You do not have the appropriate permissions to perform this operation.

View File

@@ -0,0 +1,4 @@
# Rule types
inbound.display-label=Inbound
outbound.display-label=Outbound

View File

@@ -0,0 +1,31 @@
# Display labels for System Model
sys_systemmodel.description=Alfresco System Model
sys_systemmodel.type.sys_base.title=Base
sys_systemmodel.type.sys_base.description=Base
sys_systemmodel.type.sys_container.title=Container
sys_systemmodel.type.sys_container.description=Container
sys_systemmodel.association.sys_children.title=Children
sys_systemmodel.association.sys_children.description=Children
sys_systemmodel.type.sys_store_root.title=Store Root
sys_systemmodel.type.sys_store_root.description=Store Root
sys_systemmodel.type.sys_reference.title=Reference
sys_systemmodel.type.sys_reference.description=Reference
sys_systemmodel.property.sys_reference.title=Reference
sys_systemmodel.property.sys_reference.description=Reference
sys_systemmodel.aspect.aspect_root.title=Root
sys_systemmodel.aspect.aspect_root.description=Root
sys_systemmodel.aspect.sys_referenceable.title=Referenceable
sys_systemmodel.aspect.sys_referenceable.description=Referenceable
sys_systemmodel.property.sys_store-protocol.title=Store Protocol
sys_systemmodel.property.sys_store-protocol.description=Store Protocol
sys_systemmodel.property.sys_store-identifier.title=Store Identifier
sys_systemmodel.property.sys_store-identifier.description=Store Identifier
sys_systemmodel.property.sys_node-uuid.title=Node Identifier
sys_systemmodel.property.sys_node-uuid.description=Node Identifier

View File

@@ -0,0 +1,5 @@
# Template Service externalised display strings
error_no_template=Unable to find the template ''{0}''. Please contact your system adminstrator.
error_template_fail=Error during processing of the template ''{0}''. Please contact your system adminstrator.
error_template_io=IO Error during processing of the template ''{0}''. Please contact your system adminstrator.

View File

@@ -0,0 +1,8 @@
# Rule service externalised display strings
version_service.err_restore_exists=The node {0} cannot be restored since it already exists.
version_service.err_not_found=The current version label of the node does not exist in the version history.
version_service.err_unsupported=The current implementation of the version service does not support the creation of branches.
version_service.err_one_preceeding=The current implementation of the version service only supports one preceeding version.
version_service.err_restore_no_version=The node {0} cannot be restore since there is no version information available for this node.
version_service.err_revert_mismatch=The version provided to revert to does not come from the nodes version history.

View File

@@ -0,0 +1,341 @@
<alfresco-config area="mimetype-map">
<config evaluator="string-compare" condition="Mimetype Map">
<mimetypes>
<mimetype mimetype="text/plain" display="Plain Text">
<extension display="Plain Text" default="true">txt</extension>
<extension display="Comma Separated Values">csv</extension>
<extension display="Java Source">java</extension>
<extension display="SQL">sql</extension>
<extension display="Java Properties">properties</extension>
<extension display="FreeMarker Template">ftl</extension>
<extension display="Initialization Values">ini</extension>
<extension display="Windows Batch Script">bat</extension>
<extension display="Unix Shell Script">sh</extension>
<extension display="Log">log</extension>
</mimetype>
<mimetype mimetype="text/html" display="HTML">
<!-- first extension will be default unless otherwise specified -->
<extension default="true">html</extension>
<extension>htm</extension>
<extension>shtml</extension>
<extension>body</extension>
</mimetype>
<mimetype mimetype="application/xhtml+xml" display="XHTML">
<extension default="true">xhtml</extension>
</mimetype>
<mimetype mimetype="application/postscript" display="Postscript">
<!-- extension display will be same as mimetype's unless specified otherwise -->
<extension>ai</extension>
<extension>eps</extension>
<extension default="true">ps</extension>
</mimetype>
<mimetype mimetype="audio/x-aiff" display="AIFF Audio">
<extension>aiff</extension>
<extension>aif</extension>
<extension>aifc</extension>
</mimetype>
<mimetype mimetype="application/acp" display="Alfresco Content Package">
<extension>acp</extension>
</mimetype>
<mimetype mimetype="audio/basic" display="Basic Audio">
<extension>au</extension>
<extension>snd</extension>
</mimetype>
<mimetype mimetype="video/x-msvideo" display="MS Video">
<extension>avi</extension>
<extension>qvi</extension>
</mimetype>
<mimetype mimetype="video/x-ms-asf" display="MS Streaming Video">
<extension>asf</extension>
<extension>asx</extension>
</mimetype>
<mimetype mimetype="video/x-ms-wmv" display="MS Streaming Video">
<extension>wmv</extension>
</mimetype>
<mimetype mimetype="video/x-ms-wma" display="MS Streaming Audio">
<extension>wma</extension>
</mimetype>
<mimetype mimetype="video/x-rad-screenplay" display="RAD Screen Display">
<extension>avx</extension>
</mimetype>
<mimetype mimetype="application/x-bcpio" display="">
<extension>bcpio</extension>
</mimetype>
<mimetype mimetype="application/octet-stream" display="Octet Stream">
<extension display="Binary">bin</extension>
<extension display="Binary Executable">exe</extension>
</mimetype>
<mimetype mimetype="application/x-netcdf" display="">
<extension>cdf</extension>
<extension>nc</extension>
</mimetype>
<mimetype mimetype="application/x-x509-ca-cert" display="">
<extension>cer</extension>
</mimetype>
<mimetype mimetype="image/cgm" display="CGM Image">
<extension>cgm</extension>
</mimetype>
<mimetype mimetype="application/java" display="Java Class">
<extension>class</extension>
</mimetype>
<mimetype mimetype="application/x-cpio" display="">
<extension>cpio</extension>
</mimetype>
<mimetype mimetype="application/x-csh" display="">
<extension>csh</extension>
</mimetype>
<mimetype mimetype="text/css" display="Style Sheet">
<extension>css</extension>
</mimetype>
<mimetype mimetype="application/msword" display="Microsoft Word">
<extension>doc</extension>
</mimetype>
<mimetype mimetype="text/xml" display="XML">
<extension default="true">xml</extension>
<extension display="DTD">dtd</extension>
<extension display="XSLT">xslt</extension>
<extension display="XSLT">xsl</extension>
</mimetype>
<mimetype mimetype="application/x-dvi" display="">
<extension>dvi</extension>
</mimetype>
<mimetype mimetype="text/x-setext" display="">
<extension>etx</extension>
</mimetype>
<mimetype mimetype="image/gif" display="GIF Image">
<extension>gif</extension>
</mimetype>
<mimetype mimetype="application/sgml" display="SGML">
<extension>gml</extension>
</mimetype>
<mimetype mimetype="application/x-gtar" display="GZIP Tarball">
<extension>gtar</extension>
</mimetype>
<mimetype mimetype="application/x-gzip" display="GZIP">
<extension>gzip</extension>
</mimetype>
<mimetype mimetype="application/x-hdf" display="">
<extension>hdf</extension>
</mimetype>
<mimetype mimetype="application/mac-binhex40" display="">
<extension>hqx</extension>
</mimetype>
<mimetype mimetype="image/ief" display="IEF Image">
<extension>ief</extension>
</mimetype>
<mimetype mimetype="image/bmp" display="Bitmap Image">
<extension>bmp</extension>
</mimetype>
<mimetype mimetype="image/jpeg" display="JPEG Image">
<extension default="true">jpg</extension>
<extension>jpeg</extension>
<extension>jpe</extension>
</mimetype>
<mimetype mimetype="application/x-javascript" display="Java Script">
<extension>js</extension>
</mimetype>
<mimetype mimetype="application/x-latex" display="Latex">
<extension>latex</extension>
</mimetype>
<mimetype mimetype="application/x-troff-man" display="Man Page">
<extension>man</extension>
</mimetype>
<mimetype mimetype="application/x-troff-me" display="">
<extension>me</extension>
</mimetype>
<mimetype mimetype="application/x-troff-mes" display="">
<extension>ms</extension>
</mimetype>
<mimetype mimetype="application/x-mif" display="">
<extension>mif</extension>
</mimetype>
<mimetype mimetype="video/mpeg" display="MPEG Video">
<extension default="true">mpg</extension>
<extension>mpeg</extension>
<extension>mpe</extension>
</mimetype>
<mimetype mimetype="audio/x-mpeg" display="MPEG Audio">
<extension default="true">mp3</extension>
<extension>mp2</extension>
</mimetype>
<mimetype mimetype="video/mp4" display="MPEG4 Video">
<extension>mp4</extension>
</mimetype>
<mimetype mimetype="video/mpeg2" display="MPEG2 Video">
<extension>mpeg2</extension>
</mimetype>
<mimetype mimetype="video/quicktime" display="Quicktime Video">
<extension>mov</extension>
<extension>qt</extension>
</mimetype>
<mimetype mimetype="video/x-sgi-movie" display="SGI Video">
<extension>movie</extension>
<extension>mpv2</extension>
</mimetype>
<mimetype mimetype="application/oda" display="">
<extension>oda</extension>
</mimetype>
<mimetype mimetype="image/x-portable-bitmap" display="Portable Bitmap">
<extension>pbm</extension>
</mimetype>
<mimetype mimetype="application/pdf" display="Adobe PDF Document">
<extension>pdf</extension>
</mimetype>
<mimetype mimetype="image/x-portable-graymap" display="Greymap Image">
<extension>pgm</extension>
</mimetype>
<mimetype mimetype="image/png" display="PNG Image">
<extension>png</extension>
</mimetype>
<mimetype mimetype="image/x-portable-anymap" display="Anymap Image">
<extension>pnm</extension>
<extension>rpnm</extension>
</mimetype>
<mimetype mimetype="image/x-portable-pixmap" display="Pixmap Image">
<extension>ppm</extension>
</mimetype>
<mimetype mimetype="application/vnd.powerpoint" display="Microsoft PowerPoint">
<extension>ppt</extension>
</mimetype>
<mimetype mimetype="image/x-cmu-raster" display="Raster Image">
<extension>ras</extension>
</mimetype>
<mimetype mimetype="image/x-rgb" display="RGB Image">
<extension>rgb</extension>
</mimetype>
<mimetype mimetype="application/x-troff" display="">
<extension>tr</extension>
<extension>t</extension>
<extension>roff</extension>
</mimetype>
<mimetype mimetype="application/rtf" display="Rich Text Format">
<extension>rtf</extension>
</mimetype>
<mimetype mimetype="text/richtext" display="Rich Text">
<extension>rtx</extension>
</mimetype>
<mimetype mimetype="text/sgml" display="SGML">
<extension>sgml</extension>
<extension>sgm</extension>
</mimetype>
<mimetype mimetype="application/x-sh" display="Shell Script">
<extension>sh</extension>
</mimetype>
<mimetype mimetype="application/x-shar" display="">
<extension>shar</extension>
</mimetype>
<mimetype mimetype="application/x-wais-source" display="">
<extension>src</extension>
</mimetype>
<mimetype mimetype="application/x-sv4cpio" display="">
<extension>sv4cpio</extension>
</mimetype>
<mimetype mimetype="application/x-sv4crc" display="">
<extension>sv4crc</extension>
</mimetype>
<mimetype mimetype="application/x-shockwave-flash" display="Shockwave Flash">
<extension>swf</extension>
</mimetype>
<mimetype mimetype="application/x-tar" display="Tarball">
<extension>tar</extension>
</mimetype>
<mimetype mimetype="application/x-tcl" display="">
<extension>tcl</extension>
</mimetype>
<mimetype mimetype="application/x-tex" display="Tex">
<extension>tex</extension>
</mimetype>
<mimetype mimetype="application/x-texinfo" display="Tex Info">
<extension>texinfo</extension>
<extension>texi</extension>
</mimetype>
<mimetype mimetype="image/tiff" display="TIFF Image">
<extension>tiff</extension>
<extension>tif</extension>
</mimetype>
<mimetype mimetype="text/tab-separated-values" display="Tab Separated Values">
<extension>tsv</extension>
</mimetype>
<mimetype mimetype="application/x-ustar" display="">
<extension>ustar</extension>
</mimetype>
<mimetype mimetype="audio/x-wav" display="WAV Audio">
<extension>wav</extension>
</mimetype>
<mimetype mimetype="x-world/x-vrml" display="VRML">
<extension>wrl</extension>
</mimetype>
<mimetype mimetype="image/x-xbitmap" display="XBitmap Image">
<extension>xbm</extension>
</mimetype>
<mimetype mimetype="application/vnd.excel" display="Microsoft Excel">
<extension>xls</extension>
</mimetype>
<mimetype mimetype="image/x-xpixmap" display="XPixmap Image">
<extension>xpm</extension>
</mimetype>
<mimetype mimetype="image/x-xwindowdump" display="XWindow Dump">
<extension>xwd</extension>
</mimetype>
<mimetype mimetype="application/x-compress" display="Z Compress">
<extension>z</extension>
</mimetype>
<mimetype mimetype="application/zip" display="ZIP">
<extension>zip</extension>
</mimetype>
<mimetype mimetype="application/vnd.oasis.opendocument.text" display="OpenDocument Text (OpenOffice 2.0)">
<extension>odt</extension>
</mimetype>
<mimetype mimetype="application/vnd.oasis.opendocument.text-template" display="OpenDocument Text Template">
<extension>ott</extension>
</mimetype>
<mimetype mimetype="application/vnd.oasis.opendocument.text-web" display="HTML Document Template">
<extension>oth</extension>
</mimetype>
<mimetype mimetype="application/vnd.oasis.opendocument.text-master" display="OpenDocument Master Document">
<extension>odm</extension>
</mimetype>
<mimetype mimetype="application/vnd.oasis.opendocument.graphics" display="OpenDocument Drawing">
<extension>odg</extension>
</mimetype>
<mimetype mimetype="application/vnd.oasis.opendocument.graphics-template" display="OpenDocument Drawing Template">
<extension>otg</extension>
</mimetype>
<mimetype mimetype="application/vnd.oasis.opendocument.presentation" display="OpenDocument Presentation">
<extension>odp</extension>
</mimetype>
<mimetype mimetype="application/vnd.oasis.opendocument.presentation-template" display="OpenDocument Presentation Template">
<extension>otp</extension>
</mimetype>
<mimetype mimetype="application/vnd.oasis.opendocument.spreadsheet" display="OpenDocument Spreadsheet">
<extension>ods</extension>
</mimetype>
<mimetype mimetype="application/vnd.oasis.opendocument.spreadsheet-template" display="OpenDocument Spreadsheet Template">
<extension>ots</extension>
</mimetype>
<mimetype mimetype="application/vnd.oasis.opendocument.chart" display="OpenDocument Chart">
<extension>odc</extension>
</mimetype>
<mimetype mimetype="application/vnd.oasis.opendocument.formula" display="OpenDocument Formula">
<extension>odf</extension>
</mimetype>
<mimetype mimetype="application/vnd.oasis.opendocument.database" display="OpenDocument Database">
<extension>odb</extension>
</mimetype>
<mimetype mimetype="application/vnd.oasis.opendocument.image" display="OpenDocument Image">
<extension>odi</extension>
</mimetype>
<mimetype mimetype="application/vnd.sun.xml.writer" display="OpenOffice 1.0/StarOffice6.0 Writer 6.0">
<extension>sxw</extension>
</mimetype>
<mimetype mimetype="image/x-dwg" display="AutoCAD Drawing">
<extension>dwg</extension>
</mimetype>
<mimetype mimetype="image/x-dwt" display="AutoCAD Template">
<extension>dwt</extension>
</mimetype>
</mimetypes>
</config>
</alfresco-config>

View File

@@ -0,0 +1,17 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean name="fileFolderService" class="org.alfresco.repo.model.filefolder.FileFolderServiceImpl" init-method="init">
<property name="namespaceService"><ref bean="namespaceService" /></property>
<property name="dictionaryService"><ref bean="dictionaryService" /></property>
<property name="nodeService"><ref bean="nodeService" /></property>
<property name="copyService"><ref bean="copyService" /></property>
<!-- NOTE: using Big SearchService until AR-279 is completed -->
<property name="searchService"><ref bean="SearchService" /></property>
<property name="contentService"><ref bean="contentService" /></property>
<property name="mimetypeService"><ref bean="mimetypeMap" /></property>
</bean>
</beans>

View File

@@ -0,0 +1,119 @@
<model name="app:applicationmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>Alfresco Application Model</description>
<author>Alfresco</author>
<published>2005-09-29</published>
<version>1.0</version>
<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</imports>
<namespaces>
<namespace uri="http://www.alfresco.org/model/application/1.0" prefix="app"/>
</namespaces>
<types>
<!-- TODO: Glossary will be revisited when implementation is better understood -->
<type name="app:glossary">
<parent>cm:folder</parent>
<!--
<mandatory-aspects>
<aspect>CategoryContainable</aspect>
</mandatory-aspects>
<associations>
<association name="app:namespace">
<target-type>Category</target-type>
<target-multiplicity>0..*</target-multiplicity>
<source-mulitplicity>0..1<source-multiplicity>
<duplicates-allowed>false</duplicates-allowed>
</association>
</associations>
-->
</type>
<type name="app:configurations">
<title>Configurations</title>
<parent>cm:systemfolder</parent>
</type>
</types>
<aspects>
<aspect name="app:uifacets">
<title>UI Facets</title>
<parent>cm:titled</parent>
<properties>
<property name="app:icon">
<type>d:text</type>
</property>
</properties>
</aspect>
<aspect name="app:inlineeditable">
<title>Inline Editable</title>
<properties>
<property name="app:editInline">
<title>Edit Inline</title>
<type>d:boolean</type>
</property>
</properties>
</aspect>
<!-- TODO: Is this needed - should simpleworkflow ? -->
<aspect name="app:workflow">
<title>Workflow</title>
</aspect>
<aspect name="app:simpleworkflow">
<parent>app:workflow</parent>
<properties>
<property name="app:approveStep">
<type>d:text</type>
<protected>true</protected>
</property>
<property name="app:approveFolder">
<type>d:noderef</type>
<protected>true</protected>
</property>
<property name="app:approveMove">
<type>d:boolean</type>
</property>
<property name="app:rejectStep">
<type>d:text</type>
<protected>true</protected>
</property>
<property name="app:rejectFolder">
<type>d:noderef</type>
<protected>true</protected>
</property>
<property name="app:rejectMove">
<type>d:boolean</type>
</property>
</properties>
</aspect>
<aspect name="app:configurable">
<title>Configurable</title>
<associations>
<child-association name="app:configurations">
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>app:configurations</class>
<mandatory>false</mandatory>
<many>false</many>
</target>
</child-association>
</associations>
</aspect>
</aspects>
</model>

View File

@@ -0,0 +1,624 @@
<model name="cm:contentmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>Alfresco Content Domain Model</description>
<author>Alfresco</author>
<published>2005-09-29</published>
<version>1.0</version>
<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
</imports>
<namespaces>
<namespace uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</namespaces>
<types>
<type name="cm:cmobject">
<title>Object</title>
<parent>sys:base</parent>
<properties>
<property name="cm:name">
<title>Name</title>
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
<mandatory-aspects>
<aspect>cm:auditable</aspect>
</mandatory-aspects>
</type>
<type name="cm:folder">
<title>Folder</title>
<parent>cm:cmobject</parent>
<properties>
<property name="cm:orderedchildren">
<type>d:boolean</type>
</property>
</properties>
<associations>
<child-association name="cm:contains">
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>sys:base</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
<duplicate>false</duplicate>
</child-association>
</associations>
</type>
<type name="cm:content">
<title>Content</title>
<parent>cm:cmobject</parent>
<properties>
<property name="cm:content">
<type>d:content</type>
<mandatory>false</mandatory>
<!--- Index content in the background -->
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>true</tokenised>
</index>
</property>
</properties>
</type>
<type name="cm:dictionaryModel">
<title>Dictionary Model</title>
<parent>cm:content</parent>
<properties>
<property name="cm:modelName">
<title>Model name</title>
<type>d:qname</type>
<protected>true</protected>
</property>
<property name="cm:modelDescription">
<title>Description</title>
<type>d:text</type>
<protected>true</protected>
</property>
<property name="cm:modelAuthor">
<title>Author</title>
<type>d:text</type>
<protected>true</protected>
</property>
<property name="cm:modelPublishedDate">
<title>Published Date</title>
<type>d:date</type>
<protected>true</protected>
</property>
<property name="cm:modelVersion">
<title>Version</title>
<type>d:text</type>
<protected>true</protected>
</property>
<property name="cm:modelActive">
<title>Model Active</title>
<type>d:boolean</type>
<default>false</default>
</property>
</properties>
</type>
<type name="cm:linkfile">
<title>Link File</title>
<parent>cm:cmobject</parent>
<properties>
<property name="cm:path">
<type>d:path</type>
</property>
</properties>
</type>
<type name="cm:savedquery">
<title>Saved Query</title>
<parent>cm:content</parent>
</type>
<type name="cm:systemfolder">
<title>System Folder</title>
<parent>cm:folder</parent>
</type>
<type name="cm:person">
<title>Person</title>
<parent>sys:base</parent>
<properties>
<property name="cm:userName">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="cm:homeFolder">
<type>d:noderef</type>
<mandatory>true</mandatory>
</property>
<property name="cm:firstName">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="cm:lastName">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="cm:middleName">
<type>d:text</type>
</property>
<property name="cm:email">
<type>d:text</type>
</property>
<property name="cm:organizationId">
<type>d:text</type>
</property>
</properties>
</type>
<!-- Classification -->
<type name="cm:category_root">
<title>Category Root</title>
<parent>cm:cmobject</parent>
<associations>
<child-association name="cm:categories">
<target>
<class>cm:category</class>
</target>
</child-association>
</associations>
<mandatory-aspects>
<aspect>sys:aspect_root</aspect>
</mandatory-aspects>
</type>
<type name="cm:category">
<title>Category</title>
<parent>cm:cmobject</parent>
<associations>
<child-association name="cm:subcategories">
<target>
<class>cm:category</class>
</target>
</child-association>
</associations>
</type>
</types>
<aspects>
<aspect name="cm:titled">
<title>Titled</title>
<properties>
<property name="cm:title">
<title>Title</title>
<type>d:text</type>
</property>
<property name="cm:description">
<title>Description</title>
<type>d:text</type>
</property>
</properties>
</aspect>
<aspect name="cm:auditable">
<title>Auditable</title>
<properties>
<property name="cm:created">
<title>Created</title>
<type>d:datetime</type>
</property>
<property name="cm:creator">
<title>Author</title>
<type>d:text</type>
</property>
<property name="cm:modified">
<title>Modified</title>
<type>d:datetime</type>
</property>
<property name="cm:modifier">
<title>Modifier</title>
<type>d:text</type>
</property>
<property name="cm:accessed">
<title>Accessed</title>
<type>d:datetime</type>
</property>
</properties>
</aspect>
<aspect name="cm:localizable">
<title>Localizable</title>
<properties>
<property name="cm:locale">
<title>Locale</title>
<!-- need to have means to identify root instance of appropriate category -->
<type>d:category</type>
</property>
</properties>
</aspect>
<aspect name="cm:translatable">
<title>Translatable</title>
<parent>cm:localizable</parent>
<!-- TODO: Support mandatory-aspects on an aspect in the meta-model
<mandatory-aspects>
<aspect>cm:localizable</aspect>
</mandatory-aspects>
-->
<associations>
<association name="cm:translations">
<title>Translations</title>
<source>
<role>cm:translationOf</role>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>cm:content</class>
<role>cm:hasTranslation</role>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</aspect>
<aspect name="cm:transformable">
<title>Transformable</title>
<associations>
<association name="cm:formats">
<title>Formats</title>
<source>
<role>cm:formatOf</role>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>cm:content</class>
<role>cm:hasFormat</role>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</aspect>
<aspect name="cm:templatable">
<title>Templatable</title>
<properties>
<property name="cm:template">
<title>Template</title>
<type>d:noderef</type>
<mandatory>false</mandatory>
</property>
</properties>
</aspect>
<aspect name="cm:complianceable">
<title>Complianceable</title>
<parent>cm:auditable</parent>
<!-- TODO: Support mandatory-aspects on an aspect in the meta-model
<mandatory-aspects>
<aspect>Auditable</aspect>
</mandatory-aspects>
-->
<properties>
<property name="cm:removeAfter">
<title>Remove After</title>
<type>d:datetime</type>
</property>
</properties>
</aspect>
<aspect name="cm:ownable">
<title>Ownable</title>
<properties>
<property name="cm:owner">
<title>Owner</title>
<type>d:text</type>
</property>
</properties>
</aspect>
<aspect name="cm:dublincore">
<title>Dublin Core</title>
<parent>cm:titled</parent>
<!-- TODO: Support mandatory-aspects on an aspect in the meta-model
<mandatory-aspects>
<aspect>Auditable</aspect>
</mandatory-aspects>
-->
<properties>
<property name="cm:publisher">
<title>Publisher</title>
<type>d:text</type>
</property>
<property name="cm:contributor">
<title>Contributor</title>
<type>d:text</type>
</property>
<property name="cm:type">
<title>Type</title>
<type>d:text</type>
</property>
<property name="cm:identifier">
<title>Identifier</title>
<type>d:text</type>
</property>
<property name="cm:dcsource">
<title>Source</title>
<type>d:text</type>
</property>
<property name="cm:coverage">
<title>Coverage</title>
<type>d:text</type>
</property>
<property name="cm:rights">
<title>Rights</title>
<type>d:text</type>
</property>
<property name="cm:subject">
<title>Subject</title>
<type>d:text</type>
</property>
</properties>
</aspect>
<!--
<aspect name="cm:subjectable">
<title>Subjectable</title>
<mandatory-aspects>
<aspect>Auditable</aspect>
</mandatory-aspects>
<properties>
<property name="cm:subject">
<type>d:text</type>
</property>
</properties>
</aspect>
-->
<aspect name="cm:basable">
<title>Basable</title>
<associations>
<association name="cm:basis">
<source>
<role>cm:basedOn</role>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>cm:content</class>
<role>cm:hasBasis</role>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</aspect>
<aspect name="cm:partable">
<title>Partable</title>
<associations>
<association name="cm:parts">
<source>
<role>cm:partOf</role>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>cm:content</class>
<role>cm:hasPart</role>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</aspect>
<aspect name="cm:referencing">
<title>Referencing</title>
<associations>
<association name="cm:references">
<source>
<role>cm:referencedBy</role>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>cm:content</class>
<role>cm:references</role>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</aspect>
<aspect name="cm:replaceable">
<title>Replacable</title>
<associations>
<association name="cm:replaces">
<source>
<role>cm:replacedBy</role>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>cm:content</class>
<role>cm:replaces</role>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</aspect>
<aspect name="cm:effectivity">
<title>Effectivity</title>
<properties>
<property name="cm:from">
<title>Effective From</title>
<type>d:datetime</type>
</property>
<property name="cm:to">
<title>Effective To</title>
<type>d:datetime</type>
</property>
</properties>
</aspect>
<aspect name="cm:summarizable">
<title>Summarizable</title>
<properties>
<property name="cm:summary">
<title>Summary</title>
<type>d:text</type>
</property>
</properties>
</aspect>
<aspect name="cm:countable">
<title>Countable</title>
<properties>
<property name="cm:hits">
<type>d:int</type>
</property>
</properties>
</aspect>
<aspect name="cm:copiedfrom">
<title>Copied From</title>
<properties>
<property name="cm:source">
<type>d:noderef</type>
<protected>true</protected>
<mandatory>true</mandatory>
<multiple>false</multiple>
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>true</tokenised>
</index>
</property>
</properties>
</aspect>
<aspect name="cm:workingcopy">
<title>Working Copy</title>
<properties>
<property name="cm:workingCopyOwner">
<type>d:text</type>
<protected>true</protected>
<mandatory>true</mandatory>
</property>
</properties>
</aspect>
<aspect name="cm:versionable">
<title>Versionable</title>
<properties>
<property name="cm:versionLabel">
<title>Version Label</title>
<type>d:text</type>
<protected>true</protected>
</property>
<property name="cm:autoVersion">
<title>Auto Version</title>
<type>d:boolean</type>
<default>true</default>
</property>
</properties>
</aspect>
<aspect name="cm:lockable">
<title>Lockable</title>
<properties>
<property name="cm:lockOwner">
<type>d:text</type>
<protected>true</protected>
</property>
<property name="cm:lockType">
<type>d:text</type>
<protected>true</protected>
</property>
<property name="cm:expiryDate">
<type>d:date</type>
<protected>true</protected>
<mandatory>false</mandatory>
</property>
<property name="cm:lockIsDeep">
<type>d:boolean</type>
<protected>true</protected>
</property>
</properties>
</aspect>
<aspect name="cm:subscribable">
<associations>
<association name="cm:subscribedBy">
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>cm:person</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</aspect>
<aspect name="cm:classifiable">
<title>Classifiable</title>
</aspect>
<aspect name="cm:generalclassifiable">
<title>General Classifiable</title>
<parent>cm:classifiable</parent>
<properties>
<property name="cm:categories">
<title>Categories</title>
<type>d:category</type>
<mandatory>false</mandatory>
<multiple>true</multiple>
<index enabled="true">
<atomic>true</atomic>
<stored>true</stored>
<tokenised>true</tokenised>
</index>
</property>
</properties>
</aspect>
<aspect name="cm:attachable">
<title>Attachable</title>
<associations>
<association name="cm:attachments">
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>cm:cmobject</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</aspect>
</aspects>
</model>

View File

@@ -0,0 +1,17 @@
# Data Type Index Analyzers
d_dictionary.datatype.d_any.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer
d_dictionary.datatype.d_text.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer
d_dictionary.datatype.d_content.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer
d_dictionary.datatype.d_int.analyzer=org.alfresco.repo.search.impl.lucene.analysis.IntegerAnalyser
d_dictionary.datatype.d_long.analyzer=org.alfresco.repo.search.impl.lucene.analysis.LongAnalyser
d_dictionary.datatype.d_float.analyzer=org.alfresco.repo.search.impl.lucene.analysis.FloatAnalyser
d_dictionary.datatype.d_double.analyzer=org.alfresco.repo.search.impl.lucene.analysis.DoubleAnalyser
d_dictionary.datatype.d_date.analyzer=org.alfresco.repo.search.impl.lucene.analysis.DateAnalyser
d_dictionary.datatype.d_datetime.analyzer=org.alfresco.repo.search.impl.lucene.analysis.DateAnalyser
d_dictionary.datatype.d_boolean.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer
d_dictionary.datatype.d_qname.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer
d_dictionary.datatype.d_guid.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer
d_dictionary.datatype.d_category.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer
d_dictionary.datatype.d_noderef.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer
d_dictionary.datatype.d_path.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer

View File

@@ -0,0 +1,96 @@
<model name="d:dictionary" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>Alfresco Dictionary Model</description>
<author>Alfresco</author>
<published>2005-09-29</published>
<version>1.0</version>
<namespaces>
<!-- Default Namespace -->
<namespace uri="" prefix=""/>
<!-- Default Alfresco Namespace -->
<namespace uri="http://www.alfresco.org" prefix="alf"/>
<!-- Dictionary Namespace -->
<namespace uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!-- View Namespace -->
<namespace uri="http://www.alfresco.org/view/repository/1.0" prefix="view"/>
</namespaces>
<data-types>
<data-type name="d:any">
<analyser-class>org.apache.lucene.analysis.standard.StandardAnalyzer</analyser-class>
<java-class>java.lang.Object</java-class>
</data-type>
<data-type name="d:text">
<analyser-class>org.apache.lucene.analysis.standard.StandardAnalyzer</analyser-class>
<java-class>java.lang.String</java-class>
</data-type>
<data-type name="d:content">
<analyser-class>org.apache.lucene.analysis.standard.StandardAnalyzer</analyser-class>
<java-class>org.alfresco.service.cmr.repository.ContentData</java-class>
</data-type>
<data-type name="d:int">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.IntegerAnalyser</analyser-class>
<java-class>java.lang.Integer</java-class>
</data-type>
<data-type name="d:long">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.LongAnalyser</analyser-class>
<java-class>java.lang.Long</java-class>
</data-type>
<data-type name="d:float">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.FloatAnalyser</analyser-class>
<java-class>java.lang.Float</java-class>
</data-type>
<data-type name="d:double">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.DoubleAnalyser</analyser-class>
<java-class>java.lang.Double</java-class>
</data-type>
<data-type name="d:date">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.DateAnalyser</analyser-class>
<java-class>java.util.Date</java-class>
</data-type>
<data-type name="d:datetime">
<analyser-class>org.alfresco.repo.search.impl.lucene.analysis.DateAnalyser</analyser-class>
<java-class>java.util.Date</java-class>
</data-type>
<data-type name="d:boolean">
<analyser-class>org.apache.lucene.analysis.standard.StandardAnalyzer</analyser-class>
<java-class>java.lang.Boolean</java-class>
</data-type>
<data-type name="d:qname">
<analyser-class>org.apache.lucene.analysis.standard.StandardAnalyzer</analyser-class>
<java-class>org.alfresco.service.namespace.QName</java-class>
</data-type>
<data-type name="d:noderef">
<analyser-class>org.apache.lucene.analysis.standard.StandardAnalyzer</analyser-class>
<java-class>org.alfresco.service.cmr.repository.NodeRef</java-class>
</data-type>
<data-type name="d:path">
<analyser-class>org.apache.lucene.analysis.standard.StandardAnalyzer</analyser-class>
<java-class>org.alfresco.service.cmr.repository.Path</java-class>
</data-type>
<data-type name="d:category">
<analyser-class>org.apache.lucene.analysis.standard.StandardAnalyzer</analyser-class>
<java-class>org.alfresco.service.cmr.repository.NodeRef</java-class>
</data-type>
</data-types>
<!-- TODO: Define dictionary meta model -->
</model>

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="fm:forummodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>Forum Model</description>
<author></author>
<version>1.0</version>
<!-- Imports are required to allow references to definitions in other models -->
<imports>
<!-- Import Alfresco Dictionary Definitions -->
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<!-- Import Alfresco Content Domain Model Definitions -->
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</imports>
<namespaces>
<namespace uri="http://www.alfresco.org/model/forum/1.0" prefix="fm"/>
</namespaces>
<types>
<type name="fm:forums">
<parent>cm:folder</parent>
</type>
<type name="fm:forum">
<parent>cm:folder</parent>
<properties>
<property name="fm:status">
<type>d:category</type>
</property>
</properties>
</type>
<type name="fm:topic">
<parent>cm:folder</parent>
<properties>
<property name="fm:type">
<type>d:category</type>
</property>
</properties>
</type>
<type name="fm:post">
<parent>cm:content</parent>
</type>
</types>
<aspects>
<aspect name="fm:discussable">
<properties>
<property name="fm:forum">
<type>d:noderef</type>
<mandatory>true</mandatory>
</property>
</properties>
</aspect>
</aspects>
</model>

View File

@@ -0,0 +1,212 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.alfresco.org/model/dictionary/1.0" xmlns:dd="http://www.alfresco.org/model/dictionary/1.0" elementFormDefault="qualified" version="0.1">
<xs:annotation>
<xs:documentation>Alfresco Data Dictionary Schema - DRAFT</xs:documentation>
</xs:annotation>
<xs:element name="model">
<xs:complexType>
<xs:sequence>
<xs:element name="description" type="xs:string" maxOccurs="1" minOccurs="0"/>
<xs:element name="author" type="xs:string" maxOccurs="1" minOccurs="0"/>
<xs:element name="published" type="xs:date" maxOccurs="1" minOccurs="0"/>
<xs:element name="version" type="xs:string" maxOccurs="1" minOccurs="0"/>
<xs:element name="imports" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="import" maxOccurs="unbounded" minOccurs="1">
<xs:complexType>
<xs:attributeGroup ref="dd:namespaceDefinition"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="namespaces">
<xs:complexType>
<xs:sequence>
<xs:element name="namespace" maxOccurs="unbounded" minOccurs="1">
<xs:complexType>
<xs:attributeGroup ref="dd:namespaceDefinition"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="property-types" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="property-type" maxOccurs="unbounded" minOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:group ref="dd:TextualDescription"/>
<xs:element name="analyser-class" maxOccurs="1" minOccurs="0"/>
<xs:element name="java-class" maxOccurs="1" minOccurs="0"/>
</xs:sequence>
<xs:attributeGroup ref="dd:name"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="types" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="type" type="dd:type" maxOccurs="unbounded" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="aspects" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="aspect" type="dd:aspect" maxOccurs="unbounded" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="dd:name"/>
</xs:complexType>
</xs:element>
<xs:complexType name="class">
<xs:sequence>
<xs:group ref="dd:TextualDescription"></xs:group>
<xs:element name="parent" type="xs:string" maxOccurs="1" minOccurs="0"/>
<xs:element name="properties" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="property" type="dd:property" maxOccurs="unbounded" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="associations" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="association" type="dd:association" maxOccurs="unbounded" minOccurs="0"/>
<xs:element name="child-association" type="dd:childAssociation" maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="overrides" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="propertyOverrides" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="property" type="dd:propertyOverride" maxOccurs="unbounded" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="dd:name" />
</xs:complexType>
<xs:complexType name="property">
<xs:sequence>
<xs:group ref="dd:TextualDescription"/>
<xs:element name="type" type="xs:string"/>
<xs:element name="protected" type="xs:boolean" maxOccurs="1" minOccurs="0"/>
<xs:element name="mandatory" type="xs:boolean" maxOccurs="1" minOccurs="0"/>
<xs:element name="multiple" type="xs:boolean" maxOccurs="1" minOccurs="0"/>
<xs:element name="default" type="xs:anyType" maxOccurs="1" minOccurs="0"/>
<xs:element name="index" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="atomic" type="xs:boolean" maxOccurs="1" minOccurs="0"/>
<xs:element name="stored" type="xs:boolean" maxOccurs="1" minOccurs="0"/>
<xs:element name="tokenised" type="xs:boolean" maxOccurs="1" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="enabled" type="xs:boolean" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="dd:name"/>
</xs:complexType>
<xs:complexType name="type">
<xs:complexContent>
<xs:extension base="dd:class">
<xs:sequence>
<xs:element name="mandatory-aspects" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="aspect" type="xs:string" maxOccurs="unbounded" minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="aspect">
<xs:complexContent>
<xs:extension base="dd:class"></xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="association">
<xs:sequence>
<xs:group ref="dd:TextualDescription"></xs:group>
<xs:element name="source" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:group ref="dd:role"></xs:group>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="target">
<xs:complexType>
<xs:sequence>
<xs:element name="class" type="xs:string"></xs:element>
<xs:group ref="dd:role"></xs:group>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attributeGroup ref="dd:name"/>
</xs:complexType>
<xs:complexType name="childAssociation">
<xs:complexContent>
<xs:extension base="dd:association">
<xs:sequence>
<xs:element name="child-name" type="xs:string" maxOccurs="1" minOccurs="0"/>
<xs:element name="duplicate" type="xs:boolean" maxOccurs="1" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:group name="role">
<xs:sequence>
<xs:element name="role" type="xs:string" maxOccurs="1" minOccurs="0"/>
<xs:element name="mandatory" type="xs:boolean" maxOccurs="1" minOccurs="0"/>
<xs:element name="many" type="xs:boolean" maxOccurs="1" minOccurs="0"/>
</xs:sequence>
</xs:group>
<xs:complexType name="propertyOverride">
<xs:sequence>
<xs:element name="mandatory" type="xs:boolean" maxOccurs="1" minOccurs="0"/>
<xs:element name="default" type="xs:boolean" maxOccurs="1" minOccurs="0"/>
</xs:sequence>
<xs:attributeGroup ref="dd:name"/>
</xs:complexType>
<xs:attributeGroup name="namespaceDefinition">
<xs:attribute name="uri" type="xs:string" use="required" />
<xs:attribute name="prefix" type="xs:string" use="required" />
</xs:attributeGroup>
<xs:attributeGroup name="name">
<xs:attribute name="name" type="xs:string" use="required" />
</xs:attributeGroup>
<xs:group name="TextualDescription">
<xs:sequence>

View File

@@ -0,0 +1,342 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE permissions >
<!--PUBLIC '-//ALFRECSO//DTD PERMISSIONS//EN' 'permissionSchema.dtd' -->
<!-- Note: the above is commented out as spring does not seem to find the dtd -->
<!-- ============================================ -->
<!-- The base permission model for the repository -->
<!-- ============================================ -->
<permissions>
<!-- Namespaces used in type references -->
<namespaces>
<namespace uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
<namespace uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</namespaces>
<!-- -->
<!-- Permission sets link permissions and groups of permissions to types and aspects -->
<!-- defined in the model. Permissions defined against a type apply to all objects -->
<!-- that inherit from that type. Permissions defined against aspects apply to all -->
<!-- objects or only objects that have the aspect applied. For example, the permission -->
<!-- to lock an object could apply to any object but the permission to unlock an -->
<!-- object woujld only apply to objects that have the lockable aspect. -->
<!-- -->
<!-- =============================================== -->
<!-- Base permissions available on all types of node -->
<!-- =============================================== -->
<permissionSet type="sys:base" expose="all" >
<!-- ================= -->
<!-- Permission groups -->
<!-- ================= -->
<!-- -->
<!-- Permission groups are convenient groups of permissions. They may be used in -->
<!-- thier own right or as the effective set of permissions. If an authority has -->
<!-- all the permissions that make up a permission group they also have that -->
<!-- permission group even though it has not been explicitly granted. -->
<!-- -->
<!-- =========== -->
<!-- Full access -->
<!-- =========== -->
<!-- -->
<!-- By default this is exposed for all objects unless inherited objects choose to -->
<!-- expose only selected objects at the object level. -->
<!-- -->
<permissionGroup name="FullControl" expose="true" allowFullControl="true" />
<!-- ============================================= -->
<!-- Convenient groupings of low level permissions -->
<!-- ============================================= -->
<permissionGroup name="Read" expose="true" allowFullControl="false" />
<permissionGroup name="Write" expose="true" allowFullControl="false" />
<permissionGroup name="Delete" expose="true" allowFullControl="false" />
<permissionGroup name="AddChildren" expose="true" allowFullControl="false" />
<!-- =========== -->
<!-- Permissions -->
<!-- =========== -->
<!-- The permission to read properties on a node -->
<!-- -->
<!-- The properties of a node may ony be read if there is read access to the parent -->
<!-- node. ReadChildren access to the parent node is recursive for all nodes from -->
<!-- which the node inherits permissions. Access is required down the permission -->
<!-- tree at all pioints. -->
<!-- -->
<permission name="ReadProperties" expose="true" >
<grantedToGroup permissionGroup="Read" />
<requiredPermission on="parent" name="ReadChildren" implies="false"/>
</permission>
<!-- The permission to read the children of a node -->
<!-- -->
<!-- This permission is recursive. It requires the same permission is granted to -->
<!-- all of the parent nodes from which this node inherits permissions -->
<!-- -->
<permission name="ReadChildren" expose="true" >
<grantedToGroup permissionGroup="Read" />
<requiredPermission on="parent" name="ReadChildren" implies="false"/>
</permission>
<!-- The permission to write to the properties of a node -->
<!-- -->
<!-- This permission includes adding aspects to a node as they are stored as -->
<!-- a property. -->
<!-- -->
<permission name="WriteProperties" expose="true" >
<grantedToGroup permissionGroup="Write" />
<requiredPermission on="parent" name="ReadChildren" implies="false"/>
</permission>
<!-- The permission to delete a node -->
<!-- -->
<!-- A node can only be deleted if there is delete permission on the node, if the -->
<!-- node is accesible via its parent, and if the node can be deleted from its -->
<!-- parent. Currently, there is no check that all the children can be deleted. -->
<!-- This check can be added but requires more work so the UI is not checking this -->
<!-- permission just to show the delete icon. -->
<!-- -->
<permission name="DeleteNode" expose="true" >
<grantedToGroup permissionGroup="Delete" />
<requiredPermission on="parent" name="ReadChildren" implies="false"/>
<requiredPermission on="parent" name="DeleteChildren" implies="false"/>
<requiredPermission on="node" name="DeleteChildren" implies="false"/>
<!-- Remove the recursive check for now for performance -->
<!-- TODO: have one permission to check for delete on an item and one to check -->
<!-- child permissions when delete is called on the node service -->
<!-- <requiredPermission on="children" name="DeleteNode" implies="false"/> -->
</permission>
<!-- The permission to delete children of a node -->
<!-- -->
<!-- At the moment this includes both unlink and delete -->
<!-- -->
<permission name="DeleteChildren" expose="true" >
<grantedToGroup permissionGroup="Delete" />
<requiredPermission on="parent" name="ReadChildren" implies="false"/>
</permission>
<!-- The permission to create new nodes -->
<permission name="CreateChildren" expose="true" >
<grantedToGroup permissionGroup="AddChildren" />
<requiredPermission on="parent" name="ReadChildren" implies="false" />
</permission>
<!-- The permission to link nodes -->
<permission name="LinkChildren" expose="true" >
<grantedToGroup permissionGroup="AddChildren" />
<requiredPermission on="parent" name="ReadChildren" implies="false"/>
</permission>
<!-- The permission to delte associations between nodes (not children) -->
<permission name="DeleteAssociations" expose="true" >
<requiredPermission on="parent" name="ReadChildren" implies="false"/>
</permission>
<!-- The permission to read associations -->
<permission name="ReadAssociations" expose="true" >
<requiredPermission on="parent" name="ReadChildren" implies="false" />
</permission>
<!-- The permission to create associations -->
<permission name="CreateAssociations" expose="true" >
<requiredPermission on="parent" name="ReadChildren" implies="false" />
</permission>
<!-- ==================================================== -->
<!-- Permissions related to the management of permissions -->
<!-- ==================================================== -->
<!-- The permission to read the permissions on a node -->
<permission name="ReadPermissions" expose="true" >
<requiredPermission on="parent" name="ReadChildren" implies="false"/>
</permission>
<!-- The permission to the change the permissions associated with a node -->
<permission name="ChangePermissions" expose="true" >
<requiredPermission on="parent" name="ReadChildren" implies="false"/>
</permission>
</permissionSet>
<!-- =============================== -->
<!-- Permissions specific to content -->
<!-- =============================== -->
<permissionSet type="cm:content" expose="all">
<!-- Extend some base permission groups to include permissoins related to content. -->
<permissionGroup name="Read" extends="true" expose="true"/>
<permissionGroup name="Write" extends="true" expose="true"/>
<!-- Add an execute permission group. -->
<permissionGroup name="Execute" allowFullControl="false" expose="true"/>
<!-- Content specific low-level permissions. -->
<!-- The permission to read content. -->
<permission name="ReadContent" expose="true">
<grantedToGroup permissionGroup="Read"/>
<requiredPermission on="parent" name="ReadChildren" implies="false"/>
</permission>
<!-- The permission to write content. -->
<permission name="WriteContent" expose="true">
<grantedToGroup permissionGroup="Write" />
<requiredPermission on="parent" name="ReadChildren" implies="false"/>
</permission>
<!-- Execute permission on content. -->
<permission name="ExecuteContent" expose="true">
<grantedToGroup permissionGroup="Execute" />
<requiredPermission on="parent" name="ReadChildren" implies="false"/>
</permission>
</permissionSet>
<!-- ============================================== -->
<!-- Permissions associated with the Ownable aspect -->
<!-- ============================================== -->
<permissionSet type="cm:ownable" expose="selected">
<!-- Permission control to allow ownership of the node to be taken from others -->
<permissionGroup name="TakeOwnership" requiresType="false" expose="false"/>
<!-- The low level permission to control setting the owner of a node -->
<permission name="SetOwner" expose="false" requiresType="false">
<grantedToGroup permissionGroup="TakeOwnership" />
<!-- require to be able to reach the node and set properties in the node -->
<requiredPermission on="parent" name="ReadChildren" />
<requiredPermission on="node" name="WriteProperties" />
</permission>
</permissionSet>
<!-- =================================================== -->
<!-- Permission related to lock, check out and check in. -->
<!-- =================================================== -->
<permissionSet type="cm:lockable" expose="selected">
<!-- At the moment these permissions are hidden so they do not appear in the list -->
<!-- of permissions. -->
<!-- Check Out permission - exposed for all object types -->
<permissionGroup name="CheckOut" requiresType="false" expose="false"/>
<!-- Check In permission - only exposed when the lockable aspect is present -->
<permissionGroup name="CheckIn" requiresType="true" expose="false"/>
<!-- Cancel Check Out permission - only exposed for the lockable aspect is present -->
<permissionGroup name="CancelCheckOut" requiresType="true" expose="false"/>
<!-- Low level lock permission -->
<permission name="Lock" requiresType="false" expose="false">
<grantedToGroup permissionGroup="CheckOut" />
<requiredPermission on="node" type="sys:base" name="Write"/>
</permission>
<!-- Low level unlock permission -->
<permission name="Unlock" requiresType="true" expose="false">
<grantedToGroup permissionGroup="CheckIn" />
<grantedToGroup permissionGroup="CancelCheckOut" />
</permission>
</permissionSet>
<!-- ============================== -->
<!-- Permissions for spaces/folders -->
<!-- ============================== -->
<permissionSet type="cm:folder" expose="selected">
<!-- Kept for backward compatibility - the folder administrator permission has -->
<!-- been removed to aviod confusion -->
<permissionGroup name="Administrator" allowFullControl="true" expose="false" />
<!-- A coordinator can do anything in the folder or its childeren unless the -->
<!-- permissions are set not to inherit or permission is denied. -->
<permissionGroup name="Coordinator" allowFullControl="true" expose="true" />
<!-- A contributor can create content and then they have full permission on what -->
<!-- they have created - via the permissions assigned to the owner. -->
<permissionGroup name="Contributor" allowFullControl="false" expose="true" >
<!-- Contributor is a guest who can add content, and then can modify via the -->
<!-- owner permissions. -->
<includePermissionGroup permissionGroup="Guest" type="cm:folder"/>
<includePermissionGroup permissionGroup="AddChildren" type="sys:base"/>
<!-- Check out requires write permissions so this will not apply to all -->
<!-- documents. -->
<includePermissionGroup type="cm:lockable" permissionGroup="CheckOut"/>
</permissionGroup>
<!-- An editor can read and write to anything in a space; they can not create -->
<!-- new nodes. They can cehck out content into a space to which they have -->
<!-- create permission. -->
<permissionGroup name="Editor" expose="true" allowFullControl="false" >
<includePermissionGroup type="cm:folder" permissionGroup="Guest"/>
<includePermissionGroup type="sys:base" permissionGroup="Write"/>
<includePermissionGroup type="cm:lockable" permissionGroup="CheckOut"/>
</permissionGroup>
<!-- The guest permission allows read to everything by default. -->
<permissionGroup name="Guest" allowFullControl="false" expose="true" >
<includePermissionGroup permissionGroup="Read" type="sys:base" />
</permissionGroup>
</permissionSet>
<!-- ================== -->
<!-- Global permissions -->
<!-- ================== -->
<!-- -->
<!-- Global permissions apply regardless of any particular node context. -->
<!-- They can not be denied by the permissions set on any node. -->
<!-- -->
<!-- Admin can do anything to any ndoe -->
<globalPermission permission="FullControl" authority="ROLE_ADMINISTRATOR"/>
<!-- For now, owners can always see, find and manipulate their stuff -->
<globalPermission permission="FullControl" authority="ROLE_OWNER"/>
<!-- Unlock is granted to the lock owner -->
<globalPermission permission="Unlock" authority="ROLE_LOCK_OWNER"/>
<!-- Check in is granted to the lock owner -->
<globalPermission permission="CheckIn" authority="ROLE_LOCK_OWNER"/>
<!-- Cancel check out is granted to the locak owner -->
<globalPermission permission="CancelCheckOut" authority="ROLE_LOCK_OWNER"/>
</permissions>

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT permissions (namespaces+, permissionSet*, globalPermission*)>
<!ELEMENT namespaces (namespace+)>
<!ELEMENT namespace EMPTY>
<!ATTLIST namespace uri CDATA #REQUIRED>
<!ATTLIST namespace prefix CDATA #REQUIRED>
<!ELEMENT permissionGroup (includePermissionGroup* )>
<!ATTLIST permissionGroup name CDATA #REQUIRED>
<!ATTLIST permissionGroup type CDATA #IMPLIED>
<!ATTLIST permissionGroup extends (true | false) "false">
<!ATTLIST permissionGroup expose (true | false) "false">
<!ATTLIST permissionGroup allowFullControl (true | false) "false" >
<!ATTLIST permissionGroup requiresType (true | false) "true">
<!ELEMENT includePermissionGroup EMPTY>
<!ATTLIST includePermissionGroup type CDATA #IMPLIED>
<!ATTLIST includePermissionGroup permissionGroup CDATA #REQUIRED>
<!ELEMENT permissionSet (permissionGroup*, permission*, dynamicAuthority*)>
<!ATTLIST permissionSet type CDATA #REQUIRED>
<!ATTLIST permissionSet expose (all | selected) "all">
<!ELEMENT permission (grantedToGroup*, requiredPermission* )>
<!ATTLIST permission name CDATA #REQUIRED>
<!ATTLIST permission expose (true | false) "false">
<!ATTLIST permission requiresType (true | false) "true">
<!ELEMENT dynamicAuthority EMPTY>
<!ATTLIST dynamicAuthority evaluator CDATA #REQUIRED>
<!ELEMENT requiredPermission EMPTY>
<!ATTLIST requiredPermission name CDATA #REQUIRED>
<!ATTLIST requiredPermission type CDATA #IMPLIED>
<!ATTLIST requiredPermission on (node | parent | children) #REQUIRED>
<!ATTLIST requiredPermission implies (true | false) "false">
<!ELEMENT grantedToGroup EMPTY >
<!ATTLIST grantedToGroup type CDATA #IMPLIED>
<!ATTLIST grantedToGroup permissionGroup CDATA #REQUIRED>
<!ELEMENT globalPermission EMPTY >
<!ATTLIST globalPermission authority CDATA #IMPLIED>
<!ATTLIST globalPermission permission CDATA #REQUIRED>

View File

@@ -0,0 +1,114 @@
<model name="sys:systemmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>Alfresco Repository System Definitions</description>
<author>Alfresco</author>
<published>2005-09-29</published>
<version>1.0</version>
<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
</imports>
<namespaces>
<namespace uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
</namespaces>
<types>
<type name="sys:base">
<title>Base</title>
<mandatory-aspects>
<aspect>sys:referenceable</aspect>
</mandatory-aspects>
</type>
<type name="sys:descriptor">
<title>Descriptor</title>
<parent>sys:base</parent>
<properties>
<property name="sys:versionMajor">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="sys:versionMinor">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="sys:versionRevision">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="sys:versionLabel">
<type>d:text</type>
</property>
</properties>
</type>
<type name="sys:container">
<title>Container</title>
<parent>sys:base</parent>
<associations>
<child-association name="sys:children">
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>sys:base</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</child-association>
</associations>
</type>
<type name="sys:store_root">
<title>Store Root</title>
<parent>sys:container</parent>
<mandatory-aspects>
<aspect>sys:aspect_root</aspect>
</mandatory-aspects>
</type>
<type name="sys:reference">
<title>Reference</title>
<parent>sys:base</parent>
<properties>
<property name="sys:reference">
<type>d:noderef</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
</types>
<aspects>
<aspect name="sys:aspect_root">
<title>Root</title>
</aspect>
<!-- aspect to store the fundamental node identifiers -->
<aspect name="sys:referenceable">
<title>Referenceable</title>
<properties>
<property name="sys:store-protocol">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="sys:store-identifier">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="sys:node-uuid">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</aspect>
</aspects>
</model>

View File

@@ -0,0 +1,73 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- File Server Configuration -->
<bean id="fileServerConfiguration"
class="org.alfresco.filesys.server.config.ServerConfiguration"
init-method="init"
destroy-method="closeConfiguration"
depends-on="importerBootstrap">
<constructor-arg>
<ref bean="authenticationManager"/>
</constructor-arg>
<constructor-arg>
<ref bean="authenticationService"/>
</constructor-arg>
<constructor-arg>
<ref bean="authenticationComponent"/>
</constructor-arg>
<constructor-arg>
<ref bean="nodeService"/>
</constructor-arg>
<constructor-arg>
<ref bean="personService"/>
</constructor-arg>
<constructor-arg>
<ref bean="transactionComponent"/>
</constructor-arg>
<constructor-arg>
<value>alfresco/file-servers.xml</value>
</constructor-arg>
<constructor-arg>
<ref bean="contentDiskDriver" />
</constructor-arg>
</bean>
<!-- CIFS Server -->
<bean id="cifsServer" class="org.alfresco.filesys.CIFSServer" init-method="startServer" destroy-method="stopServer" depends-on="importerBootstrap">
<constructor-arg>
<ref bean="fileServerConfiguration"/>
</constructor-arg>
</bean>
<!-- FTP Server -->
<bean id="ftpServer" class="org.alfresco.filesys.FTPServer" init-method="startServer" destroy-method="stopServer" depends-on="importerBootstrap">
<constructor-arg>
<ref bean="fileServerConfiguration"/>
</constructor-arg>
</bean>
<!-- Filesystem Interface -->
<bean id="contentDiskDriver" class="org.alfresco.filesys.smb.server.repo.ContentDiskDriver" >
<constructor-arg>
<ref bean="cifsHelper" />
</constructor-arg>
<property name="transactionService"><ref bean="transactionComponent" /></property>
<property name="nodeService"><ref bean="NodeService" /></property>
<property name="unprotectedNodeService"><ref bean="nodeService" /></property>
<property name="unprotectedSearchService"><ref bean="searchService" /></property>
<property name="namespaceService"><ref bean="namespaceService" /></property>
<property name="contentService"><ref bean="ContentService" /></property>
<property name="permissionService"><ref bean="permissionService"/></property>
</bean>
<bean id="cifsHelper" class="org.alfresco.filesys.smb.server.repo.CifsHelper">
<property name="dictionaryService"><ref bean="dictionaryService" /></property>
<property name="nodeService"><ref bean="NodeService" /></property>
<property name="fileFolderService"><ref bean="FileFolderService" /></property>
<property name="mimetypeService"><ref bean="mimetypeMap" /></property>
<property name="permissionService"><ref bean="permissionService"/></property>
</bean>
</beans>

View File

@@ -0,0 +1,115 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!-- Beans pertinent to node persistence and services -->
<beans>
<bean id="nodeDaoServiceImpl" class="org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl" >
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="dbNodeDaoServiceTxnRegistration" class="org.alfresco.repo.transaction.NodeDaoServiceTransactionInterceptor" >
<property name="nodeDaoService">
<ref bean="nodeDaoServiceImpl" />
</property>
</bean>
<bean id="nodeDaoService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.repo.node.db.NodeDaoService</value>
</property>
<property name="target">
<ref bean="nodeDaoServiceImpl" />
</property>
<property name="interceptorNames">
<list>
<value>dbNodeDaoServiceTxnRegistration</value>
</list>
</property>
</bean>
<bean id="nodeService" class="org.alfresco.repo.service.StoreRedirectorProxyFactory">
<property name="proxyInterface">
<value>org.alfresco.service.cmr.repository.NodeService</value>
</property>
<property name="defaultBinding">
<ref bean="dbNodeService"></ref>
</property>
<property name="redirectedProtocolBindings">
<map>
<entry key="workspace"><ref bean="dbNodeService"></ref></entry>
<entry key="versionStore"><ref bean="versionNodeService"></ref></entry>
</map>
</property>
</bean>
<!-- NodeService implemented to persist to Database -->
<bean id="dbNodeService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.repository.NodeService</value>
</property>
<property name="target">
<bean class="org.alfresco.repo.node.db.DbNodeServiceImpl" init-method="init" >
<constructor-arg>
<ref bean="policyComponent"/>
</constructor-arg>
<constructor-arg>
<ref bean="dictionaryService" />
</constructor-arg>
<constructor-arg>
<ref bean="nodeDaoService" />
</constructor-arg>
</bean>
</property>
<property name="interceptorNames">
<list>
<!-- <idref bean="methodCallLogAdvice" />-->
<!-- <idref bean="dbNodeService_PerformanceMonitorAdvice" />-->
</list>
</property>
</bean>
<bean id="dbNodeService_PerformanceMonitorAdvice" class="org.alfresco.util.perf.PerformanceMonitorAdvice" >
<constructor-arg>
<value>dbNodeService</value>
</constructor-arg>
</bean>
<!-- Handles policy callbacks to ensure that node hierarchy gets indexed -->
<bean id="nodeIndexer" class="org.alfresco.repo.node.index.NodeIndexer" init-method="init">
<property name="policyComponent">
<ref bean="policyComponent" />
</property>
<property name="indexer">
<ref bean="indexerComponent" />
</property>
</bean>
<!-- ensures model-compliance of node structures -->
<bean id="integrityChecker" class="org.alfresco.repo.node.integrity.IntegrityChecker" init-method="init">
<property name="policyComponent">
<ref bean="policyComponent"/>
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="enabled">
<value>true</value> <!-- on/off switch -->
</property>
<property name="traceOn">
<value>false</value> <!-- use only to trace problems -->
</property>
<property name="failOnViolation" >
<value>false</value> <!-- set to true to generate runtime exceptions upon violation -->
</property>
<property name="maxErrorsPerTransaction" >
<value>5</value> <!-- limit output (exception and log) to the first N violation messages -->
</property>
</bean>
</beans>

View File

@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="ownableService" class="org.alfresco.repo.ownable.noop.OwnableServiceNOOPImpl"/>
</beans>

View File

@@ -0,0 +1,13 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="ownableService" class="org.alfresco.repo.ownable.impl.OwnableServiceImpl">
<property name="nodeService">
<ref bean="nodeService"/>
</property>
<property name="authenticationService">
<ref bean="authenticationServiceImpl"/>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,864 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<import resource="classpath:alfresco/public-services-security-context.xml" />
<!-- Base Service Descriptor for Alfresco Services -->
<bean id="AlfrescoServiceDescriptor" abstract="true" class="org.alfresco.repo.service.ServiceDescriptorAdvisorFactory">
<property name="namespace">
<value>http://www.alfresco.org</value>
</property>
</bean>
<!-- Service Registry -->
<bean id="ServiceRegistry" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.ServiceRegistry</value>
</property>
<property name="target">
<bean class="org.alfresco.repo.service.ServiceDescriptorRegistry"/>
</property>
<property name="interceptorNames">
<list>
<idref local="ServiceRegistry_descriptor" />
</list>
</property>
</bean>
<bean id="ServiceRegistry_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.ServiceRegistry</value>
</property>
<property name="description">
<value>Repository service registry</value>
</property>
</bean>
<!-- Exception Translation -->
<bean id="exceptionTranslator" class="org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor"/>
<!-- Descriptor Service -->
<bean id="DescriptorService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.descriptor.DescriptorService</value>
</property>
<property name="target"><ref bean="descriptorComponent"/></property>
<property name="interceptorNames">
<list>
<idref local="exceptionTranslator" />
<idref local="DescriptorService_descriptor" />
</list>
</property>
</bean>
<bean id="DescriptorService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.descriptor.DescriptorService</value>
</property>
<property name="description">
<value>Descriptor service</value>
</property>
</bean>
<!-- Namespace Service -->
<bean id="NamespaceService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.namespace.NamespaceService</value>
</property>
<property name="target"><ref bean="namespaceService"/></property>
<property name="interceptorNames">
<list>
<idref local="NamespaceService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="NamespaceService_security" />
<idref local="NamespaceService_descriptor" />
</list>
</property>
</bean>
<bean id="NamespaceService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="NamespaceService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.namespace.NamespaceService</value>
</property>
<property name="description">
<value>Namespace service</value>
</property>
</bean>
<!-- Transaction Service -->
<alias alias="TransactionService" name="transactionComponent"/>
<!-- Dictionary Service -->
<bean id="DictionaryService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.dictionary.DictionaryService</value>
</property>
<property name="target"><ref bean="dictionaryService"/></property>
<property name="interceptorNames">
<list>
<idref local="DictionaryService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="DictionaryService_security" />
<idref local="DictionaryService_descriptor" />
</list>
</property>
</bean>
<bean id="DictionaryService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="DictionaryService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.dictionary.DictionaryService</value>
</property>
<property name="description">
<value>Dictionary Service</value>
</property>
</bean>
<!-- Node Service -->
<bean id="NodeService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.repository.NodeService</value>
</property>
<property name="target"><ref bean="nodeService"/></property>
<property name="interceptorNames">
<list>
<idref local="NodeService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="NodeService_security" />
<idref local="NodeService_descriptor" />
</list>
</property>
</bean>
<bean id="NodeService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="exist*">${server.transaction.mode.readOnly}</prop>
<prop key="get*">${server.transaction.mode.readOnly}</prop>
<prop key="has*">${server.transaction.mode.readOnly}</prop>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="NodeService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.repository.NodeService</value>
</property>
<property name="description">
<value>Node Service</value>
</property>
</bean>
<!-- Content Service -->
<bean id="ContentService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.repository.ContentService</value>
</property>
<property name="target"><ref bean="contentService"/></property>
<property name="interceptorNames">
<list>
<idref local="ContentService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="ContentService_security" />
<idref local="ContentService_descriptor" />
</list>
</property>
</bean>
<bean id="ContentService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="ContentService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.repository.ContentService</value>
</property>
<property name="description">
<value>Content Service</value>
</property>
</bean>
<!-- Mime Type Service -->
<bean id="MimetypeService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.repository.MimetypeService</value>
</property>
<property name="target"><ref bean="mimetypeMap"/></property>
<property name="interceptorNames">
<list>
<idref local="MimetypeService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="MimetypeService_security" />
<idref local="MimetypeService_descriptor" />
</list>
</property>
</bean>
<bean id="MimetypeService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="MimetypeService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.repository.MimetypeService</value>
</property>
<property name="description">
<value>Mime Type Service</value>
</property>
</bean>
<!-- Search Service -->
<bean id="SearchService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.search.SearchService</value>
</property>
<property name="target"><ref bean="searchService"/></property>
<property name="interceptorNames">
<list>
<idref local="SearchService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="SearchService_security" />
<idref local="SearchService_descriptor" />
</list>
</property>
</bean>
<bean id="SearchService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="SearchService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.search.SearchService</value>
</property>
<property name="description">
<value>Search Service</value>
</property>
</bean>
<!-- Category Service -->
<bean id="CategoryService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.search.CategoryService</value>
</property>
<property name="target"><ref bean="categoryService"/></property>
<property name="interceptorNames">
<list>
<idref local="CategoryService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="CategoryService_security" />
<idref local="CategoryService_descriptor" />
</list>
</property>
</bean>
<bean id="CategoryService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="CategoryService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.search.CategoryService</value>
</property>
<property name="description">
<value>Category Service</value>
</property>
</bean>
<!-- Copy Service -->
<bean id="CopyService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.repository.CopyService</value>
</property>
<property name="target"><ref bean="copyService"/></property>
<property name="interceptorNames">
<list>
<idref local="CopyService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="CopyService_security" />
<idref local="CopyService_descriptor" />
</list>
</property>
</bean>
<bean id="CopyService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="CopyService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.repository.CopyService</value>
</property>
<property name="description">
<value>Copy Service</value>
</property>
</bean>
<!-- Lock Service -->
<bean id="LockService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.lock.LockService</value>
</property>
<property name="target"><ref bean="lockService"/></property>
<property name="interceptorNames">
<list>
<idref local="LockService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="LockService_security" />
<idref local="LockService_descriptor" />
</list>
</property>
</bean>
<bean id="LockService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="LockService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.lock.LockService</value>
</property>
<property name="description">
<value>Lock Service</value>
</property>
</bean>
<!-- Version Service -->
<bean id="VersionService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.version.VersionService</value>
</property>
<property name="target"><ref bean="versionService"/></property>
<property name="interceptorNames">
<list>
<idref local="VersionService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="VersionService_security" />
<idref local="VersionService_descriptor" />
</list>
</property>
</bean>
<bean id="VersionService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="VersionService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.version.VersionService</value>
</property>
<property name="description">
<value>Version Service</value>
</property>
</bean>
<!-- COCI Service -->
<bean id="CheckoutCheckinService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.coci.CheckOutCheckInService</value>
</property>
<property name="target"><ref bean="checkOutCheckInService"/></property>
<property name="interceptorNames">
<list>
<idref local="CheckoutCheckinService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="CheckoutCheckinService_security" />
<idref local="CheckoutCheckinService_descriptor" />
</list>
</property>
</bean>
<bean id="CheckoutCheckinService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="CheckoutCheckinService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.coci.CheckOutCheckInService</value>
</property>
<property name="description">
<value>Version Service</value>
</property>
</bean>
<!-- Rule Service -->
<bean id="RuleService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.rule.RuleService</value>
</property>
<property name="target"><ref bean="ruleService"/></property>
<property name="interceptorNames">
<list>
<idref local="RuleService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="RuleService_security" />
<idref local="RuleService_descriptor" />
</list>
</property>
</bean>
<bean id="RuleService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="RuleService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.rule.RuleService</value>
</property>
<property name="description">
<value>Rule Service</value>
</property>
</bean>
<!-- Importer Service -->
<bean id="ImporterService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.view.ImporterService</value>
</property>
<property name="target"><ref bean="importerComponent"/></property>
<property name="interceptorNames">
<list>
<idref local="ImporterService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="ImporterService_security" />
<idref local="ImporterService_descriptor" />
</list>
</property>
</bean>
<bean id="ImporterService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="ImporterService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.view.ImporterService</value>
</property>
<property name="description">
<value>Importer Service</value>
</property>
</bean>
<!-- Exporter Service -->
<bean id="ExporterService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.view.ExporterService</value>
</property>
<property name="target"><ref bean="exporterComponent"/></property>
<property name="interceptorNames">
<list>
<idref local="ExporterService_transaction" />
<idref local="ExporterService_descriptor" />
</list>
</property>
</bean>
<bean id="ExporterService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="ExporterService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.view.ExporterService</value>
</property>
<property name="description">
<value>Exporter Service</value>
</property>
</bean>
<!-- Action Service -->
<bean id="ActionService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.action.ActionService</value>
</property>
<property name="target"><ref bean="actionService"/></property>
<property name="interceptorNames">
<list>
<idref local="ActionService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="ActionService_security" />
<idref local="ActionService_descriptor" />
</list>
</property>
</bean>
<bean id="ActionService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="ActionService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.action.ActionService</value>
</property>
<property name="description">
<value>Action Service</value>
</property>
</bean>
<!-- Permission Service -->
<bean id="PermissionService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.security.PermissionService</value>
</property>
<property name="target"><ref bean="permissionService"/></property>
<property name="interceptorNames">
<list>
<idref local="PermissionService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="PermissionService_security" />
<idref local="PermissionService_descriptor" />
</list>
</property>
</bean>
<bean id="PermissionService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="PermissionService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.security.PermissionService</value>
</property>
<property name="description">
<value>Permission Service</value>
</property>
</bean>
<!-- Authority Service -->
<bean id="AuthorityService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.security.AuthorityService</value>
</property>
<property name="target"><ref bean="authorityService"/></property>
<property name="interceptorNames">
<list>
<idref local="AuthorityService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="AuthorityService_security" />
<idref local="AuthorityService_descriptor" />
</list>
</property>
</bean>
<bean id="AuthorityService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="AuthorityService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.security.AuthorityService</value>
</property>
<property name="description">
<value>Authority Service</value>
</property>
</bean>
<!-- Ownable Service -->
<bean id="OwnableService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.security.OwnableService</value>
</property>
<property name="target"><ref bean="ownableService"/></property>
<property name="interceptorNames">
<list>
<idref local="OwnableService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="OwnableService_security" />
<idref local="OwnableService_descriptor" />
</list>
</property>
</bean>
<bean id="OwnableService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="OwnableService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.security.OwnableService</value>
</property>
<property name="description">
<value>OwnableService Service</value>
</property>
</bean>
<!-- Authentication Service -->
<bean id="AuthenticationService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.security.AuthenticationService</value>
</property>
<property name="target"><ref bean="authenticationServiceImpl"/></property>
<property name="interceptorNames">
<list>
<idref local="AuthenticationService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="AuthenticationService_security" />
<idref local="AuthenticationService_descriptor" />
</list>
</property>
</bean>
<bean id="AuthenticationService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="AuthenticationService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.security.AuthenticationService</value>
</property>
<property name="description">
<value>AuthenticationService Service</value>
</property>
</bean>
<!-- Template Service -->
<bean id="TemplateService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.repository.TemplateService</value>
</property>
<property name="target"><ref bean="templateService"/></property>
<property name="interceptorNames">
<list>
<idref local="TemplateService_transaction" />
<idref local="exceptionTranslator" />
<idref bean="TemplateService_security" />
<idref local="TemplateService_descriptor" />
</list>
</property>
</bean>
<bean id="TemplateService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="TemplateService_descriptor" parent="AlfrescoServiceDescriptor">
<property name="interface">
<value>org.alfresco.service.cmr.repository.TemplateService</value>
</property>
<property name="description">
<value>TemplateService Service</value>
</property>
</bean>
<!-- File/Folder Service -->
<bean id="FileFolderService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.model.FileFolderService</value>
</property>
<property name="target"><ref bean="fileFolderService"/></property>
<property name="interceptorNames">
<list>
<idref local="FileFolderService_transaction" />
<idref local="exceptionTranslator" />
</list>
</property>
</bean>
<bean id="FileFolderService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="list*">${server.transaction.mode.readOnly}</prop>
<prop key="search*">${server.transaction.mode.readOnly}</prop>
<prop key="get*">${server.transaction.mode.readOnly}</prop>
<prop key="resolve*">${server.transaction.mode.readOnly}</prop>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,64 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!-- Interceptors that do not enforce security of any form -->
<beans>
<bean id='permissionService' class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.repo.security.permissions.PermissionServiceSPI</value>
</property>
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="target">
<ref bean="permissionServiceImpl" />
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="permissionServiceImpl" class="org.alfresco.repo.security.permissions.noop.PermissionServiceNOOPImpl">
</bean>
<bean id="NamespaceService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="DictionaryService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="NodeService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="ContentService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="MimetypeService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="SearchService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="CategoryService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="CopyService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="LockService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="VersionService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="CheckoutCheckinService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="RuleService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="ImporterService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="ActionService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="PermissionService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="AuthorityService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="OwnableService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<bean id="TemplateService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
</beans>

View File

@@ -0,0 +1,611 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!-- ========================== -->
<!-- Enforcement of permissions -->
<!-- ========================== -->
<!-- -->
<!-- This file defines the beans that intercept method calls to the repository services -->
<!-- and enforce security based on the currently authenticated user. -->
<!-- -->
<beans>
<!-- Because of the way hibernate works, we need to cache when permissions are not -->
<!-- set. -->
<import resource="classpath:alfresco/cache-context.xml" />
<!-- ======================= -->
<!-- Support for permissions -->
<!-- ========================-->
<!-- ================================= -->
<!-- The enterprise permission service -->
<!-- ================================= -->
<bean id='permissionService' class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.repo.security.permissions.PermissionServiceSPI</value>
</property>
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="target">
<ref bean="permissionServiceImpl" />
</property>
<property name="transactionAttributes">
<props>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
<bean id="permissionServiceImpl" class="org.alfresco.repo.security.permissions.impl.PermissionServiceImpl">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="permissionsDAO">
<ref bean="permissionsDAO" />
</property>
<property name="modelDAO">
<ref bean="permissionsModelDAO" />
</property>
<property name="authenticationComponent">
<ref bean="authenticationComponentImpl" />
</property>
<property name="authorityService">
<ref bean="authorityService" />
</property>
<!-- Dynamic authorites are evaluated in the context of a store/node etc -->
<!-- as opposed to being fixed like user name and groups. -->
<!-- There are two dynamic authorities, the ower of a node and the owner -->
<!-- of a lock on a node. -->
<property name="dynamicAuthorities">
<list>
<ref bean="ownerDynamicAuthority" />
<ref bean="lockOwnerDynamicAuthority" />
</list>
</property>
</bean>
<!-- =================== -->
<!-- Dynamic Authorities -->
<!-- =================== -->
<!-- The provider to evaluate if the current authentication is the owner of a node. -->
<bean id="ownerDynamicAuthority" class="org.alfresco.repo.security.permissions.dynamic.OwnerDynamicAuthority">
<property name="ownableService">
<ref bean="ownableService" />
</property>
</bean>
<!-- The provider to evaluate if the currfent authentication is the local owner on a -->
<!-- node. -->
<bean id="lockOwnerDynamicAuthority" class="org.alfresco.repo.security.permissions.dynamic.LockOwnerDynamicAuthority">
<property name="lockService">
<ref bean="lockService" />
</property>
</bean>
<!-- =============== -->
<!-- Permissions DAO -->
<!-- =============== -->
<bean id="permissionsDAO" class="org.alfresco.repo.security.permissions.impl.hibernate.HibernatePermissionsDAO">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
<property name="nullPermissionCache">
<ref bean="nullPermissionCache" />
</property>
</bean>
<!-- ===================== -->
<!-- Permissions Model DAO -->
<!-- ===================== -->
<bean id='permissionsModelDAO' class="org.alfresco.repo.security.permissions.impl.model.PermissionModel">
<property name="model">
<value>alfresco/model/permissionDefinitions.xml</value>
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
</bean>
<!-- ====== -->
<!-- Voters -->
<!-- ====== -->
<!-- A voter to allow access base on the current authentication having authorities -->
<!-- starting with the prefix "ROLE_" -->
<!-- Any match grants -->
<bean id="roleVoter" class="net.sf.acegisecurity.vote.RoleVoter" abstract="false" singleton="true"
lazy-init="default" autowire="default" dependency-check="default" >
<property name="rolePrefix">
<value>ROLE_</value>
</property>
</bean>
<!-- A voter to allow access base on the current authentication having authorities -->
<!-- starting with the prefix "GROUP_" -->
<!-- Any match grants -->
<bean id="groupVoter" class="net.sf.acegisecurity.vote.RoleVoter" abstract="false" singleton="true"
lazy-init="default" autowire="default" dependency-check="default" >
<property name="rolePrefix">
<value>GROUP_</value>
</property>
</bean>
<!-- A voter to allow access based on node access control. -->
<!-- These start ACL_NODE or ACL_PARENT and are followed by .methodArgumentPosition -->
<!-- then object type (prefix:localname) . permission -->
<!-- -->
<!-- All permissions starting ACL_NODE and ACL_PARENT must be present for access to -->
<!-- be granted. -->
<!-- -->
<!-- Note: ff the context evaluates to null (e.g. doing an exists test on a node -->
<!-- that does not exist) then access will be allowed. -->
<bean id="aclEntryVoter" class="org.alfresco.repo.security.permissions.impl.acegi.ACLEntryVoter" abstract="false" singleton="true"
lazy-init="default" autowire="default" dependency-check="default" >
<property name="permissionService">
<ref bean="permissionService"></ref>
</property>
<property name="namespacePrefixResolver">
<ref bean="namespaceService"></ref>
</property>
<property name="nodeService">
<ref bean="nodeService"></ref>
</property>
<property name="authenticationService">
<ref bean="authenticationService" />
</property>
<property name="authorityService">
<ref bean="authorityService" />
</property>
</bean>
<!-- ======================= -->
<!-- Access decision manager -->
<!-- ======================= -->
<!-- The access decision manager asks voters in order if they should allow access -->
<!-- Role and group access do not require ACL based access -->
<bean id="accessDecisionManager" class="net.sf.acegisecurity.vote.AffirmativeBased">
<property name="allowIfAllAbstainDecisions"><value>false</value></property>
<property name="decisionVoters">
<list>
<ref local="roleVoter"/>
<ref local="groupVoter"/>
<ref local="aclEntryVoter"/>
</list>
</property>
</bean>
<!-- ======================================== -->
<!-- Post method call application of security -->
<!-- ======================================== -->
<bean id="afterAcl" class="org.alfresco.repo.security.permissions.impl.acegi.ACLEntryAfterInvocationProvider" abstract="false" singleton="true"
lazy-init="default" autowire="default" dependency-check="default" >
<property name="permissionService">
<ref bean="permissionService"></ref>
</property>
<property name="namespacePrefixResolver">
<ref bean="namespaceService"></ref>
</property>
<property name="nodeService">
<ref bean="nodeService"></ref>
</property>
<property name="authenticationService">
<ref bean="authenticationService" />
</property>
</bean>
<!-- Link up after method call security -->
<bean id="afterInvocationManager" class="net.sf.acegisecurity.afterinvocation.AfterInvocationProviderManager">
<property name="providers">
<list>
<ref local="afterAcl"/>
</list>
</property>
</bean>
<!-- ================================ -->
<!-- Beans that enforce secure access -->
<!-- ================================ -->
<!-- Each bean defines a new methos security interceptor wired up with the -->
<!-- authenticationManager, accessDecisionManager and afterInvocationManager, which -->
<!-- can all be reused. -->
<!-- If one method cal requires security enforcement - all methods must gave a -->
<!-- security entry of some sort. ACL_ALLOW can be used to give access to all -->
<!-- ROLE_ADMINISTRATOR can be used to grant access to administrator related methods -->
<!-- The namespace service does not enforce any security requirements -->
<bean id="NamespaceService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<!-- The dictionary service does not enforce any security requirements -->
<bean id="DictionaryService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<!-- ======================== -->
<!-- Node service permissions -->
<!-- ======================== -->
<!-- See the NodeService for the parameters required for each method call. -->
<!-- -->
<!-- getStores -->
<!-- returns a list fo the stores to which the curent authentication has Read -->
<!-- permission. (See the permission model defintion for what this means) -->
<!-- createStore -->
<!-- only a user with the administrator role can create new stores -->
<!-- exists -->
<!-- check if a node exists. If the current user does not have read access then -->
<!-- the node will not exist. -->
<!-- getRootNode -->
<!-- get the root node for a store - access will be denied for users who do not -->
<!-- have Read permission for the root node of the store. -->
<!-- createNode -->
<!-- requires that the current authentication has the permission to create -->
<!-- children for the containing node. -->
<!-- moveNode -->
<!-- requires that the current authentication has the permission to delete the -->
<!-- the node in the source folder and create it in the destination folder. -->
<!-- setChildAssociationIndex -->
<!-- required write properties permission on the parent -->
<!-- getType -->
<!-- obtaining the type of a node requires read access -->
<!-- addAspect -->
<!-- adding an aspect updates a multi-valued property so this requires write -->
<!-- access to properties. -->
<!-- removeAspect -->
<!-- removing an aspect updates a multi-valued property so this requires write -->
<!-- access to properties. -->
<!-- hasAspect -->
<!-- querying for an aspect requires read access to a property -->
<!-- getAspects -->
<!-- querying for all aspect requires read access to a property -->
<!-- deleteNode -->
<!-- requires the delete permission -->
<!-- addChild -->
<!-- requires create children on the parent -->
<!-- removeChild -->
<!-- Requires delete permission for the node to be deleted -->
<!-- getProperties -->
<!-- Requires read properties for the node -->
<!-- getProperty -->
<!-- Requires read properties for the node -->
<!-- setProperties -->
<!-- Requires write properties for the node -->
<!-- setProperty -->
<!-- Requires write properties for the node -->
<!-- getParentAssocs -->
<!-- Requires read on the node and returns only parents that can be seen -->
<!-- It is possible that no parents are accessible -->
<!-- getChildAssocs -->
<!-- Requires read on the node and returns only children that can be seen -->
<!-- It is possible that no children are accessible -->
<!-- getPrimaryParent -->
<!-- Requires read on the node an aceess error will be thrown if the primary -->
<!-- parent can not be read -->
<!-- createAssociation -->
<!-- NOT SET YET -->
<!-- removeAssociation -->
<!-- NOT SET YET -->
<!-- getTargetAssocs -->
<!-- NOT SET YET -->
<!-- getSourceAssocs -->
<!-- NOT SET YET -->
<!-- getPath -->
<!-- Requires read for the node -->
<!-- getPaths -->
<!-- Requires read for the node -->
<bean id="NodeService_security" class="net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
<property name="authenticationManager"><ref bean="authenticationManager"/></property>
<property name="accessDecisionManager"><ref local="accessDecisionManager"/></property>
<property name="afterInvocationManager"><ref local="afterInvocationManager"/></property>
<property name="objectDefinitionSource">
<value>
org.alfresco.service.cmr.repository.NodeService.getStores=AFTER_ACL_NODE.sys:base.Read
org.alfresco.service.cmr.repository.NodeService.createStore=ACL_METHOD.ROLE_ADMINISTRATOR
org.alfresco.service.cmr.repository.NodeService.exists=ACL_NODE.0.sys:base.Read
org.alfresco.service.cmr.repository.NodeService.getNodeStatus=ACL_NODE.0.sys:base.Read
org.alfresco.service.cmr.repository.NodeService.getRootNode=ACL_NODE.0.sys:base.Read
org.alfresco.service.cmr.repository.NodeService.createNode=ACL_NODE.0.sys:base.CreateChildren
org.alfresco.service.cmr.repository.NodeService.moveNode=ACL_NODE.0.sys:base.WriteProperties,ACL_PARENT.0.sys:base.DeleteChildren,ACL_NODE.1.sys:base.CreateChildren
org.alfresco.service.cmr.repository.NodeService.setChildAssociationIndex=ACL_PARENT.0.sys:base.WriteProperties
org.alfresco.service.cmr.repository.NodeService.getType=ACL_NODE.0.sys:base.ReadProperties
org.alfresco.service.cmr.repository.NodeService.addAspect=ACL_NODE.0.sys:base.Write
org.alfresco.service.cmr.repository.NodeService.removeAspect=ACL_NODE.0.sys:base.Write
org.alfresco.service.cmr.repository.NodeService.hasAspect=ACL_NODE.0.sys:base.ReadProperties
org.alfresco.service.cmr.repository.NodeService.getAspects=ACL_NODE.0.sys:base.ReadProperties
org.alfresco.service.cmr.repository.NodeService.deleteNode=ACL_NODE.0.sys:base.Delete
org.alfresco.service.cmr.repository.NodeService.addChild=ACL_NODE.0.sys:base.CreateChildren,ACL_NODE.1.sys:base.ReadProperties
org.alfresco.service.cmr.repository.NodeService.removeChild=ACL_NODE.1.sys:base.Delete
org.alfresco.service.cmr.repository.NodeService.getProperties=ACL_NODE.0.sys:base.ReadProperties
org.alfresco.service.cmr.repository.NodeService.getProperty=ACL_NODE.0.sys:base.ReadProperties
org.alfresco.service.cmr.repository.NodeService.setProperties=ACL_NODE.0.sys:base.WriteProperties
org.alfresco.service.cmr.repository.NodeService.setProperty=ACL_NODE.0.sys:base.WriteProperties
org.alfresco.service.cmr.repository.NodeService.getParentAssocs=ACL_NODE.0.sys:base.ReadProperties,AFTER_ACL_PARENT.sys:base.Read
org.alfresco.service.cmr.repository.NodeService.getChildAssocs=ACL_NODE.0.sys:base.ReadChildren,AFTER_ACL_NODE.sys:base.Read
org.alfresco.service.cmr.repository.NodeService.getPrimaryParent=ACL_NODE.0.sys:base.ReadProperties,AFTER_ACL_PARENT.sys:base.Read
org.alfresco.service.cmr.repository.NodeService.createAssociation=ROLE_AUTHENTICATED
org.alfresco.service.cmr.repository.NodeService.removeAssociation=ROLE_AUTHENTICATED
org.alfresco.service.cmr.repository.NodeService.getTargetAssocs=ROLE_AUTHENTICATED
org.alfresco.service.cmr.repository.NodeService.getSourceAssocs=ROLE_AUTHENTICATED
org.alfresco.service.cmr.repository.NodeService.getPath=ACL_NODE.0.sys:base.ReadProperties
org.alfresco.service.cmr.repository.NodeService.getPaths=ACL_NODE.0.sys:base.ReadProperties
</value>
</property>
</bean>
<!-- =========================== -->
<!-- Content Service Permissions -->
<!-- =========================== -->
<!-- Reading requires the permission to read content -->
<!-- Writing required the permission to write conent -->
<bean id="ContentService_security" class="net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
<property name="authenticationManager"><ref bean="authenticationManager"/></property>
<property name="accessDecisionManager"><ref local="accessDecisionManager"/></property>
<property name="afterInvocationManager"><ref local="afterInvocationManager"/></property>
<property name="objectDefinitionSource">
<value>
org.alfresco.service.cmr.repository.ContentService.getReader=ACL_NODE.0.cm:content.ReadContent
org.alfresco.service.cmr.repository.ContentService.getWriter=ACL_NODE.0.cm:content.WriteContent
</value>
</property>
</bean>
<!-- ================ -->
<!-- MimeType Service -->
<!-- ================ -->
<!-- There are no permissions around mime types -->
<bean id="MimetypeService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<!-- ============== -->
<!-- Search Service -->
<!-- ============== -->
<!-- All search results are filtered to exclude nodes that the current user can not -->
<!-- read. Other methods restrict queries to those nodes the user can read -->
<bean id="SearchService_security" class="net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
<property name="authenticationManager"><ref bean="authenticationManager"/></property>
<property name="accessDecisionManager"><ref local="accessDecisionManager"/></property>
<property name="afterInvocationManager"><ref local="afterInvocationManager"/></property>
<property name="objectDefinitionSource">
<value>
org.alfresco.service.cmr.search.SearchService.query=AFTER_ACL_NODE.sys:base.Read
org.alfresco.service.cmr.search.SearchService.selectNodes=AFTER_ACL_NODE.sys:base.Read
org.alfresco.service.cmr.search.SearchService.selectProperties=ACL_NODE.0.sys:base.Read
org.alfresco.service.cmr.search.SearchService.contains=ACL_NODE.0.sys:base.Read
org.alfresco.service.cmr.search.SearchService.like=ACL_NODE.0.sys:base.Read
</value>
</property>
</bean>
<!-- ================ -->
<!-- Category Service -->
<!-- ================ -->
<!-- Category queries are filtered for nodes that are visible to the current user -->
<!-- Other methods are unrestricted at the moment -->
<bean id="CategoryService_security" class="net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
<property name="authenticationManager"><ref bean="authenticationManager"/></property>
<property name="accessDecisionManager"><ref local="accessDecisionManager"/></property>
<property name="afterInvocationManager"><ref local="afterInvocationManager"/></property>
<property name="objectDefinitionSource">
<value>
org.alfresco.service.cmr.search.CategoryService.getChildren=AFTER_ACL_NODE.sys:base.Read
org.alfresco.service.cmr.search.CategoryService.getCategories=AFTER_ACL_NODE.sys:base.Read
org.alfresco.service.cmr.search.CategoryService.getClassifications=AFTER_ACL_NODE.sys:base.Read
org.alfresco.service.cmr.search.CategoryService.getRootCategories=AFTER_ACL_NODE.sys:base.Read
org.alfresco.service.cmr.search.CategoryService.getClassificationAspects=ACL_ALLOW
org.alfresco.service.cmr.search.CategoryService.createClassifiction=ACL_METHOD.ROLE_ADMINISTRATOR
org.alfresco.service.cmr.search.CategoryService.createRootCategory=ACL_METHOD.ROLE_ADMINISTRATOR
org.alfresco.service.cmr.search.CategoryService.createCategory=ACL_METHOD.ROLE_ADMINISTRATOR
org.alfresco.service.cmr.search.CategoryService.deleteClassification=ACL_METHOD.ROLE_ADMINISTRATOR
org.alfresco.service.cmr.search.CategoryService.deleteCategory=ACL_METHOD.ROLE_ADMINISTRATOR
</value>
</property>
</bean>
<!-- ============ -->
<!-- Copy Service -->
<!-- ============ -->
<!-- The copy service does not require any security restrictions, they are imposed -->
<!-- by the node service it uses to do its work. -->
<bean id="CopyService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<!-- ================ -->
<!-- The Lock Service -->
<!-- ================ -->
<!-- Lock and Unlock require the related aspect specific permissions. Querying the -->
<!-- lock status just requires read access to the node. -->
<bean id="LockService_security" class="net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
<property name="authenticationManager"><ref bean="authenticationManager"/></property>
<property name="accessDecisionManager"><ref local="accessDecisionManager"/></property>
<property name="afterInvocationManager"><ref local="afterInvocationManager"/></property>
<property name="objectDefinitionSource">
<value>
org.alfresco.service.cmr.lock.LockService.lock=ACL_NODE.0.cm:lockable.Lock
org.alfresco.service.cmr.lock.LockService.unlock=ACL_NODE.0.cm:lockable.Unlock
org.alfresco.service.cmr.lock.LockService.getLockStatus=ACL_NODE.0.sys:base.Read
org.alfresco.service.cmr.lock.LockService.getLockType=ACL_NODE.0.sys:base.Read
org.alfresco.service.cmr.lock.LockService.checkForLock=ACL_NODE.0.sys:base.Read
</value>
</property>
</bean>
<!-- =============== -->
<!-- Version Service -->
<!-- =============== -->
<!-- The version service does not have any restrictions applied at the moment. It -->
<!-- does not use a node service that would apply any permissions. -->
<bean id="VersionService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<!-- ============================== -->
<!-- The Check-out/Check-in service -->
<!-- ============================== -->
<!-- To check out a node requires that you have permission to check out the node and -->
<!-- create the working copy in the specified location. Check in requires the -->
<!-- the associated permission, as does cancel check out. See the permission model -->
<!-- for how these permissions are granted. -->
<bean id="CheckoutCheckinService_security" class="net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
<property name="authenticationManager"><ref bean="authenticationManager"/></property>
<property name="accessDecisionManager"><ref local="accessDecisionManager"/></property>
<property name="afterInvocationManager"><ref local="afterInvocationManager"/></property>
<property name="objectDefinitionSource">
<value>
org.alfresco.service.cmr.coci.CheckOutCheckInService.checkout=ACL_NODE.0.cm:lockable.CheckOut,ACL_NODE.1.sys:base.CreateChildren
org.alfresco.service.cmr.coci.CheckOutCheckInService.checkin=ACL_NODE.0.cm:lockable.CheckIn
org.alfresco.service.cmr.coci.CheckOutCheckInService.cancelCheckout=ACL_NODE.0.cm:lockable.CancelCheckOut
</value>
</property>
</bean>
<!-- ================ -->
<!-- The Rule Service -->
<!-- ================ -->
<!-- The rule service does not require any security restrictions, they are imposed -->
<!-- by the node service it uses to do its work. -->
<bean id="RuleService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<!-- ==================== -->
<!-- The Importer Service -->
<!-- ==================== -->
<!-- The importer service does not require any security restrictions, they are -->
<!-- imposed by the node service it uses to do its work. -->
<bean id="ImporterService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<!-- ================== -->
<!-- The Action Service -->
<!-- ================== -->
<!-- The action service does not require any security restrictions, they are imposed -->
<!-- by the node service it uses to do its work. -->
<bean id="ActionService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<!-- ====================== -->
<!-- The Permission Service -->
<!-- ====================== -->
<!-- Requests to this service are controlled by the ReadPermissions and -->
<!-- and ChangePermissions permissions. Access to some methods are not restricted at -->
<!-- the moment. -->
<bean id="PermissionService_security" class="net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
<property name="authenticationManager"><ref bean="authenticationManager"/></property>
<property name="accessDecisionManager"><ref local="accessDecisionManager"/></property>
<property name="afterInvocationManager"><ref local="afterInvocationManager"/></property>
<property name="objectDefinitionSource">
<value>
org.alfresco.service.cmr.security.PermissionService.getOwnerAuthority=ACL_ALLOW
org.alfresco.service.cmr.security.PermissionService.getAllAuthorities=ACL_ALLOW
org.alfresco.service.cmr.security.PermissionService.getAllPermission=ACL_ALLOW
org.alfresco.service.cmr.security.PermissionService.getPermissions=ACL_NODE.0.sys:base.ReadPermissions
org.alfresco.service.cmr.security.PermissionService.getAllSetPermissions=ACL_NODE.0.sys:base.ReadPermissions
org.alfresco.service.cmr.security.PermissionService.getSettablePermissions=ACL_ALLOW
org.alfresco.service.cmr.security.PermissionService.hasPermission=ACL_ALLOW
org.alfresco.service.cmr.security.PermissionService.deletePermissions=ACL_NODE.0.sys:base.ChangePermissions
org.alfresco.service.cmr.security.PermissionService.deletePermission=ACL_NODE.0.sys:base.ChangePermissions
org.alfresco.service.cmr.security.PermissionService.setPermission=ACL_NODE.0.sys:base.ChangePermissions
org.alfresco.service.cmr.security.PermissionService.setInheritParentPermissions=ACL_NODE.0.sys:base.ChangePermissions
org.alfresco.service.cmr.security.PermissionService.getInheritParentPermissions=ACL_ALLOW
org.alfresco.service.cmr.security.PermissionService.clearPermission=ACL_NODE.0.sys:base.ChangePermissions
</value>
</property>
</bean>
<!-- ===================== -->
<!-- The Authority Service -->
<!-- ===================== -->
<!-- This service currently has no restrictions. -->
<bean id="AuthorityService_security" class="net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor">
<property name="authenticationManager"><ref bean="authenticationManager"/></property>
<property name="accessDecisionManager"><ref local="accessDecisionManager"/></property>
<property name="afterInvocationManager"><ref local="afterInvocationManager"/></property>
<property name="objectDefinitionSource">
<value>
org.alfresco.service.cmr.security.AuthorityService.hasAdminAuthority=ACL_ALLOW
org.alfresco.service.cmr.security.AuthorityService.getAuthorities=ACL_ALLOW
org.alfresco.service.cmr.security.AuthorityService.getAllAuthorities=ACL_ALLOW
org.alfresco.service.cmr.security.AuthorityService.getAllRootAuthorities=ACL_ALLOW
org.alfresco.service.cmr.security.AuthorityService.createAuthority=ACL_METHOD.ROLE_ADMINISTRATOR
org.alfresco.service.cmr.security.AuthorityService.addAuthority=ACL_METHOD.ROLE_ADMINISTRATOR
org.alfresco.service.cmr.security.AuthorityService.removeAuthority=ACL_METHOD.ROLE_ADMINISTRATOR
org.alfresco.service.cmr.security.AuthorityService.deleteAuthority=ACL_METHOD.ROLE_ADMINISTRATOR
org.alfresco.service.cmr.security.AuthorityService.getContainedAuthorities=ACL_ALLOW
org.alfresco.service.cmr.security.AuthorityService.getContainingAuthorities=ACL_ALLOW
org.alfresco.service.cmr.security.AuthorityService.getShortName=ACL_ALLOW
org.alfresco.service.cmr.security.AuthorityService.getName=ACL_ALLOW
</value>
</property>
</bean>
<!-- =============================================== -->
<!-- The Authentication Service security interceptor -->
<!-- =============================================== -->
<bean id="AuthenticationService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<!-- =================== -->
<!-- The Ownable Service -->
<!-- =================== -->
<!-- This service currently has no restrictions. -->
<!-- TODO: respect the permissions on the ownable service -->
<bean id="OwnableService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<!-- ==================== -->
<!-- The Template Service -->
<!-- ==================== -->
<!-- This service currently has no restrictions. -->
<bean id="TemplateService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
</beans>

View File

@@ -0,0 +1,76 @@
# Directory configuration
dir.root=./alf_data
dir.contentstore=${dir.root}/contentstore
# The location for lucene index files
dir.indexes=${dir.root}/lucene-indexes
# The location for lucene index locks
dir.indexes.lock=${dir.indexes}/locks
# #################### #
# Lucene configuration #
# #################### #
#
# The maximum number of clauses that are allowed in a lucene query
#
lucene.query.maxClauses=10000
#
# The size of the queue of nodes waiting for index
# Events are generated as nodes are changed, this is the maximum size of the queue used to coalesce event
# When this size is reached the lists of nodes will be indexed
#
lucene.indexer.batchSize=1000
#
# Lucene index min merge docs - the in memory size of the index
#
lucene.indexer.minMergeDocs=1000
#
# When lucene index files are merged together - it will try to keep this number of segments/files in
#
lucene.indexer.mergeFactor=10
#
# Roughly the maximum number of nodes indexed in one file/segment
#
lucene.indexer.maxMergeDocs=100000
#
# The number of terms from a document that will be indexed
#
lucene.indexer.maxFieldLength=10000
# Database configuration
db.driver=org.gjt.mm.mysql.Driver
db.name=alfresco
db.url=jdbc:mysql:///${db.name}
db.username=alfresco
db.password=alfresco
# Email configuration
mail.host=activiti2.activiti.local
mail.port=25
mail.username=anonymous
mail.password=
# System Configuration
system.store=system://system
system.descriptor.childname=sys:descriptor
# Spaces Configuration
spaces.store=workspace://SpacesStore
spaces.company_home.childname=app:company_home
spaces.dictionary.childname=app:dictionary
spaces.templates.childname=app:space_templates
spaces.templates.content.childname=app:content_templates
# Are user names case sensitive?
user.name.caseSensitive=false

View File

@@ -0,0 +1,153 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- Rules Service -->
<bean id="ruleService" class="org.alfresco.repo.rule.RuleServiceImpl">
<property name="nodeService">
<ref bean="NodeService"/>
</property>
<property name="runtimeNodeService">
<ref bean="nodeService"/>
</property>
<property name="actionService">
<ref bean="ActionService"/>
</property>
<property name="runtimeActionService">
<ref bean="actionService"/>
</property>
<property name="searchService">
<ref bean="SearchService"/>
</property>
<property name="dictionaryService">
<ref bean="dictionaryService"/>
</property>
</bean>
<!-- Rules Aspect -->
<bean id="rulesAspect" class="org.alfresco.repo.rule.RulesAspect" init-method="init">
<property name="nodeService">
<ref bean="nodeService"/>
</property>
<property name="policyComponent">
<ref bean="policyComponent"/>
</property>
<property name="ruleService">
<ref bean="ruleService"/>
</property>
</bean>
<!-- I18N -->
<bean id="ruleResourceBundles" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>
<value>alfresco.messages.rule-config</value>
</list>
</property>
</bean>
<!-- Rule types -->
<bean id="rule-type-base" init-method="init">
<property name="ruleService">
<ref bean="ruleService"/>
</property>
<property name="actionService">
<ref bean="actionService"/>
</property>
</bean>
<bean id="inbound" class="org.alfresco.repo.rule.RuleTypeImpl" parent="rule-type-base">
<constructor-arg>
<list>
<ref bean="on-create-node-trigger"/>
<ref bean="on-create-child-association-trigger"/>
<ref bean="on-content-update-trigger"/>
</list>
</constructor-arg>
</bean>
<bean id="outbound" class="org.alfresco.repo.rule.RuleTypeImpl" parent="rule-type-base">
<constructor-arg>
<list>
<ref bean="on-delete-child-association-trigger"/>
</list>
</constructor-arg>
</bean>
<!-- Rule triggers -->
<bean id="rule-trigger-base" init-method="registerRuleTrigger">
<property name="policyComponent">
<ref bean="policyComponent"/>
</property>
<property name="nodeService">
<ref bean="nodeService"/>
</property>
<property name="authenticationComponent">
<ref bean="authenticationComponent"/>
</property>
</bean>
<bean id="on-create-node-trigger" class="org.alfresco.repo.rule.ruletrigger.CreateNodeRuleTrigger" parent="rule-trigger-base">
<property name="dictionaryService">
<ref bean="dictionaryService"/>
</property>
<property name="policyName">
<value>onCreateNode</value>
</property>
<property name="isClassBehaviour">
<value>true</value>
</property>
</bean>
<bean id="on-update-node-trigger" class="org.alfresco.repo.rule.ruletrigger.SingleNodeRefPolicyRuleTrigger" parent="rule-trigger-base">
<property name="policyName">
<value>onUpdateNode</value>
</property>
</bean>
<bean id="on-delete-node-trigger" class="org.alfresco.repo.rule.ruletrigger.SingleChildAssocRefPolicyRuleTrigger" parent="rule-trigger-base">
<property name="policyName">
<value>onDeleteNode</value>
</property>
<property name="isClassBehaviour">
<value>true</value>
</property>
</bean>
<bean id="on-create-child-association-trigger" class="org.alfresco.repo.rule.ruletrigger.SingleChildAssocRefPolicyRuleTrigger" parent="rule-trigger-base">
<property name="policyName">
<value>onCreateChildAssociation</value>
</property>
</bean>
<bean id="on-delete-child-association-trigger" class="org.alfresco.repo.rule.ruletrigger.SingleChildAssocRefPolicyRuleTrigger" parent="rule-trigger-base">
<property name="policyName">
<value>onDeleteChildAssociation</value>
</property>
</bean>
<bean id="on-create-association-trigger" class="org.alfresco.repo.rule.ruletrigger.SingleAssocRefPolicyRuleTrigger" parent="rule-trigger-base">
<property name="policyName">
<value>onCreateAssociation</value>
</property>
</bean>
<bean id="on-delete-association-trigger" class="org.alfresco.repo.rule.ruletrigger.SingleAssocRefPolicyRuleTrigger" parent="rule-trigger-base">
<property name="policyName">
<value>onDeleteAssociation</value>
</property>
</bean>
<bean id="on-content-update-trigger" class="org.alfresco.repo.rule.ruletrigger.SingleNodeRefPolicyRuleTrigger" parent="rule-trigger-base">
<property name="policyName">
<value>onContentUpdate</value>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,150 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- -->
<!-- Scheduled jobs -->
<!-- -->
<bean id="ftsIndexerTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail">
<bean id="ftsIndexerJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass">
<value>org.alfresco.repo.search.impl.lucene.fts.FTSIndexerJob</value>
</property>
<property name="jobDataAsMap">
<map>
<entry key="bean">
<ref bean="LuceneFullTextSearchIndexer" />
</entry>
</map>
</property>
</bean>
</property>
<property name="startDelay">
<value>10000</value>
</property>
<property name="repeatInterval">
<value>10000</value>
</property>
</bean>
<bean id="tempFileCleanerTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail">
<bean id="tempFileCleanerJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass">
<value>org.alfresco.util.TempFileProvider$TempFileCleanerJob</value>
</property>
<property name="jobDataAsMap">
<map>
<entry key="protectHours">
<value>1</value>
</entry>
</map>
</property>
</bean>
</property>
<property name="startDelay">
<value>1800000</value><!-- start after half an hour -->
</property>
<property name="repeatInterval">
<value>3600000</value><!-- repeat every hour -->
</property>
</bean>
<bean id="fileContentStoreCleanerTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail">
<bean id="fileContentStoreCleanerJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass">
<value>org.alfresco.repo.content.ContentStoreCleanupJob</value>
</property>
<property name="jobDataAsMap">
<map>
<entry key="contentStore">
<ref bean="fileContentStore" />
</entry>
<entry key="searcher">
<ref bean="searchService" />
</entry>
<entry key="protectHours">
<value>24</value>
</entry>
</map>
</property>
</bean>
</property>
<property name="startDelay">
<value>600000</value><!-- start after 10 minutes -->
</property>
<property name="repeatInterval">
<value>3600000</value><!-- repeat every hour -->
</property>
</bean>
<bean id="indexRecoveryTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<property name="jobDetail">
<bean id="IndexRecoveryJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass">
<value>org.alfresco.repo.node.index.IndexRecoveryJob</value>
</property>
<property name="jobDataAsMap">
<map>
<entry key="indexRecoveryComponent">
<ref bean="indexRecoveryComponent" />
</entry>
</map>
</property>
</bean>
</property>
<property name="startDelay">
<value>60000</value> <!-- start after 1 minute -->
</property>
<property name="repeatCount">
<value>0</value> <!-- DO NOT REPEAT !!!!! -->
</property>
</bean>
<bean id="indexBackupTrigger" class="org.alfresco.util.TriggerBean">
<property name="jobDetail">
<bean id="IndexBackupJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
<property name="jobClass">
<value>org.alfresco.repo.search.impl.lucene.LuceneIndexerAndSearcherFactory$LuceneIndexBackupJob</value>
</property>
<property name="jobDataAsMap">
<map>
<entry key="luceneIndexBackupComponent">
<ref bean="luceneIndexBackupComponent" />
</entry>
</map>
</property>
</bean>
</property>
<!-- trigger at 3am -->
<property name="hour">
<value>03</value>
</property>
<property name="minute">
<value>00</value>
</property>
<property name="repeatInterval">
<value>86400000</value> <!-- repeat daily -->
</property>
</bean>
<!-- Scheduled tasks -->
<bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="tempFileCleanerTrigger" />
<!-- <ref local="fileContentStoreCleanerTrigger"/> -->
<ref local="ftsIndexerTrigger" />
<ref local="indexRecoveryTrigger" />
<ref local="indexBackupTrigger" />
</list>
</property>
<property name="waitForJobsToCompleteOnShutdown">
<value>true</value>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,32 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<bean id="templateService" class="org.alfresco.repo.template.TemplateServiceImpl">
<!-- A Map of named template engines to class implementations/Spring bean IDs -->
<!-- The key of each property is the name of the engine - this is the name that is passed in -->
<!-- to the TemplateService by the caller. The value is either a fully qualified class name for -->
<!-- the object to create, or the Spring bean ID if the object requires Spring service injection. -->
<property name="templateEngines">
<map>
<entry key="freemarker">
<value>freeMarkerProcessor</value>
</entry>
</map>
</property>
<property name="defaultTemplateEngine">
<value>freemarker</value>
</property>
</bean>
<!-- This engine requires Spring config setup to use Repository services -->
<!-- The beans are not thread safe and therefore we create one per request -->
<bean id="freeMarkerProcessor" class="org.alfresco.repo.template.FreeMarkerProcessor" singleton="false">
<property name="nodeService">
<ref bean="NodeService"/>
</property>
<property name="contentService">
<ref bean="ContentService"/>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,20 @@
<#-- Table of the images found in a folder under Company Home called "Company Logos" -->
<#-- Shows each image found as inline content -->
<table>
<#list companyhome.children as child>
<#if child.isContainer && child.name = "Company Logos">
<#list child.children as image>
<#switch image.mimetype>
<#case "image/jpeg">
<#case "image/gif">
<#case "image/png">
<tr>
<td><img src="/alfresco${image.url}"></td>
</tr>
<#break>
<#default>
</#switch>
</#list>
</#if>
</#list>
</table>

View File

@@ -0,0 +1,17 @@
<#-- Shows some general info about the current document, including NodeRef and aspects applied -->
<h3>=====Template Start=====</h3>
<h4>Current Document Info:</h4>
<b>Name:</b> ${document.name}<br>
<b>Ref:</b> ${document.nodeRef}<br>
<b>Type:</b> ${document.type}<br>
<b>Content URL:</b> <a href="/alfresco${document.url}">/alfresco${document.url}</a><br>
<b>Locked:</b> <#if document.isLocked>Yes<#else>No</#if><br>
<b>Aspects:</b>
<table>
<#list document.aspects as aspect>
<tr><td>${aspect}</td></tr>
</#list>
</table>
<h3>=====Template End=====</h3>

View File

@@ -0,0 +1,47 @@
<h3>=====Example Template Start=====</h3>
<b>Company Home Space:</b> ${companyhome.properties.name}
<br>
<b>My Home Space:</b> ${userhome.properties.name}
<br>
<b>Company Home children count:</b> ${companyhome.children?size}
<br>
<b>Company Home first child node name:</b> ${companyhome.children[0].properties.name}
<br>
<b>Current Document Name:</b> ${document.name}
<br>
<b>Current Space Name:</b> ${space.name}
<h4>List of child spaces in my Home Space:</h4>
<table>
<#list userhome.children as child>
<#if child.isContainer>
<tr>
<td><img src="/alfresco${child.icon32}"></td>
<td><b>${child.properties.name}</b> (${child.children?size})</td>
<td><b>Path:</b> ${child.displayPath}</td>
</tr>
</#if>
</#list>
</table>
<h4>List of docs in my Home Space (text only content shown inline, JPG images shown as thumbnails):</h4>
<table>
<#list userhome.children as child>
<#if child.isDocument>
<tr><td><img src="/alfresco${child.icon16}"></td><td><a href="/alfresco${child.url}">${child.properties.name}</a></td></tr>
<#if child.mimetype = "text/plain">
<tr><td></td><td>${child.content}</td></tr>
<#elseif child.mimetype = "image/jpeg">
<tr><td></td><td><img width=100 height=65 src="/alfresco${child.url}"></td></tr>
</#if>
</#if>
</#list>
</table>
<h4>Assoc example:</h4>
<#if userhome.children[0].assocs["cm:contains"]?exists>
${userhome.children[0].assocs["cm:contains"][0].name}
</#if>
<h3>=====Example Template End=====</h3>

View File

@@ -0,0 +1,10 @@
<#-- Shows if a document is localizable and the locale if set -->
<b>Localisable:</b>
<#if hasAspect(document, "cm:localizable") = 1>
Yes<br>
<#if document.properties.locale?exists>
Locale: ${document.properties.locale.properties.name}
</#if>
<#else>
No<br>
</#if>

View File

@@ -0,0 +1,20 @@
<#-- Table of the documents in my Home Space -->
<#-- Shows the Icon and link to the content for the doc, also the size in KB and lock status -->
<table>
<tr>
<td></td>
<td><b>Name</b></td>
<td><b>Size</b></td>
<td><b>Locked</b></td>
</tr>
<#list userhome.children as child>
<#if child.isDocument>
<tr>
<td><a href="/alfresco${child.url}" target="new"><img src="/alfresco${child.icon16}" border=0></a></td>
<td><a href="/alfresco${child.url}" target="new">${child.properties.name}</a></td>
<td>${(child.size / 1000)?string("0.##")} KB</td>
<td>&nbsp;<#if child.isLocked>Yes</#if></td>
</tr>
</#if>
</#list>
</table>

View File

@@ -0,0 +1,22 @@
<#-- Displays a table of all the documents from a "Press Releases" folder under Company Home -->
<#-- Obviously this folder needs to exist and the docs in it should have the title and description fields set -->
<table>
<#list companyhome.children as child>
<#if child.isContainer && child.name = "Press Releases">
<#list child.children as doc>
<#if doc.isDocument>
<tr>
<td><h3>${doc.properties.title}</h3></td>
</tr>
<tr>
<td style="padding-left:4px"><b>${doc.properties.description}</b></td>
</tr>
<tr>
<td style="padding-left:8px"><small>${doc.content}</small></td>
</tr>
<tr><td><div style="padding:6px"></div></td></tr>
</#if>
</#list>
</#if>
</#list>
</table>

View File

@@ -0,0 +1,15 @@
<#-- Table of the Spaces in my Home Folder -->
<#-- Shows the large 32x32 pixel icon, and generates an external access servlet URL to the space -->
<table>
<#list userhome.children as child>
<#if child.isContainer>
<tr>
<td><img src="/alfresco${child.icon32}"></td>
<#assign ref=child.nodeRef>
<#assign workspace=ref[0..ref?index_of("://")-1]>
<#assign storenode=ref[ref?index_of("://")+3..]>
<td><a href="/alfresco/navigate/showSpaceDetails/${workspace}/${storenode}"><b>${child.properties.name}</b></a> (${child.children?size})</td>
</tr>
</#if>
</#list>
</table>

View File

@@ -0,0 +1,8 @@
<#-- Table of some summary details about the current user -->
<table>
<tr><td><b>Name:</b></td> <td>${person.properties.firstName} ${person.properties.lastName}</td></tr>
<tr><td><b>User:</b></td> <td>${person.properties.userName}</td></tr>
<tr><td><b>Home Space location:</b></td> <td>${userhome.displayPath}/${userhome.name}</td></tr>
<tr><td><b>Items in Home Space:</b></td> <td>${userhome.children?size}</td></tr>
<tr><td><b>Items in Company Space:</b></td> <td>${companyhome.children?size}</td></tr>
</table>

View File

@@ -0,0 +1,12 @@
<#-- Shows the translations applied to a doc through the translatable aspect -->
<b>Translatable:</b>
<#if hasAspect(document, "cm:translatable") = 1>
Yes<br>
<table>
<#list document.assocs["cm:translations"] as t>
<tr><td>${t.content}</td></tr>
</#list>
</table>
<#else>
No<br>
</#if>

View File

@@ -0,0 +1,15 @@
<#-- List of docs in the Home Space for current user -->
<#-- If the doc mimetype is plain/text then the content is shown inline -->
<#-- If the doc mimetype is JPEG then the image is shown inline as a small thumbnail image -->
<table>
<#list userhome.children as child>
<#if child.isDocument>
<tr><td>${child.properties.name}</td></tr>
<#if child.mimetype = "text/plain">
<tr><td style='padding-left:16px'>${child.content}</td></tr>
<#elseif child.mimetype = "image/jpeg">
<tr><td style='padding-left:16px'><img width=100 height=65 src="/alfresco${child.url}"><td></tr>
</#if>
</#if>
</#list>
</table>

View File

@@ -0,0 +1,213 @@
<?xml version="1.0" encoding="UTF-8"?>
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0">
<cm:content xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:my="my.new.model" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:custom="custom.model" xmlns="" view:childName="cm:company_logos.ftl">
<view:aspects>
<cm:auditable></cm:auditable>
<sys:referenceable></sys:referenceable>
<app:uifacets></app:uifacets>
</view:aspects>
<view:properties>
<cm:modifier>admin</cm:modifier>
<cm:modified>2005-10-21T15:11:00.103+01:00</cm:modified>
<cm:description>company_logos.ftl</cm:description>
<sys:node-uuid>8138e003-423c-11da-be9d-bb84ac6911f1</sys:node-uuid>
<cm:creator>admin</cm:creator>
<sys:store-protocol>workspace</sys:store-protocol>
<cm:content>contentUrl=classpath:alfresco/templates/content/examples/company_logos.ftl|mimetype=text/plain|size=690|encoding=UTF-8</cm:content>
<cm:title>company_logos.ftl</cm:title>
<cm:name>company_logos.ftl</cm:name>
<sys:store-identifier>SpacesStore</sys:store-identifier>
<cm:created>2005-10-21T15:10:59.509+01:00</cm:created>
</view:properties>
<view:associations></view:associations>
</cm:content>
<cm:content xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:my="my.new.model" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:custom="custom.model" xmlns="" view:childName="cm:doc_info.ftl">
<view:aspects>
<cm:auditable></cm:auditable>
<sys:referenceable></sys:referenceable>
<app:uifacets></app:uifacets>
</view:aspects>
<view:properties>
<cm:modifier>admin</cm:modifier>
<cm:modified>2005-10-21T15:11:00.900+01:00</cm:modified>
<cm:description>doc_info.ftl</cm:description>
<sys:node-uuid>81d1768e-423c-11da-be9d-bb84ac6911f1</sys:node-uuid>
<cm:creator>admin</cm:creator>
<sys:store-protocol>workspace</sys:store-protocol>
<cm:content>contentUrl=classpath:alfresco/templates/content/examples/doc_info.ftl|mimetype=text/plain|size=577|encoding=UTF-8</cm:content>
<cm:title>doc_info.ftl</cm:title>
<cm:name>doc_info.ftl</cm:name>
<sys:store-identifier>SpacesStore</sys:store-identifier>
<cm:created>2005-10-21T15:11:00.446+01:00</cm:created>
</view:properties>
<view:associations></view:associations>
</cm:content>
<cm:content xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:my="my.new.model" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:custom="custom.model" xmlns="" view:childName="cm:example.ftl">
<view:aspects>
<cm:auditable></cm:auditable>
<sys:referenceable></sys:referenceable>
<app:uifacets></app:uifacets>
</view:aspects>
<view:properties>
<cm:modifier>admin</cm:modifier>
<cm:modified>2005-10-21T15:11:01.759+01:00</cm:modified>
<cm:description>example.ftl</cm:description>
<sys:node-uuid>8243e77b-423c-11da-be9d-bb84ac6911f1</sys:node-uuid>
<cm:creator>admin</cm:creator>
<sys:store-protocol>workspace</sys:store-protocol>
<cm:content>contentUrl=classpath:alfresco/templates/content/examples/example.ftl|mimetype=text/plain|size=1577|encoding=UTF-8</cm:content>
<cm:title>example.ftl</cm:title>
<cm:name>example.ftl</cm:name>
<sys:store-identifier>SpacesStore</sys:store-identifier>
<cm:created>2005-10-21T15:11:01.196+01:00</cm:created>
</view:properties>
<view:associations></view:associations>
</cm:content>
<cm:content xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:my="my.new.model" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:custom="custom.model" xmlns="" view:childName="cm:localizable.ftl">
<view:aspects>
<cm:auditable></cm:auditable>
<sys:referenceable></sys:referenceable>
<app:uifacets></app:uifacets>
</view:aspects>
<view:properties>
<cm:modifier>admin</cm:modifier>
<cm:modified>2005-10-21T15:11:02.743+01:00</cm:modified>
<cm:description>localizable.ftl</cm:description>
<sys:node-uuid>82d7c318-423c-11da-be9d-bb84ac6911f1</sys:node-uuid>
<cm:creator>admin</cm:creator>
<sys:store-protocol>workspace</sys:store-protocol>
<cm:content>contentUrl=classpath:alfresco/templates/content/examples/localizable.ftl|mimetype=text/plain|size=293|encoding=UTF-8</cm:content>
<cm:title>localizable.ftl</cm:title>
<cm:name>localizable.ftl</cm:name>
<sys:store-identifier>SpacesStore</sys:store-identifier>
<cm:created>2005-10-21T15:11:02.181+01:00</cm:created>
</view:properties>
<view:associations></view:associations>
</cm:content>
<cm:content xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:my="my.new.model" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:custom="custom.model" xmlns="" view:childName="cm:my_docs.ftl">
<view:aspects>
<cm:auditable></cm:auditable>
<sys:referenceable></sys:referenceable>
<app:uifacets></app:uifacets>
</view:aspects>
<view:properties>
<cm:modifier>admin</cm:modifier>
<cm:modified>2005-10-21T15:11:03.587+01:00</cm:modified>
<cm:description>my_docs.ftl</cm:description>
<sys:node-uuid>83692db5-423c-11da-be9d-bb84ac6911f1</sys:node-uuid>
<cm:creator>admin</cm:creator>
<sys:store-protocol>workspace</sys:store-protocol>
<cm:content>contentUrl=classpath:alfresco/templates/content/examples/my_docs.ftl|mimetype=text/plain|size=750|encoding=UTF-8</cm:content>
<cm:title>my_docs.ftl</cm:title>
<cm:name>my_docs.ftl</cm:name>
<sys:store-identifier>SpacesStore</sys:store-identifier>
<cm:created>2005-10-21T15:11:03.118+01:00</cm:created>
</view:properties>
<view:associations></view:associations>
</cm:content>
<cm:content xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:my="my.new.model" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:custom="custom.model" xmlns="" view:childName="cm:my_pressreleases.ftl">
<view:aspects>
<cm:auditable></cm:auditable>
<sys:referenceable></sys:referenceable>
<app:uifacets></app:uifacets>
</view:aspects>
<view:properties>
<cm:modifier>admin</cm:modifier>
<cm:modified>2005-10-21T15:11:04.337+01:00</cm:modified>
<cm:description>my_pressreleases.ftl</cm:description>
<sys:node-uuid>83db9ea2-423c-11da-be9d-bb84ac6911f1</sys:node-uuid>
<cm:creator>admin</cm:creator>
<sys:store-protocol>workspace</sys:store-protocol>
<cm:content>contentUrl=classpath:alfresco/templates/content/examples/my_pressreleases.ftl|mimetype=text/plain|size=910|encoding=UTF-8</cm:content>
<cm:title>my_pressreleases.ftl</cm:title>
<cm:name>my_pressreleases.ftl</cm:name>
<sys:store-identifier>SpacesStore</sys:store-identifier>
<cm:created>2005-10-21T15:11:03.868+01:00</cm:created>
</view:properties>
<view:associations></view:associations>
</cm:content>
<cm:content xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:my="my.new.model" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:custom="custom.model" xmlns="" view:childName="cm:my_spaces.ftl">
<view:aspects>
<cm:auditable></cm:auditable>
<sys:referenceable></sys:referenceable>
<app:uifacets></app:uifacets>
</view:aspects>
<view:properties>
<cm:modifier>admin</cm:modifier>
<cm:modified>2005-10-21T15:11:05.150+01:00</cm:modified>
<cm:description>my_spaces.ftl</cm:description>
<sys:node-uuid>84553b7f-423c-11da-be9d-bb84ac6911f1</sys:node-uuid>
<cm:creator>admin</cm:creator>
<sys:store-protocol>workspace</sys:store-protocol>
<cm:content>contentUrl=classpath:alfresco/templates/content/examples/my_spaces.ftl|mimetype=text/plain|size=682|encoding=UTF-8</cm:content>
<cm:title>my_spaces.ftl</cm:title>
<cm:name>my_spaces.ftl</cm:name>
<sys:store-identifier>SpacesStore</sys:store-identifier>
<cm:created>2005-10-21T15:11:04.665+01:00</cm:created>
</view:properties>
<view:associations></view:associations>
</cm:content>
<cm:content xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:my="my.new.model" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:custom="custom.model" xmlns="" view:childName="cm:my_summary.ftl">
<view:aspects>
<cm:auditable></cm:auditable>
<sys:referenceable></sys:referenceable>
<app:uifacets></app:uifacets>
</view:aspects>
<view:properties>
<cm:modifier>admin</cm:modifier>
<cm:modified>2005-10-21T15:11:05.994+01:00</cm:modified>
<cm:description>my_summary.ftl</cm:description>
<sys:node-uuid>84d3934c-423c-11da-be9d-bb84ac6911f1</sys:node-uuid>
<cm:creator>admin</cm:creator>
<sys:store-protocol>workspace</sys:store-protocol>
<cm:content>contentUrl=classpath:alfresco/templates/content/examples/my_summary.ftl|mimetype=text/plain|size=537|encoding=UTF-8</cm:content>
<cm:title>my_summary.ftl</cm:title>
<cm:name>my_summary.ftl</cm:name>
<sys:store-identifier>SpacesStore</sys:store-identifier>
<cm:created>2005-10-21T15:11:05.509+01:00</cm:created>
</view:properties>
<view:associations></view:associations>
</cm:content>
<cm:content xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:my="my.new.model" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:custom="custom.model" xmlns="" view:childName="cm:translatable.ftl">
<view:aspects>
<cm:auditable></cm:auditable>
<sys:referenceable></sys:referenceable>
<app:uifacets></app:uifacets>
</view:aspects>
<view:properties>
<cm:modifier>admin</cm:modifier>
<cm:modified>2005-10-21T15:11:06.759+01:00</cm:modified>
<cm:description>translatable.ftl</cm:description>
<sys:node-uuid>854f7a19-423c-11da-be9d-bb84ac6911f1</sys:node-uuid>
<cm:creator>admin</cm:creator>
<sys:store-protocol>workspace</sys:store-protocol>
<cm:content>contentUrl=classpath:alfresco/templates/content/examples/translatable.ftl|mimetype=text/plain|size=322|encoding=UTF-8</cm:content>
<cm:title>translatable.ftl</cm:title>
<cm:name>translatable.ftl</cm:name>
<sys:store-identifier>SpacesStore</sys:store-identifier>
<cm:created>2005-10-21T15:11:06.306+01:00</cm:created>
</view:properties>
<view:associations></view:associations>
</cm:content>
<cm:content xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:my="my.new.model" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:custom="custom.model" xmlns="" view:childName="cm:userhome_docs.ftl">
<view:aspects>
<cm:auditable></cm:auditable>
<sys:referenceable></sys:referenceable>
<app:uifacets></app:uifacets>
</view:aspects>
<view:properties>
<cm:modifier>admin</cm:modifier>
<cm:modified>2005-10-21T15:11:07.525+01:00</cm:modified>
<cm:description>userhome_docs.ftl</cm:description>
<sys:node-uuid>85c45b07-423c-11da-be9d-bb84ac6911f1</sys:node-uuid>
<cm:creator>admin</cm:creator>
<sys:store-protocol>workspace</sys:store-protocol>
<cm:content>contentUrl=classpath:alfresco/templates/content/examples/userhome_docs.ftl|mimetype=text/plain|size=652|encoding=UTF-8</cm:content>
<cm:title>userhome_docs.ftl</cm:title>
<cm:name>userhome_docs.ftl</cm:name>
<sys:store-identifier>SpacesStore</sys:store-identifier>
<cm:created>2005-10-21T15:11:07.072+01:00</cm:created>
</view:properties>
<view:associations></view:associations>
</cm:content>
</view:view>

View File

@@ -0,0 +1,69 @@
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0"
xmlns:cm="http://www.alfresco.org/model/content/1.0"
xmlns:app="http://www.alfresco.org/model/application/1.0">
<cm:folder>
<app:uifacets/>
<cm:name>${templates.space.project}</cm:name>
<app:icon>space-icon-default</app:icon>
<cm:contains>
<cm:folder>
<app:uifacets/>
<cm:name>${templates.space.documentation}</cm:name>
<app:icon>space-icon-default</app:icon>
<cm:contains>
<cm:folder>
<app:uifacets/>
<cm:name>${templates.space.drafts}</cm:name>
<app:icon>space-icon-default</app:icon>
</cm:folder>
<cm:folder>
<app:uifacets/>
<cm:name>${templates.space.pending_approval}</cm:name>
<app:icon>space-icon-default</app:icon>
</cm:folder>
<cm:folder>
<app:uifacets/>
<cm:name>${templates.space.published}</cm:name>
<app:icon>space-icon-default</app:icon>
</cm:folder>
<cm:folder>
<app:uifacets/>
<cm:name>${templates.space.samples}</cm:name>
<app:icon>space-icon-doc</app:icon>
<cm:contains>
<cm:content>
<app:uifacets/>
<cm:title>${templates.document.system_overview.title}</cm:title>
<cm:name>${templates.document.system_overview.name}</cm:name>
<cm:description>${templates.document.system_overview.name}</cm:description>
<cm:content>contentUrl=classpath:alfresco/templates/${templates.document.system_overview.name}|mimetype=text/html|size=|encoding=</cm:content>
</cm:content>
</cm:contains>
</cm:folder>
</cm:contains>
</cm:folder>
<cm:folder>
<app:uifacets/>
<cm:name>${templates.space.discussions}</cm:name>
<app:icon>space-icon-default</app:icon>
</cm:folder>
<cm:folder>
<app:uifacets/>
<cm:name>${templates.space.ui_design}</cm:name>
<app:icon>space-icon-default</app:icon>
</cm:folder>
<cm:folder>
<app:uifacets/>
<cm:name>${templates.space.presentations}</cm:name>
<app:icon>space-icon-default</app:icon>
</cm:folder>
<cm:folder>
<app:uifacets/>
<cm:name>${templates.space.quality_assurance}</cm:name>
<app:icon>space-icon-default</app:icon>
</cm:folder>
</cm:contains>
</cm:folder>
</view:view>

View File

@@ -0,0 +1,18 @@
<html>
<head>
<title>System Overview</title>
</head>
<body>
<h1>System Overview</h1>
<h2>Purpose</h2>
In this section, give a brief summary of the purpose of the proposed system,
including the target users and organisations.
<h2>Aims and Objectives</h2>
In this section, give a brief summary of the reasons for developing the
proposed system.
<h2>Prerequisites</h2>
In this section give any prerequisites for the proposed system.
<h2>Total Expected Effort</h2>
In this section give a rough estimate in months of effort required.

View File

@@ -0,0 +1,14 @@
#
# Community network version information
#
# Version label
version.major=1
version.minor=2
version.revision=0
version.label=dev
# Edition label
version.edition=Open Source

161
config/ehcache.xml Normal file
View File

@@ -0,0 +1,161 @@
<ehcache>
<diskStore
path="java.io.tmpdir"/>
<defaultCache
maxElementsInMemory="5000"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
/>
<!-- Nodes: Most other objects are cached as a ratio against the number of nodes cached -->
<cache
name="org.alfresco.repo.domain.hibernate.NodeImpl"
maxElementsInMemory="100000"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
/>
<!-- 1:1 node:node status -->
<cache
name="org.alfresco.repo.domain.hibernate.NodeStatusImpl"
maxElementsInMemory="100000"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
/>
<!-- 1:5 node:aspects -->
<cache
name="org.alfresco.repo.domain.hibernate.NodeImpl.aspects"
maxElementsInMemory="500000"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
/>
<!-- 1:10 node:properties -->
<cache
name="org.alfresco.repo.domain.hibernate.NodeImpl.properties"
maxElementsInMemory="1000000"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
/>
<!-- 1:1 node:child assocs set -->
<cache
name="org.alfresco.repo.domain.hibernate.NodeImpl.childAssocs"
maxElementsInMemory="100000"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
/>
<!-- 1:1 node:parent assocs set -->
<cache
name="org.alfresco.repo.domain.hibernate.NodeImpl.parentAssocs"
maxElementsInMemory="100000"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
/>
<!-- 1:5 node:child assocs -->
<cache
name="org.alfresco.repo.domain.hibernate.ChildAssocImpl"
maxElementsInMemory="100000"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
/>
<!-- 1:1 node:source node assocs set -->
<cache
name="org.alfresco.repo.domain.hibernate.NodeImpl.sourceNodeAssocs"
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
/>
<!-- 1:1 node:target node assocs set -->
<cache
name="org.alfresco.repo.domain.hibernate.NodeImpl.targetNodeAssocs"
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
/>
<!-- general use node associations are not common -->
<cache
name="org.alfresco.repo.domain.hibernate.NodeAssocImpl"
maxElementsInMemory="10000"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
/>
<!-- low numbers of objects expected -->
<cache
name="org.alfresco.repo.domain.hibernate.StoreImpl"
maxElementsInMemory="100"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
/>
<!-- version counters -->
<cache
name="org.alfresco.repo.domain.hibernate.VersionCountImpl"
maxElementsInMemory="100"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
/>
<cache
name="org.hibernate.cache.StandardQueryCache"
maxElementsInMemory="50"
eternal="false"
timeToLiveSeconds="0"
overflowToDisk="false"/>
<cache
name="org.hibernate.cache.UpdateTimestampsCache"
maxElementsInMemory="5000"
eternal="true"
overflowToDisk="false"/>
<!-- Permission related caches -->
<cache
name="org.alfresco.repo.security.permissions.impl.hibernate.RecipientImpl"
maxElementsInMemory="5000"
eternal="true"
overflowToDisk="false"/>
<cache
name="org.alfresco.repo.security.permissions.impl.hibernate.PermissionReferenceImpl"
maxElementsInMemory="5000"
eternal="true"
overflowToDisk="false"/>
<cache
name="org.alfresco.repo.security.permissions.impl.hibernate.PermissionEntryImpl"
maxElementsInMemory="5000"
eternal="true"
overflowToDisk="false"/>
<cache
name="org.alfresco.repo.security.permissions.impl.hibernate.NodePermissionEntryImpl"
maxElementsInMemory="5000"
eternal="true"
overflowToDisk="false"/>
<cache
name="org.alfresco.repo.security.permissions.impl.hibernate.NodePermissionEntryImpl.permissionEntries"
maxElementsInMemory="5000"
eternal="true"
overflowToDisk="false"/>
<cache
name="org.alfresco.repo.security.permissions.impl.hibernate.RecipientImpl.externalKeys"
maxElementsInMemory="5000"
eternal="true"
overflowToDisk="false"/>
</ehcache>

90
config/treecache.xml Normal file
View File

@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<server>
<!-- ==================================================================== -->
<!-- Defines TreeCache configuration -->
<!-- ==================================================================== -->
<mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=hibernateTreeCache">
<!--
Node locking level : SERIALIZABLE
REPEATABLE_READ (default)
READ_COMMITTED
READ_UNCOMMITTED
NONE
-->
<attribute name="IsolationLevel">READ_COMMITTED</attribute>
<!--
Valid modes are LOCAL
REPL_ASYNC
REPL_SYNC
-->
<attribute name="CacheMode">REPL_SYNC</attribute>
<!-- Name of cluster. Needs to be the same for all clusters, in order
to find each other
-->
<attribute name="ClusterName">Alfresco-Hibernate-Cluster</attribute>
<!-- JGroups protocol stack properties. Can also be a URL,
e.g. file:/home/bela/default.xml
<attribute name="ClusterProperties"></attribute>
-->
<attribute name="ClusterConfig">
<config>
<!-- UDP: if you have a multihomed machine,
set the bind_addr attribute to the appropriate NIC IP address -->
<!-- UDP: On Windows machines, because of the media sense feature
being broken with multicast (even after disabling media sense)
set the loopback attribute to true -->
<UDP mcast_addr="228.1.2.5" mcast_port="45577"
ip_ttl="64" ip_mcast="true"
mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
loopback="false"/>
<PING timeout="2000" num_initial_members="3"
up_thread="false" down_thread="false"/>
<MERGE2 min_interval="10000" max_interval="20000"/>
<FD shun="true" up_thread="true" down_thread="true"/>#
<VERIFY_SUSPECT timeout="1500"
up_thread="false" down_thread="false"/>
<pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
up_thread="false" down_thread="false"/>
<pbcast.STABLE desired_avg_gossip="20000"
up_thread="false" down_thread="false"/>
<UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"
down_thread="false"/>
<FRAG frag_size="8192"
down_thread="false" up_thread="false"/>
<pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
shun="true" print_local_addr="true"/>
<pbcast.STATE_TRANSFER up_thread="false" down_thread="false"/>
</config>
</attribute>
<!--
The max amount of time (in milliseconds) we wait until the
initial state (ie. the contents of the cache) are retrieved from
existing members in a clustered environment
-->
<attribute name="InitialStateRetrievalTimeout">20000</attribute>
<!--
Number of milliseconds to wait until all responses for a
synchronous call have been received.
-->
<attribute name="SyncReplTimeout">10000</attribute>
<!-- Max number of milliseconds to wait for a lock acquisition -->
<attribute name="LockAcquisitionTimeout">15000</attribute>
<!-- Name of the eviction policy class. Not supported now. -->
<attribute name="EvictionPolicyClass"></attribute>
</mbean>
</server>

27
project-build.xml Normal file
View File

@@ -0,0 +1,27 @@
<project name="repository" default="build">
<path id="path.common" path="${basedir}/../../common"/>
<property name="dir.common" refid="path.common"/>
<import file="${dir.common}/common.xml"/>
<target name="compile-java" depends="common.compile-java">
<antcall target="compile-jibx" />
</target>
<target name="compile-jibx" depends="init">
<bind verbose="false" load="true" binding="${file.jibx.binding}">
<classpathset dir="${dir.classes}"/>
</bind>
</target>
<target name="compile-javadocs" depends="common.compile-javadocs" description="Creates the JavaDocs for the project">
<mkdir dir="${dir.javadoc.api.service}" />
<javadoc sourcepath="${dir.src.java}" destdir="${dir.javadoc.api.service}"
packagenames="org.alfresco.service.*" excludepackagenames=""
author="true" version="true" doctitle="Alfresco Content Management Service API Specification"
windowtitle="Alfresco Content Management Service API" classpathref="classpath.compile">
<bottom>${javadoc.copyright}</bottom>
</javadoc>
</target>
</project>

View File

@@ -0,0 +1,2 @@
javadoc.title.window=Alfresco Repository
javadoc.title.document=Alfresco Repository Specification

2
project.properties Normal file
View File

@@ -0,0 +1,2 @@
file.jibx.binding=${dir.src.java}/org/alfresco/repo/dictionary/m2binding.xml
dir.javadoc.api.service=${dir.docs}/java-public-service-api

View File

@@ -0,0 +1,161 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.example;
import java.io.File;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.transaction.TransactionUtil;
import org.alfresco.repo.transaction.TransactionUtil.TransactionWork;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.util.ApplicationContextHelper;
import org.alfresco.util.GUID;
import org.alfresco.util.TempFileProvider;
import org.alfresco.util.debug.NodeStoreInspector;
import org.springframework.context.ApplicationContext;
/**
* A quick example of how to
* <ul>
* <li>get hold of the repository service</li>
* <li>initialise a model</li>
* <li>create nodes</li>
* <li>load in some content</li>
* </ul>
* <p>
* <i>
* All the normal checks for missing resources and so forth have been left out in the interests
* of clarity of demonstration.
* </i>
* <p>
* To change the model being used, make changes to the <b>dictionaryDAO</b> bean in the
* application contenxt XML file. For now, this example is written against the
* generic <code>alfresco/model/contentModel.xml</code>.
* <p>
* The content store location can also be set in the application context.
*
*
* @author Derek Hulley
*/
public class SimpleExampleWithContent
{
private static final String NAMESPACE = "http://www.alfresco.org/test/SimpleExampleWithContent";
public static void main(String[] args)
{
// initialise app content
ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
// get registry of services
final ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
// begin a UserTransaction
// All the services are set to create or propogate the transaction.
// This transaction will be recognised and propogated
// The TransactionUtil takes care of the catching and rollback, etc
TransactionService transactionService = serviceRegistry.getTransactionService();
TransactionWork<Object> exampleWork = new TransactionWork<Object>()
{
public Object doWork() throws Exception
{
doExample(serviceRegistry);
return null;
}
};
TransactionUtil.executeInUserTransaction(transactionService, exampleWork);
System.exit(0);
}
private static void doExample(ServiceRegistry serviceRegistry) throws Exception
{
// get individual, required services
NodeService nodeService = serviceRegistry.getNodeService();
ContentService contentService = serviceRegistry.getContentService();
// create a store, if one doesn't exist
StoreRef storeRef = new StoreRef(
StoreRef.PROTOCOL_WORKSPACE,
"SimpleExampleWithContent-" + GUID.generate());
if (!nodeService.exists(storeRef))
{
nodeService.createStore(storeRef.getProtocol(), storeRef.getIdentifier());
}
// get the root node from which to hang the next level of nodes
NodeRef rootNodeRef = nodeService.getRootNode(storeRef);
Map<QName, Serializable> nodeProperties = new HashMap<QName, Serializable>(7);
// add a simple folder to the root node
nodeProperties.clear();
nodeProperties.put(ContentModel.PROP_NAME, "My First Folder");
ChildAssociationRef assocRef = nodeService.createNode(
rootNodeRef,
ContentModel.ASSOC_CHILDREN,
QName.createQName(NAMESPACE, QName.createValidLocalName("My First Folder")),
ContentModel.TYPE_FOLDER,
nodeProperties);
NodeRef folderRef = assocRef.getChildRef();
// create a file
nodeProperties.clear();
nodeProperties.put(ContentModel.PROP_NAME, "My First File");
assocRef = nodeService.createNode(
folderRef,
ContentModel.ASSOC_CONTAINS,
QName.createQName(NAMESPACE, QName.createValidLocalName("My First File")),
ContentModel.TYPE_CONTENT,
nodeProperties);
NodeRef fileRef = assocRef.getChildRef();
ContentWriter writer = contentService.getWriter(fileRef, ContentModel.PROP_CONTENT, true);
// the mimetype will up pushed onto the node automatically once the stream closes
writer.setMimetype(MimetypeMap.MIMETYPE_TEXT_PLAIN);
// store string content as UTF-8
writer.setEncoding("UTF-8");
// write some content - this API allows streaming and direct loading,
// but for now we'll just upload a string
// The writer, being updating, will take care of updating the node once the stream
// closes.
String content = "The quick brown fox jumps over the lazy dog";
writer.putContent(content);
// dump the content to a file
File file = TempFileProvider.createTempFile("sample", ".txt");
ContentReader reader = contentService.getReader(fileRef, ContentModel.PROP_CONTENT);
reader.getContent(file);
// just to demonstrate the node structure, dump it to the file
String dump = NodeStoreInspector.dumpNodeStore(nodeService, storeRef);
System.out.println("Node Store: \n" + dump);
// and much, much more ...
}
}

View File

@@ -0,0 +1,240 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys;
import java.io.IOException;
import java.io.PrintStream;
import java.net.SocketException;
import java.util.Vector;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.filesys.netbios.server.NetBIOSNameServer;
import org.alfresco.filesys.server.NetworkServer;
import org.alfresco.filesys.server.config.ServerConfiguration;
import org.alfresco.filesys.smb.server.SMBServer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* CIFS Server Class
*
* <p>Create and start the various server components required to run the CIFS server.
*
* @author GKSpencer
*/
public class CIFSServer
{
private static final Log logger = LogFactory.getLog("org.alfresco.smb.server");
// Server configuration
private ServerConfiguration filesysConfig;
// List of CIFS server components
private Vector<NetworkServer> serverList = new Vector<NetworkServer>();
/**
* Class constructor
*
* @param serverConfig ServerConfiguration
*/
public CIFSServer(ServerConfiguration serverConfig)
{
this.filesysConfig = serverConfig;
}
/**
* Return the server configuration
*
* @return ServerConfiguration
*/
public final ServerConfiguration getConfiguration()
{
return filesysConfig;
}
/**
* @return Returns true if the server started up without any errors
*/
public boolean isStarted()
{
return (filesysConfig != null && filesysConfig.isSMBServerEnabled());
}
/**
* Start the CIFS server components
*
* @exception SocketException If a network error occurs
* @exception IOException If an I/O error occurs
*/
public final void startServer() throws SocketException, IOException
{
try
{
// Create the SMB server and NetBIOS name server, if enabled
if (filesysConfig.isSMBServerEnabled())
{
// Create the NetBIOS name server if NetBIOS SMB is enabled
if (filesysConfig.hasNetBIOSSMB())
serverList.add(new NetBIOSNameServer(filesysConfig));
// Create the SMB server
serverList.add(new SMBServer(filesysConfig));
// Add the servers to the configuration
for (NetworkServer server : serverList)
{
filesysConfig.addServer(server);
}
}
// Start the CIFS server(s)
for (NetworkServer server : serverList)
{
if (logger.isInfoEnabled())
logger.info("Starting server " + server.getProtocolName() + " ...");
// Start the server
String serverName = server.getConfiguration().getServerName();
server.startServer();
}
}
catch (Throwable e)
{
filesysConfig = null;
throw new AlfrescoRuntimeException("Failed to start CIFS Server", e);
}
// success
}
/**
* Stop the CIFS server components
*/
public final void stopServer()
{
if (filesysConfig == null)
{
// initialisation failed
return;
}
// Shutdown the CIFs server components
for ( NetworkServer server : serverList)
{
if (logger.isInfoEnabled())
logger.info("Shutting server " + server.getProtocolName() + " ...");
// Stop the server
server.shutdownServer(false);
// Remove the server from the global list
getConfiguration().removeServer(server.getProtocolName());
}
// Clear the server list and configuration
serverList.clear();
filesysConfig = null;
}
/**
* Runs the CIFS server directly
*
* @param args String[]
*/
public static void main(String[] args)
{
PrintStream out = System.out;
out.println("CIFS Server Test");
out.println("----------------");
try
{
// Create the configuration service in the same way that Spring creates it
ApplicationContext ctx = new ClassPathXmlApplicationContext("alfresco/application-context.xml");
// Get the CIFS server bean
CIFSServer server = (CIFSServer) ctx.getBean("cifsServer");
if (server == null)
{
throw new AlfrescoRuntimeException("Server bean 'cifsServer' not defined");
}
// Stop the FTP server, if running
server.getConfiguration().setFTPServerEnabled(false);
NetworkServer srv = server.getConfiguration().findServer("FTP");
if ( srv != null)
srv.shutdownServer(true);
// Only wait for shutdown if the SMB/CIFS server is enabled
if ( server.getConfiguration().isSMBServerEnabled())
{
// SMB/CIFS server should have automatically started
// Wait for shutdown via the console
out.println("Enter 'x' to shutdown ...");
boolean shutdown = false;
// Wait while the server runs, user may stop the server by typing a key
while (shutdown == false)
{
// Wait for the user to enter the shutdown key
int ch = System.in.read();
if (ch == 'x' || ch == 'X')
shutdown = true;
synchronized (server)
{
server.wait(20);
}
}
// Stop the server
server.stopServer();
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
System.exit(1);
}
}

View File

@@ -0,0 +1,226 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys;
import java.io.IOException;
import java.io.PrintStream;
import java.net.SocketException;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.filesys.ftp.FTPNetworkServer;
import org.alfresco.filesys.server.NetworkServer;
import org.alfresco.filesys.server.config.ServerConfiguration;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* FTP Server Class
*
* <p>Create and start the server components required to run the FTP server.
*
* @author GKSpencer
*/
public class FTPServer
{
private static final Log logger = LogFactory.getLog("org.alfresco.ftp.server");
// Server configuration
private ServerConfiguration filesysConfig;
// The actual FTP server
private FTPNetworkServer ftpServer;
/**
* Class constructor
*
* @param serverConfig ServerConfiguration
*/
public FTPServer(ServerConfiguration serverConfig)
{
this.filesysConfig = serverConfig;
}
/**
* Return the server configuration
*
* @return ServerConfiguration
*/
public final ServerConfiguration getConfiguration()
{
return filesysConfig;
}
/**
* @return Returns true if the server started up without any errors
*/
public boolean isStarted()
{
return (filesysConfig != null && filesysConfig.isFTPServerEnabled());
}
/**
* Start the FTP server components
*
* @exception SocketException If a network error occurs
* @exception IOException If an I/O error occurs
*/
public final void startServer() throws SocketException, IOException
{
try
{
// Create the FTP server, if enabled
if (filesysConfig.isFTPServerEnabled())
{
// Create the FTP server
ftpServer = new FTPNetworkServer(filesysConfig);
filesysConfig.addServer(ftpServer);
}
// Start the FTP server
if (logger.isInfoEnabled())
logger.info("Starting server " + ftpServer.getProtocolName() + " ...");
// Start the server
ftpServer.startServer();
}
catch (Throwable e)
{
filesysConfig = null;
throw new AlfrescoRuntimeException("Failed to start FTP Server", e);
}
// success
}
/**
* Stop the FTP server components
*/
public final void stopServer()
{
if (filesysConfig == null)
{
// initialisation failed
return;
}
// Shutdown the FTP server
if ( ftpServer != null)
{
if (logger.isInfoEnabled())
logger.info("Shutting server " + ftpServer.getProtocolName() + " ...");
// Stop the server
ftpServer.shutdownServer(false);
// Remove the server from the global list
getConfiguration().removeServer(ftpServer.getProtocolName());
ftpServer = null;
}
// Clear the configuration
filesysConfig = null;
}
/**
* Runs the FTP server directly
*
* @param args String[]
*/
public static void main(String[] args)
{
PrintStream out = System.out;
out.println("FTP Server Test");
out.println("---------------");
try
{
// Create the configuration service in the same way that Spring creates it
ApplicationContext ctx = new ClassPathXmlApplicationContext("alfresco/application-context.xml");
// Get the FTP server bean
FTPServer server = (FTPServer) ctx.getBean("ftpServer");
if (server == null)
{
throw new AlfrescoRuntimeException("Server bean 'ftpServer' not defined");
}
// Stop the CIFS server components, if running
NetworkServer srv = server.getConfiguration().findServer("SMB");
if ( srv != null)
srv.shutdownServer(true);
srv = server.getConfiguration().findServer("NetBIOS");
if ( srv != null)
srv.shutdownServer(true);
// Only wait for shutdown if the FTP server is enabled
if ( server.getConfiguration().isFTPServerEnabled())
{
// FTP server should have automatically started
//
// Wait for shutdown via the console
out.println("Enter 'x' to shutdown ...");
boolean shutdown = false;
// Wait while the server runs, user may stop the server by typing a key
while (shutdown == false)
{
// Wait for the user to enter the shutdown key
int ch = System.in.read();
if (ch == 'x' || ch == 'X')
shutdown = true;
synchronized (server)
{
server.wait(20);
}
}
// Stop the server
server.stopServer();
}
}
catch (Exception ex)
{
ex.printStackTrace();
}
System.exit(1);
}
}

View File

@@ -0,0 +1,120 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.ftp;
/**
* FTP Command Types Class
*
* @author GKSpencer
*/
public class FTPCommand
{
// Command ids
public final static int User = 0;
public final static int Pass = 1;
public final static int Acct = 2;
public final static int Cwd = 3;
public final static int Cdup = 4;
public final static int Smnt = 5;
public final static int Rein = 6;
public final static int Quit = 7;
public final static int Port = 8;
public final static int Pasv = 9;
public final static int Type = 10;
public final static int Stru = 11;
public final static int Mode = 12;
public final static int Retr = 13;
public final static int Stor = 14;
public final static int Stou = 15;
public final static int Appe = 16;
public final static int Allo = 17;
public final static int Rest = 18;
public final static int Rnfr = 19;
public final static int Rnto = 20;
public final static int Abor = 21;
public final static int Dele = 22;
public final static int Rmd = 23;
public final static int Mkd = 24;
public final static int Pwd = 25;
public final static int List = 26;
public final static int Nlst = 27;
public final static int Site = 28;
public final static int Syst = 29;
public final static int Stat = 30;
public final static int Help = 31;
public final static int Noop = 32;
public final static int Mdtm = 33;
public final static int Size = 34;
public final static int Opts = 35;
public final static int Feat = 36;
public final static int XPwd = 37;
public final static int XMkd = 38;
public final static int XRmd = 39;
public final static int XCup = 40;
public final static int XCwd = 41;
public final static int MaxId = 41;
public final static int InvalidCmd = -1;
// Command name strings
private static final String[] _cmds = { "USER", "PASS", "ACCT", "CWD", "CDUP", "SMNT", "REIN", "QUIT", "PORT",
"PASV", "TYPE", "STRU", "MODE", "RETR", "STOR", "STOU", "APPE", "ALLO", "REST", "RNFR", "RNTO", "ABOR",
"DELE", "RMD", "MKD", "PWD", "LIST", "NLST", "SITE", "SYST", "STAT", "HELP", "NOOP", "MDTM", "SIZE",
"OPTS", "FEAT", "XPWD", "XMKD", "XRMD", "XCUP", "XCWD" };
/**
* Convert an FTP command to an id
*
* @param cmd String
* @return int
*/
public final static int getCommandId(String cmd)
{
// Check if the command is valid
if (cmd == null)
return InvalidCmd;
// Convert to a command id
for (int i = 0; i <= MaxId; i++)
if (_cmds[i].equalsIgnoreCase(cmd))
return i;
// Command not found
return InvalidCmd;
}
/**
* Return the FTP command name for the specified id
*
* @param id int
* @return String
*/
public final static String getCommandName(int id)
{
if (id < 0 || id > MaxId)
return null;
return _cmds[id];
}
}

View File

@@ -0,0 +1,369 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.ftp;
import java.net.*;
import java.io.*;
/**
* FTP Data Session Class
* <p>
* A data connection is made when a PORT or PASV FTP command is received on the main control
* session.
* <p>
* The PORT command will actively connect to the specified address/port on the client. The PASV
* command will create a listening socket and wait for the client to connect.
*
* @author GKSpencer
*/
public class FTPDataSession implements Runnable
{
// FTP session that this data connection is associated with
private FTPSrvSession m_cmdSess;
// Connection details for active connection
private InetAddress m_clientAddr;
private int m_clientPort;
// Local port to use
private int m_localPort;
// Active data session socket
private Socket m_activeSock;
// Passive data session socket
private ServerSocket m_passiveSock;
// Adapter to bind the passive socket to
private InetAddress m_bindAddr;
// Transfer in progress and abort file transfer flags
private boolean m_transfer;
private boolean m_abort;
// Send/receive data byte count
private long m_bytCount;
/**
* Class constructor
* <p>
* Create a data connection that listens for an incoming connection.
*
* @param sess FTPSrvSession
* @exception IOException
*/
protected FTPDataSession(FTPSrvSession sess) throws IOException
{
// Set the associated command session
m_cmdSess = sess;
// Create a server socket to listen for the incoming connection
m_passiveSock = new ServerSocket(0, 1, null);
}
/**
* Class constructor
* <p>
* Create a data connection that listens for an incoming connection on the specified network
* adapter and local port.
*
* @param sess FTPSrvSession
* @param localPort int
* @param addr InetAddress
* @exception IOException
*/
protected FTPDataSession(FTPSrvSession sess, int localPort, InetAddress bindAddr) throws IOException
{
// Set the associated command session
m_cmdSess = sess;
// Create a server socket to listen for the incoming connection on the specified network
// adapter
m_localPort = localPort;
m_passiveSock = new ServerSocket(localPort, 1, bindAddr);
}
/**
* Class constructor
* <p>
* Create a data connection that listens for an incoming connection on the specified network
* adapter.
*
* @param sess FTPSrvSession
* @param addr InetAddress
* @exception IOException
*/
protected FTPDataSession(FTPSrvSession sess, InetAddress bindAddr) throws IOException
{
// Set the associated command session
m_cmdSess = sess;
// Create a server socket to listen for the incoming connection on the specified network
// adapter
m_passiveSock = new ServerSocket(0, 1, bindAddr);
}
/**
* Class constructor
* <p>
* Create a data connection to the specified client address and port.
*
* @param sess FTPSrvSession
* @param addr InetAddress
* @param port int
*/
protected FTPDataSession(FTPSrvSession sess, InetAddress addr, int port)
{
// Set the associated command session
m_cmdSess = sess;
// Save the client address/port details, the actual connection will be made later when
// the client requests/sends a file
m_clientAddr = addr;
m_clientPort = port;
}
/**
* Class constructor
* <p>
* Create a data connection to the specified client address and port, using the specified local
* port.
*
* @param sess FTPSrvSession
* @param localPort int
* @param addr InetAddress
* @param port int
*/
protected FTPDataSession(FTPSrvSession sess, int localPort, InetAddress addr, int port)
{
// Set the associated command session
m_cmdSess = sess;
// Save the local port
m_localPort = localPort;
// Save the client address/port details, the actual connection will be made later when
// the client requests/sends a file
m_clientAddr = addr;
m_clientPort = port;
}
/**
* Return the associated command session
*
* @return FTPSrvSession
*/
public final FTPSrvSession getCommandSession()
{
return m_cmdSess;
}
/**
* Return the local port
*
* @return int
*/
public final int getLocalPort()
{
if (m_passiveSock != null)
return m_passiveSock.getLocalPort();
else if (m_activeSock != null)
return m_activeSock.getLocalPort();
return -1;
}
/**
* Return the port that was allocated to the data session
*
* @return int
*/
protected final int getAllocatedPort()
{
return m_localPort;
}
/**
* Return the passive server socket address
*
* @return InetAddress
*/
public final InetAddress getPassiveAddress()
{
if (m_passiveSock != null)
{
// Get the server socket local address
InetAddress addr = m_passiveSock.getInetAddress();
if (addr.getHostAddress().compareTo("0.0.0.0") == 0)
{
try
{
addr = InetAddress.getLocalHost();
}
catch (UnknownHostException ex)
{
}
}
return addr;
}
return null;
}
/**
* Return the passive server socket port
*
* @return int
*/
public final int getPassivePort()
{
if (m_passiveSock != null)
return m_passiveSock.getLocalPort();
return -1;
}
/**
* Determine if a file transfer is active
*
* @return boolean
*/
public final boolean isTransferActive()
{
return m_transfer;
}
/**
* Abort an in progress file transfer
*/
public final void abortTransfer()
{
m_abort = true;
}
/**
* Return the transfer byte count
*
* @return long
*/
public final synchronized long getTransferByteCount()
{
return m_bytCount;
}
/**
* Return the data socket connected to the client
*
* @return Socket
* @exception IOException
*/
public final Socket getSocket() throws IOException
{
// Check for a passive connection, get the incoming socket connection
if (m_passiveSock != null)
m_activeSock = m_passiveSock.accept();
else
{
if (m_localPort != 0)
{
// Use the specified local port
m_activeSock = new Socket(m_clientAddr, m_clientPort, null, m_localPort);
}
else
m_activeSock = new Socket(m_clientAddr, m_clientPort);
}
// Set the socket to close immediately
m_activeSock.setSoLinger(false, 0);
m_activeSock.setTcpNoDelay(true);
// Return the data socket
return m_activeSock;
}
/**
* Close the data connection
*/
public final void closeSession()
{
// If the data connection is active close it
if (m_activeSock != null)
{
try
{
m_activeSock.close();
}
catch (Exception ex)
{
}
m_activeSock = null;
}
// Close the listening socket for a passive connection
if (m_passiveSock != null)
{
try
{
m_passiveSock.close();
}
catch (Exception ex)
{
}
m_passiveSock = null;
}
}
/**
* Run a file send/receive in a seperate thread
*/
public void run()
{
}
}

View File

@@ -0,0 +1,107 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.ftp;
import java.util.*;
/**
* FTP Date Utility Class
*
* @author GKSpencer
*/
public class FTPDate
{
// Constants
//
// Six months in ticks
protected final static long SIX_MONTHS = 183L * 24L * 60L * 60L * 1000L;
// Month names
protected final static String[] _months = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
"Nov", "Dec" };
/**
* Pack a date string in Unix format The format is 'Mmm dd hh:mm' if the file is less than six
* months old, else the format is 'Mmm dd yyyy'.
*
* @param buf StringBuffer
* @param dt Date
*/
public final static void packUnixDate(StringBuffer buf, Date dt)
{
// Check if the date is valid
if (dt == null)
{
buf.append("------------");
return;
}
// Get the time raw value
long timeVal = dt.getTime();
if (timeVal < 0)
{
buf.append("------------");
return;
}
// Add the month name and date parts to the string
Calendar cal = new GregorianCalendar();
cal.setTime(dt);
buf.append(_months[cal.get(Calendar.MONTH)]);
buf.append(" ");
int dayOfMonth = cal.get(Calendar.DATE);
if (dayOfMonth < 10)
buf.append(" ");
buf.append(dayOfMonth);
buf.append(" ");
// If the file is less than six months old we append the file time, else we append the year
long timeNow = System.currentTimeMillis();
if (Math.abs(timeNow - timeVal) > SIX_MONTHS)
{
// Append the year
buf.append(cal.get(Calendar.YEAR));
}
else
{
// Append the file time as hh:mm
int hr = cal.get(Calendar.HOUR_OF_DAY);
if (hr < 10)
buf.append("0");
buf.append(hr);
buf.append(":");
int sec = cal.get(Calendar.SECOND);
if (sec < 10)
buf.append("0");
buf.append(sec);
}
}
}

View File

@@ -0,0 +1,590 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.ftp;
import java.io.IOException;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketException;
import java.util.Enumeration;
import org.alfresco.filesys.server.ServerListener;
import org.alfresco.filesys.server.SrvSession;
import org.alfresco.filesys.server.config.ServerConfiguration;
import org.alfresco.filesys.server.core.SharedDeviceList;
import org.alfresco.filesys.server.filesys.NetworkFileServer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* <p>
* Create an FTP server on the specified port. The default server port is 21.
*
* @author GKSpencer
*/
public class FTPNetworkServer extends NetworkFileServer implements Runnable
{
// Debug logging
private static final Log logger = LogFactory.getLog("org.alfresco.ftp.protocol");
// Constants
//
// Server version
private static final String ServerVersion = "3.5.0";
// Listen backlog for the server socket
protected static final int LISTEN_BACKLOG = 10;
// Default FTP server port
protected static final int SERVER_PORT = 21;
// Server socket
private ServerSocket m_srvSock;
// Active session list
private FTPSessionList m_sessions;
// List of available shares
private SharedDeviceList m_shares;
// Next available session id
private int m_sessId;
// Root path for new sessions
private FTPPath m_rootPath;
// FTP server thread
private Thread m_srvThread;
// Local server address string, in FTP format (ie. n,n,n,n)
private String m_localFTPaddress;
/**
* Class constructor
*
* @param serviceResgistry ServiceRegistry
* @param config ServerConfiguration
*/
public FTPNetworkServer(ServerConfiguration config)
{
super("FTP", config);
// Set the server version
setVersion(ServerVersion);
// Allocate the session lists
m_sessions = new FTPSessionList();
// Enable debug
if (getConfiguration().getFTPDebug() != 0)
setDebug(true);
// Create the root path, if configured
if (getConfiguration().hasFTPRootPath())
{
try
{
// Create the root path
m_rootPath = new FTPPath(getConfiguration().getFTPRootPath());
}
catch (InvalidPathException ex)
{
logger.error(ex);
}
}
}
/**
* Add a new session to the server
*
* @param sess FTPSrvSession
*/
protected final void addSession(FTPSrvSession sess)
{
// Add the session to the session list
m_sessions.addSession(sess);
// Propagate the debug settings to the new session
if (hasDebug())
{
// Enable session debugging, output to the same stream as the server
sess.setDebug(getConfiguration().getFTPDebug());
}
}
/**
* emove a session from the server
*
* @param sess FTPSrvSession
*/
protected final void removeSession(FTPSrvSession sess)
{
// Remove the session from the active session list
if (m_sessions.removeSession(sess) != null)
{
// Inform listeners that a session has closed
fireSessionClosedEvent(sess);
}
}
/**
* Allocate a local port for a data session
*
* @param sess FTPSrvSession
* @param remAddr InetAddress
* @param remPort int
* @return FTPDataSession
* @exception IOException
*/
protected final FTPDataSession allocateDataSession(FTPSrvSession sess, InetAddress remAddr, int remPort)
throws IOException
{
// Create a new FTP data session
FTPDataSession dataSess = null;
if (remAddr != null)
{
// Create a normal data session
dataSess = new FTPDataSession(sess, remAddr, remPort);
}
else
{
// Create a passive data session
dataSess = new FTPDataSession(sess, getBindAddress());
}
// Return the data session
return dataSess;
}
/**
* Release a data session
*
* @param dataSess FTPDataSession
*/
protected final void releaseDataSession(FTPDataSession dataSess)
{
// Close the data session
dataSess.closeSession();
}
/**
* Get the shared device list
*
* @return SharedDeviceList
*/
public final SharedDeviceList getShareList()
{
// Check if the share list has been populated
if (m_shares == null)
m_shares = getConfiguration().getShareMapper()
.getShareList(getConfiguration().getServerName(), null, false);
// Return the share list
return m_shares;
}
/**
* Check if the FTP server is to be bound to a specific network adapter
*
* @return boolean
*/
public final boolean hasBindAddress()
{
return getConfiguration().getFTPBindAddress() != null ? true : false;
}
/**
* Return the address that the FTP server should bind to
*
* @return InetAddress
*/
public final InetAddress getBindAddress()
{
return getConfiguration().getFTPBindAddress();
}
/**
* Check if the root path is set
*
* @return boolean
*/
public final boolean hasRootPath()
{
return m_rootPath != null ? true : false;
}
/**
* Check if anonymous logins are allowed
*
* @return boolean
*/
public final boolean allowAnonymous()
{
return getConfiguration().allowAnonymousFTP();
}
/**
* Return the anonymous login user name
*
* @return String
*/
public final String getAnonymousAccount()
{
return getConfiguration().getAnonymousFTPAccount();
}
/**
* Return the local FTP server address string in n,n,n,n format
*
* @return String
*/
public final String getLocalFTPAddressString()
{
return m_localFTPaddress;
}
/**
* Return the next available session id
*
* @return int
*/
protected final synchronized int getNextSessionId()
{
return m_sessId++;
}
/**
* Return the FTP server port
*
* @return int
*/
public final int getPort()
{
return getConfiguration().getFTPPort();
}
/**
* Return the server socket
*
* @return ServerSocket
*/
protected final ServerSocket getSocket()
{
return m_srvSock;
}
/**
* Return the root path for new sessions
*
* @return FTPPath
*/
public final FTPPath getRootPath()
{
return m_rootPath;
}
/**
* Notify the server that a user has logged on.
*
* @param sess SrvSession
*/
protected final void sessionLoggedOn(SrvSession sess)
{
// Notify session listeners that a user has logged on.
fireSessionLoggedOnEvent(sess);
}
/**
* Start the SMB server.
*/
public void run()
{
// Debug
if (logger.isDebugEnabled() && hasDebug())
{
logger.debug("FTP Server starting on port " + getPort());
logger.debug("Version " + isVersion());
}
// Create a server socket to listen for incoming FTP session requests
try
{
// Create the server socket to listen for incoming FTP session requests
if (hasBindAddress())
m_srvSock = new ServerSocket(getPort(), LISTEN_BACKLOG, getBindAddress());
else
m_srvSock = new ServerSocket(getPort(), LISTEN_BACKLOG);
// DEBUG
if (logger.isDebugEnabled() && hasDebug())
{
String ftpAddr = "ALL";
if (hasBindAddress())
ftpAddr = getBindAddress().getHostAddress();
logger.debug("FTP Binding to local address " + ftpAddr);
}
// If a bind address is set then we can set the FTP local address
if (hasBindAddress())
m_localFTPaddress = getBindAddress().getHostAddress().replace('.', ',');
// Indicate that the server is active
setActive(true);
fireServerEvent(ServerListener.ServerActive);
// Wait for incoming connection requests
while (hasShutdown() == false)
{
// Wait for a connection
Socket sessSock = getSocket().accept();
// Set the local address string in FTP format (n,n,n,n), if not already set
if (m_localFTPaddress == null)
{
if (sessSock.getLocalAddress() != null)
m_localFTPaddress = sessSock.getLocalAddress().getHostAddress().replace('.', ',');
}
// Set socket options
sessSock.setTcpNoDelay(true);
// Debug
if (logger.isDebugEnabled() && hasDebug())
logger.debug("FTP session request received from "
+ sessSock.getInetAddress().getHostAddress());
// Create a server session for the new request, and set the session id.
FTPSrvSession srvSess = new FTPSrvSession(sessSock, this);
srvSess.setSessionId(getNextSessionId());
srvSess.setUniqueId("FTP" + srvSess.getSessionId());
srvSess.setDebugPrefix("[FTP" + srvSess.getSessionId() + "] ");
// Initialize the root path for the new session, if configured
if (hasRootPath())
srvSess.setRootPath(getRootPath());
// Add the session to the active session list
addSession(srvSess);
// Inform listeners that a new session has been created
fireSessionOpenEvent(srvSess);
// Start the new session in a seperate thread
Thread srvThread = new Thread(srvSess);
srvThread.setDaemon(true);
srvThread.setName("Sess_FTP" + srvSess.getSessionId() + "_"
+ sessSock.getInetAddress().getHostAddress());
srvThread.start();
// Sleep for a while
try
{
Thread.sleep(1000L);
}
catch (InterruptedException ex)
{
}
}
}
catch (SocketException ex)
{
// Do not report an error if the server has shutdown, closing the server socket
// causes an exception to be thrown.
if (hasShutdown() == false)
{
logger.error("FTP Socket error", ex);
// Inform listeners of the error, store the exception
setException(ex);
fireServerEvent(ServerListener.ServerError);
}
}
catch (Exception ex)
{
// Do not report an error if the server has shutdown, closing the server socket
// causes an exception to be thrown.
if (hasShutdown() == false)
{
logger.error("FTP Server error", ex);
}
// Inform listeners of the error, store the exception
setException(ex);
fireServerEvent(ServerListener.ServerError);
}
// Close the active sessions
Enumeration enm = m_sessions.enumerate();
while (enm.hasMoreElements())
{
// Get the session id and associated session
Integer sessId = (Integer) enm.nextElement();
FTPSrvSession sess = m_sessions.findSession(sessId);
// DEBUG
if (logger.isDebugEnabled() && hasDebug())
logger.debug("FTP Close session, id = " + sess.getSessionId());
// Close the session
sess.closeSession();
}
// Debug
if (logger.isDebugEnabled() && hasDebug())
logger.debug("FTP Server shutting down ...");
// Indicate that the server has shutdown, inform listeners
setActive(false);
fireServerEvent(ServerListener.ServerShutdown);
}
/**
* Shutdown the FTP server
*
* @param immediate boolean
*/
public void shutdownServer(boolean immediate)
{
// Set the shutdown flag
setShutdown(true);
// Close the FTP server listening socket to wakeup the main FTP server thread
try
{
if (getSocket() != null)
getSocket().close();
}
catch (IOException ex)
{
}
// Wait for the main server thread to close
if (m_srvThread != null)
{
try
{
m_srvThread.join(3000);
}
catch (Exception ex)
{
}
}
// Fire a shutdown notification event
fireServerEvent(ServerListener.ServerShutdown);
}
/**
* Start the FTP server in a seperate thread
*/
public void startServer()
{
// Create a seperate thread to run the FTP server
m_srvThread = new Thread(this);
m_srvThread.setName("FTP Server");
m_srvThread.start();
// Fire a server startup event
fireServerEvent(ServerListener.ServerStartup);
}
}

View File

@@ -0,0 +1,580 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.ftp;
import org.alfresco.filesys.server.filesys.*;
import org.alfresco.filesys.server.core.*;
/**
* FTP Path Class
* <p>
* Converts FTP paths to share/share relative paths.
*
* @author GKSpencer
*/
public class FTPPath
{
// FTP directory seperator
private static final String FTP_SEPERATOR = "/";
private static final char FTP_SEPERATOR_CHAR = '/';
// Share relative path directory seperator
private static final String DIR_SEPERATOR = "\\";
private static final char DIR_SEPERATOR_CHAR = '\\';
// FTP path
private String m_ftpPath;
// Share name nad share relative path
private String m_shareName;
private String m_sharePath;
// Shared device
private DiskSharedDevice m_shareDev;
// Flag to indicate if this is a directory or file path
private boolean m_dir = true;
/**
* Default constructor
*/
public FTPPath()
{
try
{
setFTPPath(null);
}
catch (Exception ex)
{
}
}
/**
* Class constructor
*
* @param ftpPath String
* @exception InvalidPathException
*/
public FTPPath(String ftpPath) throws InvalidPathException
{
setFTPPath(ftpPath);
}
/**
* Class constructor
*
* @param shrName String
* @param shrPath String
* @exception InvalidPathException
*/
public FTPPath(String shrName, String shrPath) throws InvalidPathException
{
setSharePath(shrName, shrPath);
}
/**
* Copy constructor
*
* @param ftpPath FTPPath
*/
public FTPPath(FTPPath ftpPath)
{
try
{
setFTPPath(ftpPath.getFTPPath());
m_shareDev = ftpPath.getSharedDevice();
}
catch (Exception ex)
{
}
}
/**
* Determine if the current FTP path is the root path
*
* @return boolean
*/
public final boolean isRootPath()
{
return m_ftpPath.compareTo(FTP_SEPERATOR) == 0 ? true : false;
}
/**
* Determine if the path is for a directory or file
*
* @return boolean
*/
public final boolean isDirectory()
{
return m_dir;
}
/**
* Check if the FTP path is valid
*
* @return boolean
*/
public final boolean hasFTPPath()
{
return m_ftpPath != null ? true : false;
}
/**
* Return the FTP path
*
* @return String
*/
public final String getFTPPath()
{
return m_ftpPath;
}
/**
* Check if the share name is valid
*
* @return boolean
*/
public final boolean hasShareName()
{
return m_shareName != null ? true : false;
}
/**
* Return the share name
*
* @return String
*/
public final String getShareName()
{
return m_shareName;
}
/**
* Check if the share path is the root path
*
* @return boolean
*/
public final boolean isRootSharePath()
{
if (m_sharePath == null || m_sharePath.compareTo(DIR_SEPERATOR) == 0)
return true;
return false;
}
/**
* Check if the share path is valid
*
* @reutrn boolean
*/
public final boolean hasSharePath()
{
return m_sharePath != null ? true : false;
}
/**
* Return the share relative path
*
* @reutrn String
*/
public final String getSharePath()
{
return m_sharePath;
}
/**
* Check if the shared device has been set
*
* @return boolean
*/
public final boolean hasSharedDevice()
{
return m_shareDev != null ? true : false;
}
/**
* Return the shared device
*
* @return DiskSharedDevice
*/
public final DiskSharedDevice getSharedDevice()
{
return m_shareDev;
}
/**
* Set the paths using the specified FTP path
*
* @param path String
* @exception InvalidPathException
*/
public final void setFTPPath(String path) throws InvalidPathException
{
// Check for a null path or the root path
if (path == null || path.length() == 0 || path.compareTo(FTP_SEPERATOR) == 0)
{
m_ftpPath = FTP_SEPERATOR;
m_shareName = null;
m_sharePath = null;
m_shareDev = null;
return;
}
// Check if the path starts with the FTP seperator
if (path.startsWith(FTP_SEPERATOR) == false)
throw new InvalidPathException("Invalid FTP path, should start with " + FTP_SEPERATOR);
// Save the FTP path
m_ftpPath = path;
// Get the first level directory from the path, this maps to the share name
int pos = path.indexOf(FTP_SEPERATOR, 1);
if (pos != -1)
{
m_shareName = path.substring(1, pos);
if (path.length() > pos)
m_sharePath = path.substring(pos).replace(FTP_SEPERATOR_CHAR, DIR_SEPERATOR_CHAR);
else
m_sharePath = DIR_SEPERATOR;
}
else
{
m_shareName = path.substring(1);
m_sharePath = DIR_SEPERATOR;
}
// Check if the share has changed
if (m_shareDev != null && m_shareName != null && m_shareDev.getName().compareTo(m_shareName) != 0)
m_shareDev = null;
}
/**
* Set the paths using the specified share and share relative path
*
* @param shr String
* @param path String
* @exception InvalidPathException
*/
public final void setSharePath(String shr, String path) throws InvalidPathException
{
// Save the share name and path
m_shareName = shr;
m_sharePath = path != null ? path : DIR_SEPERATOR;
// Build the FTP style path
StringBuffer ftpPath = new StringBuffer();
ftpPath.append(FTP_SEPERATOR);
if (hasShareName())
ftpPath.append(getShareName());
if (hasSharePath())
{
// Convert the share relative path to an FTP style path
String ftp = getSharePath().replace(DIR_SEPERATOR_CHAR, FTP_SEPERATOR_CHAR);
ftpPath.append(ftp);
}
else
ftpPath.append(FTP_SEPERATOR);
// Update the FTP path
m_ftpPath = ftpPath.toString();
}
/**
* Set the shared device
*
* @param shareList SharedDeviceList
* @param sess FTPSrvSession
* @return boolean
*/
public final boolean setSharedDevice(SharedDeviceList shareList, FTPSrvSession sess)
{
// Clear the current shared device
m_shareDev = null;
// Check if the share name is valid
if (hasShareName() == false || shareList == null)
return false;
// Find the required disk share
SharedDevice shr = shareList.findShare(getShareName());
if (shr != null && shr instanceof DiskSharedDevice)
m_shareDev = (DiskSharedDevice) shr;
// Return the status
return m_shareDev != null ? true : false;
}
/**
* Build an FTP path to the specified file
*
* @param fname String
* @return String
*/
public final String makeFTPPathToFile(String fname)
{
// Build the FTP path to a file
StringBuffer path = new StringBuffer(256);
path.append(m_ftpPath);
if (m_ftpPath.endsWith(FTP_SEPERATOR) == false)
path.append(FTP_SEPERATOR);
path.append(fname);
return path.toString();
}
/**
* Build a share relative path to the specified file
*
* @param fname String
* @return String
*/
public final String makeSharePathToFile(String fname)
{
// Build the share relative path to a file
StringBuilder path = new StringBuilder(256);
path.append(m_sharePath);
if (m_sharePath.endsWith(DIR_SEPERATOR) == false)
path.append(DIR_SEPERATOR);
path.append(fname);
return path.toString();
}
/**
* Add a directory to the end of the current path
*
* @param dir String
*/
public final void addDirectory(String dir)
{
// Check if the directory has a trailing seperator
if (dir.length() > 1 && dir.endsWith(FTP_SEPERATOR) || dir.endsWith(DIR_SEPERATOR))
dir = dir.substring(0, dir.length() - 1);
// Append the directory to the FTP path
StringBuilder str = new StringBuilder(256);
str.append(m_ftpPath);
if (m_ftpPath.endsWith(FTP_SEPERATOR) == false)
str.append(FTP_SEPERATOR);
str.append(dir);
if (m_ftpPath.endsWith(FTP_SEPERATOR) == false)
str.append(FTP_SEPERATOR);
m_ftpPath = str.toString();
// Check if there are any incorrect seperators in the FTP path
if (m_ftpPath.indexOf(DIR_SEPERATOR) != -1)
m_ftpPath = m_ftpPath.replace(FTP_SEPERATOR_CHAR, DIR_SEPERATOR_CHAR);
// Append the directory to the share relative path
str.setLength(0);
str.append(m_sharePath);
if (m_sharePath.endsWith(DIR_SEPERATOR) == false)
str.append(DIR_SEPERATOR);
str.append(dir);
m_sharePath = str.toString();
// Check if there are any incorrect seperators in the share relative path
if (m_sharePath.indexOf(FTP_SEPERATOR) != -1)
m_sharePath = m_sharePath.replace(FTP_SEPERATOR_CHAR, DIR_SEPERATOR_CHAR);
// Indicate that the path is to a directory
setDirectory(true);
}
/**
* Add a file to the end of the current path
*
* @param file String
*/
public final void addFile(String file)
{
// Append the file name to the FTP path
StringBuilder str = new StringBuilder(256);
str.append(m_ftpPath);
if (m_ftpPath.endsWith(FTP_SEPERATOR) == false)
str.append(FTP_SEPERATOR);
str.append(file);
m_ftpPath = str.toString();
// Check if there are any incorrect seperators in the FTP path
if (m_ftpPath.indexOf(DIR_SEPERATOR) != -1)
m_ftpPath = m_ftpPath.replace(FTP_SEPERATOR_CHAR, DIR_SEPERATOR_CHAR);
// Append the file name to the share relative path
str.setLength(0);
str.append(m_sharePath);
if (m_sharePath.endsWith(DIR_SEPERATOR) == false)
str.append(DIR_SEPERATOR);
str.append(file);
m_sharePath = str.toString();
// Check if there are any incorrect seperators in the share relative path
if (m_sharePath.indexOf(FTP_SEPERATOR) != -1)
m_sharePath = m_sharePath.replace(FTP_SEPERATOR_CHAR, DIR_SEPERATOR_CHAR);
// Indicate that the path is to a file
setDirectory(false);
}
/**
* Remove the last directory from the end of the path
*/
public final void removeDirectory()
{
// Check if the FTP path has a directory to remove
if (m_ftpPath != null && m_ftpPath.length() > 1)
{
// Find the last directory in the FTP path
int pos = m_ftpPath.length() - 1;
if (m_ftpPath.endsWith(FTP_SEPERATOR))
pos--;
while (pos > 0 && m_ftpPath.charAt(pos) != FTP_SEPERATOR_CHAR)
pos--;
// Set the new FTP path
m_ftpPath = m_ftpPath.substring(0, pos);
// Indicate that the path is to a directory
setDirectory(true);
// Reset the share/share path
try
{
setFTPPath(m_ftpPath);
}
catch (InvalidPathException ex)
{
}
}
}
/**
* Set/clear the directory path flag
*
* @param dir boolean
*/
protected final void setDirectory(boolean dir)
{
m_dir = dir;
}
/**
* Check if an FTP path string contains multiple directories
*
* @param path String
* @return boolean
*/
public final static boolean hasMultipleDirectories(String path)
{
if (path == null)
return false;
if (path.startsWith(FTP_SEPERATOR))
return true;
return false;
}
/**
* Check if the FTP path is a relative path, ie. does not start with a leading slash
*
* @param path String
* @return boolean
*/
public final static boolean isRelativePath(String path)
{
if (path == null)
return false;
return path.startsWith(FTP_SEPERATOR) ? false : true;
}
/**
* Return the FTP path as a string
*
* @return String
*/
public String toString()
{
StringBuilder str = new StringBuilder();
str.append("[");
str.append(getFTPPath());
str.append("=");
str.append(getShareName());
str.append(",");
str.append(getSharePath());
str.append("]");
return str.toString();
}
}

View File

@@ -0,0 +1,173 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.ftp;
/**
* FTP Request Class
* <p>
* Contains the details of an FTP request
*
* @author GKSpencer
*/
public class FTPRequest
{
// FTP command id
private int m_cmd;
// Command argument
private String m_arg;
/**
* Default constructor
*/
public FTPRequest()
{
m_cmd = FTPCommand.InvalidCmd;
}
/**
* Class constructor
*
* @param cmd int
* @param arg String
*/
public FTPRequest(int cmd, String arg)
{
m_cmd = cmd;
m_arg = arg;
}
/**
* Class constructor
*
* @param cmdLine String
*/
public FTPRequest(String cmdLine)
{
// Parse the FTP command record
parseCommandLine(cmdLine);
}
/**
* Return the command index
*
* @return int
*/
public final int isCommand()
{
return m_cmd;
}
/**
* Check if the request has an argument
*
* @return boolean
*/
public final boolean hasArgument()
{
return m_arg != null ? true : false;
}
/**
* Return the request argument
*
* @return String
*/
public final String getArgument()
{
return m_arg;
}
/**
* Set the command line for the request
*
* @param cmdLine String
* @return int
*/
public final int setCommandLine(String cmdLine)
{
// Reset the current values
m_cmd = FTPCommand.InvalidCmd;
m_arg = null;
// Parse the new command line
parseCommandLine(cmdLine);
return isCommand();
}
/**
* Parse a command string
*
* @param cmdLine String
*/
protected final void parseCommandLine(String cmdLine)
{
// Check if the command has an argument
int pos = cmdLine.indexOf(' ');
String cmd = null;
if (pos != -1)
{
cmd = cmdLine.substring(0, pos);
m_arg = cmdLine.substring(pos + 1);
}
else
cmd = cmdLine;
// Validate the FTP command
m_cmd = FTPCommand.getCommandId(cmd);
}
/**
* Update the command argument
*
* @param arg String
*/
protected final void updateArgument(String arg)
{
m_arg = arg;
}
/**
* Return the request as a string
*
* @return String
*/
public String toString()
{
StringBuilder str = new StringBuilder();
str.append("[");
str.append(FTPCommand.getCommandName(m_cmd));
str.append(":");
str.append(m_arg);
str.append("]");
return str.toString();
}
}

View File

@@ -0,0 +1,133 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.ftp;
import java.util.*;
/**
* FTP Server Session List Class
*
* @author GKSpencer
*/
public class FTPSessionList
{
// Session list
private Hashtable<Integer, FTPSrvSession> m_sessions;
/**
* Class constructor
*/
public FTPSessionList()
{
m_sessions = new Hashtable<Integer, FTPSrvSession>();
}
/**
* Return the number of sessions in the list
*
* @return int
*/
public final int numberOfSessions()
{
return m_sessions.size();
}
/**
* Add a session to the list
*
* @param sess FTPSrvSession
*/
public final void addSession(FTPSrvSession sess)
{
m_sessions.put(new Integer(sess.getSessionId()), sess);
}
/**
* Find the session using the unique session id
*
* @param id int
* @return FTPSrvSession
*/
public final FTPSrvSession findSession(int id)
{
return findSession(new Integer(id));
}
/**
* Find the session using the unique session id
*
* @param id Integer
* @return FTPSrvSession
*/
public final FTPSrvSession findSession(Integer id)
{
return m_sessions.get(id);
}
/**
* Remove a session from the list
*
* @param id int
* @return FTPSrvSession
*/
public final FTPSrvSession removeSession(int id)
{
return removeSession(new Integer(id));
}
/**
* Remove a session from the list
*
* @param sess FTPSrvSession
* @return FTPSrvSession
*/
public final FTPSrvSession removeSession(FTPSrvSession sess)
{
return removeSession(sess.getSessionId());
}
/**
* Remove a session from the list
*
* @param id Integer
* @return FTPSrvSession
*/
public final FTPSrvSession removeSession(Integer id)
{
// Find the required session
FTPSrvSession sess = findSession(id);
// Remove the session and return the removed session
m_sessions.remove(id);
return sess;
}
/**
* Enumerate the session ids
*
* @return Enumeration
*/
public final Enumeration enumerate()
{
return m_sessions.keys();
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,43 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.ftp;
/**
* Invalid FTP Path Exception Class
*
* @author GKSpencer
*/
public class InvalidPathException extends Exception {
private static final long serialVersionUID = -3298943582077910226L;
/**
* Default constructor
*/
public InvalidPathException() {
super();
}
/**
* Class constructor
*
* @param msg String
*/
public InvalidPathException(String msg) {
super(msg);
}
}

View File

@@ -0,0 +1,187 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.locking;
/**
* File Lock Class
* <p>
* Contains the details of a single file lock.
*/
public class FileLock
{
// Constants
public static final long LockWholeFile = 0xFFFFFFFFFFFFFFFFL;
// Start lock offset and length
private long m_offset;
private long m_length;
// Owner process id
private int m_pid;
/**
* Class constructor
*
* @param offset long
* @param len long
* @param pid int
*/
public FileLock(long offset, long len, int pid)
{
setOffset(offset);
setLength(len);
setProcessId(pid);
}
/**
* Get the starting lock offset
*
* @return long Starting lock offset.
*/
public final long getOffset()
{
return m_offset;
}
/**
* Set the starting lock offset.
*
* @param long Starting lock offset
*/
public final void setOffset(long offset)
{
m_offset = offset;
}
/**
* Get the locked section length
*
* @return long Locked section length
*/
public final long getLength()
{
return m_length;
}
/**
* Set the locked section length
*
* @param long Locked section length
*/
public final void setLength(long len)
{
if (len < 0)
m_length = LockWholeFile;
else
m_length = len;
}
/**
* Get the owner process id for the lock
*
* @return int
*/
public final int getProcessId()
{
return m_pid;
}
/**
* Deterine if the lock is locking the whole file
*
* @return boolean
*/
public final boolean isWholeFile()
{
return m_length == LockWholeFile ? true : false;
}
/**
* Set the process id of the owner of this lock
*
* @param pid int
*/
public final void setProcessId(int pid)
{
m_pid = pid;
}
/**
* Check if the specified locks byte range overlaps this locks byte range.
*
* @param lock FileLock
*/
public final boolean hasOverlap(FileLock lock)
{
return hasOverlap(lock.getOffset(), lock.getLength());
}
/**
* Check if the specified locks byte range overlaps this locks byte range.
*
* @param offset long
* @param len long
*/
public final boolean hasOverlap(long offset, long len)
{
// Check if the lock is for the whole file
if (isWholeFile())
return true;
// Check if the locks overlap
long endOff = getOffset() + getLength();
if (getOffset() < offset && endOff < offset)
return false;
endOff = offset + len;
if (getOffset() > endOff)
return false;
// Locks overlap
return true;
}
/**
* Return the lock details as a string
*
* @return String
*/
public String toString()
{
StringBuffer str = new StringBuffer();
str.append("[PID=");
str.append(getProcessId());
str.append(",Offset=");
str.append(getOffset());
str.append(",Len=");
str.append(getLength());
str.append("]");
return str.toString();
}
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.locking;
import java.io.IOException;
/**
* File Lock Exception Class
*/
public class FileLockException extends IOException
{
private static final long serialVersionUID = 3257845472092893751L;
/**
* Class constructor.
*/
public FileLockException()
{
super();
}
/**
* Class constructor.
*
* @param s java.lang.String
*/
public FileLockException(String s)
{
super(s);
}
}

View File

@@ -0,0 +1,246 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.locking;
import java.util.Vector;
/**
* File Lock List Class
* <p>
* Contains a list of the current locks on a file.
*/
public class FileLockList
{
// List of file locks
private Vector<FileLock> m_lockList;
/**
* Construct an empty file lock list.
*/
public FileLockList()
{
m_lockList = new Vector<FileLock>();
}
/**
* Add a lock to the list
*
* @param lock Lock to be added to the list.
*/
public final void addLock(FileLock lock)
{
m_lockList.add(lock);
}
/**
* Remove a lock from the list
*
* @param lock FileLock
* @return FileLock
*/
public final FileLock removeLock(FileLock lock)
{
return removeLock(lock.getOffset(), lock.getLength(), lock.getProcessId());
}
/**
* Remove a lock from the list
*
* @param long offset Starting offset of the lock
* @param long len Locked section length
* @param int pid Owner process id
* @return FileLock
*/
public final FileLock removeLock(long offset, long len, int pid)
{
// Check if there are any locks in the list
if (numberOfLocks() == 0)
return null;
// Search for the required lock
for (int i = 0; i < numberOfLocks(); i++)
{
// Get the current lock details
FileLock curLock = getLockAt(i);
if (curLock.getOffset() == offset && curLock.getLength() == len && curLock.getProcessId() == pid)
{
// Remove the lock from the list
m_lockList.removeElementAt(i);
return curLock;
}
}
// Lock not found
return null;
}
/**
* Remove all locks from the list
*/
public final void removeAllLocks()
{
m_lockList.removeAllElements();
}
/**
* Return the specified lock details
*
* @param int Lock index
* @return FileLock
*/
public final FileLock getLockAt(int idx)
{
if (idx < m_lockList.size())
return m_lockList.elementAt(idx);
return null;
}
/**
* Check if the new lock should be allowed by comparing with the locks in the list.
*
* @param lock FileLock
* @return boolean true if the lock can be granted, else false.
*/
public final boolean allowsLock(FileLock lock)
{
// If the list is empty we can allow the lock request
if (numberOfLocks() == 0)
return true;
// Search for any overlapping locks
for (int i = 0; i < numberOfLocks(); i++)
{
// Get the current lock details
FileLock curLock = getLockAt(i);
if (curLock.hasOverlap(lock))
return false;
}
// The lock does not overlap with any existing locks
return true;
}
/**
* Check if the file is readable for the specified section of the file and process id
*
* @param offset long
* @param len long
* @param pid int
* @return boolean
*/
public final boolean canReadFile(long offset, long len, int pid)
{
// If the list is empty we can allow the read request
if (numberOfLocks() == 0)
return true;
// Search for a lock that prevents the read
for (int i = 0; i < numberOfLocks(); i++)
{
// Get the current lock details
FileLock curLock = getLockAt(i);
// Check if the process owns the lock, if not then check if there is an overlap
if (curLock.getProcessId() != pid)
{
// Check if the read overlaps with the locked area
if (curLock.hasOverlap(offset, len) == true)
return false;
}
}
// The lock does not overlap with any existing locks
return true;
}
/**
* Check if the file is writeable for the specified section of the file and process id
*
* @param offset long
* @param len long
* @param pid int
* @return boolean
*/
public final boolean canWriteFile(long offset, long len, int pid)
{
// If the list is empty we can allow the read request
if (numberOfLocks() == 0)
return true;
// Search for a lock that prevents the read
for (int i = 0; i < numberOfLocks(); i++)
{
// Get the current lock details
FileLock curLock = getLockAt(i);
// Check if the process owns the lock, if not then check if there is an overlap
if (curLock.getProcessId() != pid)
{
// Check if the read overlaps with the locked area
if (curLock.hasOverlap(offset, len) == true)
return false;
}
}
// The lock does not overlap with any existing locks
return true;
}
/**
* Return the count of locks in the list.
*
* @return int Number of locks in the list.
*/
public final int numberOfLocks()
{
return m_lockList.size();
}
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.locking;
import java.io.IOException;
/**
* File Unlock Exception Class
*/
public class FileUnlockException extends IOException
{
private static final long serialVersionUID = 3257290240262484786L;
/**
* Class constructor.
*/
public FileUnlockException()
{
super();
}
/**
* Class constructor.
*
* @param s java.lang.String
*/
public FileUnlockException(String s)
{
super(s);
}
}

View File

@@ -0,0 +1,50 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.locking;
import java.io.IOException;
/**
* Lock Conflict Exception Class
* <p>
* Thrown when a lock request overlaps with an existing lock on a file.
*/
public class LockConflictException extends IOException
{
// Serializable version id
private static final long serialVersionUID = 0;
/**
* Class constructor.
*/
public LockConflictException()
{
super();
}
/**
* Class constructor.
*
* @param s java.lang.String
*/
public LockConflictException(String s)
{
super(s);
}
}

View File

@@ -0,0 +1,47 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.locking;
import java.io.IOException;
/**
* Not Locked Exception Class
* <p>
* Thrown when an unlock request is received that has not active lock on a file.
*/
public class NotLockedException extends IOException
{
private static final long serialVersionUID = 3834594296543261488L;
/**
* Class constructor.
*/
public NotLockedException()
{
super();
}
/**
* Class constructor.
*
* @param s java.lang.String
*/
public NotLockedException(String s)
{
super(s);
}
}

View File

@@ -0,0 +1,45 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.netbios;
/**
* Name Template Exception Class
* <p>
* Thrown when a NetBIOS name template contains invalid characters or is too long.
*/
public class NameTemplateException extends Exception
{
private static final long serialVersionUID = 3256439188231762230L;
/**
* Default constructor.
*/
public NameTemplateException()
{
super();
}
/**
* Class constructor
*
* @param s java.lang.String
*/
public NameTemplateException(String s)
{
super(s);
}
}

View File

@@ -0,0 +1,672 @@
/*
* Copyright (C) 2005 Alfresco, Inc.
*
* Licensed under the Mozilla Public License version 1.1
* with a permitted attribution clause. You may obtain a
* copy of the License at
*
* http://www.alfresco.org/legal/license.txt
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License.
*/
package org.alfresco.filesys.netbios;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.UnknownHostException;
import org.alfresco.filesys.util.DataPacker;
/**
* NetBIOS datagram class.
*/
public class NetBIOSDatagram
{
// Datagram types
public static final int DIRECT_UNIQUE = 0x10;
public static final int DIRECT_GROUP = 0x11;
public static final int BROADCAST = 0x12;
public static final int DATAGRAM_ERROR = 0x13;
public static final int DATAGRAM_QUERY = 0x14;
public static final int POSITIVE_RESP = 0x15;
public static final int NEGATIVE_RESP = 0x16;
// Datagram flags
public static final int FLG_MOREFRAGMENTS = 0x01;
public static final int FLG_FIRSTPKT = 0x02;
// Default NetBIOS packet buffer size to allocate
public static final int DEFBUFSIZE = 4096;
// NetBIOS datagram offsets
public static final int NB_MSGTYPE = 0;
public static final int NB_FLAGS = 1;
public static final int NB_DATAGRAMID = 2;
public static final int NB_SOURCEIP = 4;
public static final int NB_SOURCEPORT = 8;
public static final int NB_DATAGRAMLEN = 10;
public static final int NB_PKTOFFSET = 12;
public static final int NB_FROMNAME = 14;
public static final int NB_TONAME = 48;
public static final int NB_USERDATA = 82;
public static final int NB_MINLENGTH = 82;
public static final int NB_MINSMBLEN = 100;
// NetBIOS packet buffer
protected byte[] m_buf;
// Next available datagram id
private static int m_nextId;
/**
* NetBIOS Datagram constructor
*/
public NetBIOSDatagram()
{
// Allocaet a NetBIOS packet buffer
m_buf = new byte[DEFBUFSIZE];
}
/**
* Create a new NetBIOS datagram using the specified packet buffer.
*
* @param pkt byte[]
*/
public NetBIOSDatagram(byte[] pkt)
{
m_buf = pkt;
}
/**
* Create a new NetBIOS datagram with the specified buffer size.
*
* @param bufSize int
*/
public NetBIOSDatagram(int bufSize)
{
m_buf = new byte[bufSize];
}
/**
* Return the next available datagram id.
*/
public final static synchronized int getNextDatagramId()
{
// Update and return the next available datagram id
return m_nextId++;
}
/**
* Return the NetBIOS buffer.
*
* @return byte[]
*/
public final byte[] getBuffer()
{
return m_buf;
}
/**
* Get the datagram id.
*
* @return int
*/
public final int getDatagramId()
{
return DataPacker.getIntelShort(m_buf, NB_DATAGRAMID);
}
/**
* Get the datagram destination name.
*
* @return NetBIOSName
*/
public final NetBIOSName getDestinationName()
{
// Decode the NetBIOS name to a string
String name = NetBIOSSession.DecodeName(m_buf, NB_TONAME + 1);
if (name != null)
{
// Convert the name string to a NetBIOS name
NetBIOSName nbName = new NetBIOSName(name.substring(0, 14), name.charAt(15), false);
if (getMessageType() == DIRECT_GROUP)
nbName.setGroup(true);
return nbName;
}
return null;
}
/**
* Return the datagram flags value.
*
* @return int
*/
public final int getFlags()
{
return m_buf[NB_FLAGS] & 0xFF;
}
/**
* Return the datagram length.
*
* @return int
*/
public final int getLength()
{
return DataPacker.getShort(m_buf, NB_DATAGRAMLEN);
}
/**
* Return the user data length
*
* @return int
*/
public final int getDataLength()
{
return getLength() - NB_USERDATA;
}
/**
* Get the NetBIOS datagram message type.
*
* @return int
*/
public final int getMessageType()
{
return m_buf[NB_MSGTYPE] & 0xFF;
}
/**
* Return the datagram source IP address.
*
* @return byte[]
*/
public final byte[] getSourceIPAddress()
{
// Allocate a 4 byte array for the IP address
byte[] ipaddr = new byte[4];
// Copy the IP address bytes from the datagram
for (int i = 0; i < 4; i++)
ipaddr[i] = m_buf[NB_SOURCEIP + i];
// Return the IP address bytes
return ipaddr;
}
/**
* Return the datagram source IP address, as a string
*
* @return String
*/
public final String getSourceAddress()
{
// Get the IP address
byte[] addr = getSourceIPAddress();
// Build the IP address string
StringBuffer addrStr = new StringBuffer();
addrStr.append(addr[0]);
addrStr.append(".");
addrStr.append(addr[1]);
addrStr.append(".");
addrStr.append(addr[2]);
addrStr.append(".");
addrStr.append(addr[3]);
return addrStr.toString();
}
/**
* Get the source NetBIOS name.
*
* @return java.lang.String
*/
public final NetBIOSName getSourceName()
{
// Decode the NetBIOS name string
String name = NetBIOSSession.DecodeName(m_buf, NB_FROMNAME + 1);
// Convert the name to a NetBIOS name
if (name != null)
{
// Convert the name string to a NetBIOS name
NetBIOSName nbName = new NetBIOSName(name.substring(0, 14), name.charAt(15), false);
return nbName;
}
return null;
}
/**
* Get the source port/socket for the datagram.
*
* @return int
*/
public final int getSourcePort()
{
return DataPacker.getIntelShort(m_buf, NB_SOURCEPORT);
}
/**
* Check if the user data is an SMB packet
*
* @return boolean
*/
public final boolean isSMBData()
{
if (m_buf[NB_USERDATA] == (byte) 0xFF && m_buf[NB_USERDATA + 1] == (byte) 'S'
&& m_buf[NB_USERDATA + 2] == (byte) 'M' && m_buf[NB_USERDATA + 3] == (byte) 'B'
&& getLength() >= NB_MINSMBLEN)
return true;
return false;
}
/**
* Return the message type as a string
*
* @return String
*/
public final String getMessageTypeString()
{
// Determine the message type
String typ = null;
switch (getMessageType())
{
case DIRECT_GROUP:
typ = "DIRECT GROUP";
break;
case DIRECT_UNIQUE:
typ = "DIRECT UNIQUE";
break;
case DATAGRAM_ERROR:
typ = "DATAGRAM ERROR";
break;
case DATAGRAM_QUERY:
typ = "DATAGRAM QUERY";
break;
case BROADCAST:
typ = "BROADCAST";
break;
case POSITIVE_RESP:
typ = "POSITIVE RESP";
break;
case NEGATIVE_RESP:
typ = "NEGATIVE RESP";
break;
default:
typ = "UNKNOWN";
break;
}
// Return the message type string
return typ;
}
/**
* Send a datagram to the specified NetBIOS name using the global NetBIOS datagram socket
*
* @param dgramTyp Datagram type
* @param fromName From NetBIOS name
* @param fromNameTyp From NetBIOS name type.
* @param toName To NetBIOS name
* @param toNameType To NetBIOS name type.
* @param userData User data buffer
* @param userLen User data length.
* @param userOff Offset of data within user buffer.
* @param addr Address to send to
* @param port Port to send to
* @exception java.io.IOException Error occurred sending datagram
* @exception UnknownHostException Failed to generate the broadcast mask for the network
*/
public final void SendDatagram(int dgramTyp, String fromName, char fromNameType, String toName, char toNameType,
byte[] userData, int userLen, int userOff, InetAddress addr, int port) throws IOException,
UnknownHostException
{
// Set the datagram header values
setMessageType(dgramTyp);
setSourceName(fromName, fromNameType);
setDestinationName(toName, toNameType);
setSourcePort(RFCNetBIOSProtocol.DATAGRAM);
setSourceIPAddress(InetAddress.getLocalHost().getAddress());
setFlags(FLG_FIRSTPKT);
if (m_nextId == 0)
m_nextId = (int) (System.currentTimeMillis() & 0x7FFF);
setDatagramId(m_nextId++);
// Set the user data and length
setLength(userLen + NB_USERDATA);
setUserData(userData, userLen, userOff);
// Use the global NetBIOS datagram socket to sent the broadcast datagram
NetBIOSDatagramSocket nbSocket = NetBIOSDatagramSocket.getInstance();
nbSocket.sendDatagram(this, addr, port);
}
/**
* Send a datagram to the specified NetBIOS name using the global NetBIOS datagram socket
*
* @param dgramTyp Datagram type
* @param fromName From NetBIOS name
* @param fromNameTyp From NetBIOS name type.
* @param toName To NetBIOS name
* @param toNameType To NetBIOS name type.
* @param userData User data buffer
* @param userLen User data length.
* @param userOff Offset of data within user buffer.
* @exception java.io.IOException Error occurred sending datagram
* @exception UnknownHostException Failed to generate the broadcast mask for the network
*/
public final void SendDatagram(int dgramTyp, String fromName, char fromNameType, String toName, char toNameType,
byte[] userData, int userLen, int userOff) throws IOException, UnknownHostException
{
// Set the datagram header values
setMessageType(dgramTyp);
setSourceName(fromName, fromNameType);
setDestinationName(toName, toNameType);
setSourcePort(RFCNetBIOSProtocol.DATAGRAM);
setSourceIPAddress(InetAddress.getLocalHost().getAddress());
setFlags(FLG_FIRSTPKT);
if (m_nextId == 0)
m_nextId = (int) (System.currentTimeMillis() & 0x7FFF);
setDatagramId(m_nextId++);
// Set the user data and length
setLength(userLen + NB_USERDATA);
setUserData(userData, userLen, userOff);
// Use the global NetBIOS datagram socket to sent the broadcast datagram
NetBIOSDatagramSocket nbSocket = NetBIOSDatagramSocket.getInstance();
nbSocket.sendBroadcastDatagram(this);
}
/**
* Send a datagram to the specified NetBIOS name using the global NetBIOS datagram socket
*
* @param dgramTyp Datagram type
* @param fromName From NetBIOS name
* @param fromNameTyp From NetBIOS name type.
* @param toName To NetBIOS name
* @param toNameType To NetBIOS name type.
* @param userData User data buffer
* @param userLen User data length.
* @exception java.io.IOException Error occurred sending datagram
* @exception UnknownHostException Failed to generate the broadcast mask for the network
*/
public final void SendDatagram(int dgramTyp, String fromName, String toName, byte[] userData, int userLen)
throws IOException, UnknownHostException
{
// Send the datagram from the standard port
SendDatagram(dgramTyp, fromName, NetBIOSName.FileServer, toName, NetBIOSName.FileServer, userData, userLen, 0);
}
/**
* Send a datagram to the specified NetBIOS name using the supplised datagram socket.
*
* @param dgramTyp Datagram type
* @param sock Datagram socket to use to send the datagram packet.
* @param fromName From NetBIOS name
* @param fromNameTyp From NetBIOS name type.
* @param toName To NetBIOS name
* @param toNameType To NetBIOS name type.
* @param userData User data buffer
* @param userLen User data length.
* @param userOff Offset of data within user buffer.
* @exception java.io.IOException The exception description.
*/
public final void SendDatagram(int dgramTyp, DatagramSocket sock, String fromName, char fromNameType,
String toName, char toNameType, byte[] userData, int userLen, int userOff) throws IOException
{
// Set the datagram header values
setMessageType(dgramTyp);
setSourceName(fromName, fromNameType);
setDestinationName(toName, toNameType);
setSourcePort(RFCNetBIOSProtocol.DATAGRAM);
setSourceIPAddress(InetAddress.getLocalHost().getAddress());
setFlags(FLG_FIRSTPKT);
if (m_nextId == 0)
m_nextId = (int) (System.currentTimeMillis() & 0x7FFF);
setDatagramId(m_nextId++);
// Set the user data and length
setLength(userLen + NB_USERDATA);
setUserData(userData, userLen, userOff);
// Build a broadcast destination address
InetAddress destAddr = InetAddress.getByName(NetworkSettings.GenerateBroadcastMask(null));
DatagramPacket dgram = new DatagramPacket(m_buf, userLen + NB_USERDATA, destAddr, RFCNetBIOSProtocol.DATAGRAM);
// Debug
// HexDump.Dump( m_buf, userLen + NB_USERDATA, 0);
// Send the datagram
sock.send(dgram);
}
/**
* Send a datagram to the specified NetBIOS name using the supplied datagram socket.
*
* @param fromName java.lang.String
* @param toName java.lang.String
* @param userData byte[]
* @param userLen int
* @exception java.io.IOException The exception description.
*/
public final void SendDatagram(int dgramTyp, DatagramSocket sock, String fromName, String toName, byte[] userData,
int userLen) throws IOException
{
// Send the datagram from the standard port
SendDatagram(dgramTyp, sock, fromName, NetBIOSName.FileServer, toName, NetBIOSName.FileServer, userData,
userLen, 0);
}
/**
* Set the datagram id.
*
* @param id int
*/
public final void setDatagramId(int id)
{
DataPacker.putIntelShort(id, m_buf, NB_DATAGRAMID);
}
/**
* Set the datagram destination name.
*
* @param name java.lang.String
*/
public final void setDestinationName(String name)
{
setDestinationName(name, NetBIOSName.FileServer);
}
/**
* Set the datagram destination name.
*
* @param name java.lang.String
*/
public final void setDestinationName(String name, char typ)
{
// Convert the name to NetBIOS RFC encoded name
NetBIOSSession.EncodeName(name, typ, m_buf, NB_TONAME);
}
/**
* Set the datagram flags value.
*
* @param flg int
*/
public final void setFlags(int flg)
{
m_buf[NB_FLAGS] = (byte) (flg & 0xFF);
}
/**
* Set the datagram length.
*
* @param len int
*/
public final void setLength(int len)
{
DataPacker.putShort((short) len, m_buf, NB_DATAGRAMLEN);
}
/**
* Set the NetBIOS datagram message type.
*
* @param msg int
*/
public final void setMessageType(int msg)
{
m_buf[NB_MSGTYPE] = (byte) (msg & 0xFF);
}
/**
* Set the source IP address for the datagram.
*
* @param ipaddr byte[]
*/
public final void setSourceIPAddress(byte[] ipaddr)
{
// Pack the IP address into the datagram buffer
for (int i = 0; i < 4; i++)
m_buf[NB_SOURCEIP + i] = ipaddr[i];
}
/**
* Set the datagram source NetBIOS name.
*
* @param name java.lang.String
*/
public final void setSourceName(String name)
{
// Convert the name to NetBIOS RFC encoded name
NetBIOSSession.EncodeName(name, NetBIOSName.FileServer, m_buf, NB_FROMNAME);
}
/**
* Set the datagram source NetBIOS name.
*
* @param name java.lang.String
*/
public final void setSourceName(String name, char typ)
{
// Convert the name to NetBIOS RFC encoded name
NetBIOSSession.EncodeName(name, typ, m_buf, NB_FROMNAME);
}
/**
* Set the source port/socket for the datagram.
*
* @param port int
*/
public final void setSourcePort(int port)
{
DataPacker.putShort((short) port, m_buf, NB_SOURCEPORT);
}
/**
* Set the user data portion of the datagram.
*
* @param buf byte[]
* @param len int
*/
public final void setUserData(byte[] buf, int len)
{
// Copy the user data
System.arraycopy(buf, 0, m_buf, NB_USERDATA, len);
}
/**
* Set the user data portion of the datagram.
*
* @param buf User data buffer
* @param len Length of user data
* @param off Offset to start of data within buffer.
*/
public final void setUserData(byte[] buf, int len, int off)
{
// Copy the user data
System.arraycopy(buf, off, m_buf, NB_USERDATA, len);
}
/**
* Common constructor initialization code.
*/
protected final void CommonInit()
{
}
}

Some files were not shown because too many files have changed in this diff Show More