无法更新alfresco中的自定义属性方面

时间:2014-12-30 03:51:35

标签: alfresco

我在将方面添加到Alfresco Share中所需的文件夹时遇到问题( Alfresco 4.2 )。当我单击“管理方面”时,选择所需的方面,然后单击“保存”,弹出一条消息“无法更新方面”。 任何帮助将不胜感激。

谢谢..

份额-CONFIG-custom.xml

     <aspects>
     <!-- Aspects that a user can see -->
     <visible>
        <aspect name="cm:generalclassifiable" />
        <aspect name="cm:complianceable" />
        <aspect name="cm:dublincore" />
        <aspect name="cm:effectivity" />
        <aspect name="cm:summarizable" />
        <aspect name="cm:versionable" />
        <aspect name="cm:templatable" />
        <aspect name="cm:emailed" />
        <aspect name="emailserver:aliasable" />
        <aspect name="cm:taggable" />
        <aspect name="app:inlineeditable" />
        <aspect name="gd:googleEditable" />
        <aspect name="cm:geographic" />
        <aspect name="exif:exif" />
        <aspect name="audio:audio" />
        <aspect name="cm:indexControl" />
        <aspect name="dp:restrictable" />
        <aspect name="kb:referencable" />
     </visible>

     <!-- Aspects that a user can add. Same as "visible" if left empty -->
     <addable>
     </addable>

     <!-- Aspects that a user can remove. Same as "visible" if left empty -->
     <removeable>
     </removeable>
    </aspects>

自定义-弹弓应用context.xml.sample

 <bean id="webscripts.kb.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
  <property name="resourceBundles">
     <list>
        <value>alfresco.messages.knowledgebase</value>
     </list>
  </property>
 </bean>

网络的客户端-CONFIG-custom.xml.sample

<config evaluator="aspect-name" condition="kb:referencable">
     <property-sheet>
         <show-property name="kb:documentRef"/>
    </property-sheet>
</config>
<config evaluator="string-compare" condition="Action Wizards">
    <aspects>
        <aspect name="my:docProps" />
    </aspects>
</config>

KB-model.xml

<aspects>
  <!-- Definition of new Content Aspect: Knowledge Base Document -->
  <aspect name="kb:referencable">
     <title>Knowledge Base Referencable</title>
     <properties>
        <property name="kb:documentRef">
           <type>d:text</type>
        </property>
     </properties>
  </aspect>
 </aspects>

KB-模型context.xml中

<?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.kb.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
    <property name="models">
        <list>
            <value>alfresco/extension/kb-model.xml</value>
        </list>
    </property>
</bean>

 <bean id="extension.kb.resourceBundle"   class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
   <property name="resourceBundles">
      <list>
         <value>alfresco.messages.knowledgebase</value>
      </list>
   </property>
</bean>
</beans>

1 个答案:

答案 0 :(得分:2)

在Alfresco中创建方面有三个主要文件处理方面。

1.Model文件您在其中定义方面。

2.Context文件(从中注入模型文件)

3.在share-config-custom中添加可见性方面(如果露天版本为&lt; 5.0b,则为web-client配置)

以上所有的例子如下。

模型文件

<?xml version="1.0" encoding="UTF-8"?>
<model name="model1:ExtensionModel"  xmlns="http://www.alfresco.org/model/dictionary/1.0" >
    <description>Extension model</description>
    <author>Krutik Jayswal</author>
    <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.model.com/model/model/1.0" prefix="m1"/>
    </namespaces>
    <data-types/>
    <constraints/>
    <aspects>
        <aspect name="m1:metadata1">
            <title>Meta data 1</title>
            <properties>
                <property name="m1:Solution">
                    <title>Solution</title>
                    <type>d:text</type>
                    <mandatory>false</mandatory>
                    <index enabled="true">
                        <atomic>true</atomic>
                        <stored>true</stored>
                        <tokenised>TRUE</tokenised>
                    </index>
                </property>
            </properties>
        </aspect>
    </aspects>
</model>

上下文文件

<?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" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
            <property name="models">
                <list>
                    <value>alfresco/extension/extCustomModel.xml</value><!--This is path till model file.alfresco directory will be inside tomcat/shared classes/**alfresco**-->
                </list>
            </property>
        </bean>

    </beans>

<强>分享-CONFIG-自定义

<config evaluator="string-compare" condition="DocumentLibrary">

         <aspects>

             <visible>

                <aspect name="m1:metadata1" />

             </visible>

         </aspects>

   </config>