当前位置: 首页>>代码示例>>Java>>正文


Java Behaviour类代码示例

本文整理汇总了Java中org.alfresco.repo.policy.Behaviour的典型用法代码示例。如果您正苦于以下问题:Java Behaviour类的具体用法?Java Behaviour怎么用?Java Behaviour使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Behaviour类属于org.alfresco.repo.policy包,在下文中一共展示了Behaviour类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
/**
 * Registers to listen for events of interest.
 * @since 3.5.0
 */
public void init()
{
    policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnCreateNodePolicy.QNAME,
            ContentModel.TYPE_THUMBNAIL,
            new JavaBehaviour(this, "onCreateNode", Behaviour.NotificationFrequency.EVERY_EVENT));
    policyComponent.bindClassBehaviour(
            NodeServicePolicies.BeforeCreateNodePolicy.QNAME,
            ContentModel.TYPE_FAILED_THUMBNAIL,
            new JavaBehaviour(this, "beforeCreateNode", Behaviour.NotificationFrequency.EVERY_EVENT));
    policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnDeleteNodePolicy.QNAME,
            ContentModel.TYPE_THUMBNAIL,
            new JavaBehaviour(this, "onDeleteNode", Behaviour.NotificationFrequency.EVERY_EVENT));

    // Register copy class behaviour
    this.policyComponent.bindClassBehaviour(
            CopyServicePolicies.OnCopyNodePolicy.QNAME,
            ContentModel.ASPECT_THUMBNAIL_MODIFICATION,
            new JavaBehaviour(this, "getCopyCallback"));

    transactionListener = new ThumbnailTransactionListenerAdapter();
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:28,代码来源:ThumbnailServiceImpl.java

示例2: init

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
/**
 * Initialise method
 */
public void init()
{
    this.policyComponent.bindClassBehaviour(
            OnDeleteNodePolicy.QNAME, 
            ContentModel.TYPE_FAILED_THUMBNAIL, 
            new JavaBehaviour(this, "onDeleteNode", Behaviour.NotificationFrequency.EVERY_EVENT));
    this.policyComponent.bindClassBehaviour(
            OnContentUpdatePolicy.QNAME, 
            ContentModel.ASPECT_FAILED_THUMBNAIL_SOURCE, 
            new JavaBehaviour(this, "onContentUpdate", Behaviour.NotificationFrequency.TRANSACTION_COMMIT));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:15,代码来源:FailedThumbnailSourceAspect.java

示例3: init

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
/**
 * Initialise method
 */
public void init()
{
    this.policyComponent.bindClassBehaviour(OnMoveNodePolicy.QNAME, 
            SiteModel.TYPE_SITE, 
            new JavaBehaviour(this, "onMoveNode", Behaviour.NotificationFrequency.EVERY_EVENT));
    
    this.policyComponent.bindClassBehaviour(OnMoveNodePolicy.QNAME,
            SiteModel.ASPECT_SITE_CONTAINER,
            new JavaBehaviour(this, "onMoveNode", Behaviour.NotificationFrequency.EVERY_EVENT));
    
    this.policyComponent.bindClassBehaviour(OnUpdatePropertiesPolicy.QNAME, 
            SiteModel.TYPE_SITE, 
            new JavaBehaviour(this, "onUpdateProperties", Behaviour.NotificationFrequency.EVERY_EVENT));
    
    this.policyComponent.bindClassBehaviour(OnUpdatePropertiesPolicy.QNAME,
            SiteModel.ASPECT_SITE_CONTAINER,
            new JavaBehaviour(this, "onUpdateProperties", Behaviour.NotificationFrequency.EVERY_EVENT));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:22,代码来源:SiteAspect.java

示例4: init

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
/**
 * Initialise method
 */
public void init()
{
    // need to listen to:
    // invokeOnCreateChildAssociation(newParentAssocRef, false);
    // invokeOnDeleteChildAssociation(oldParentAssocRef);
    // invokeOnMoveNode(oldParentAssocRef, newParentAssocRef); 
    // categories affect paths via membership (not paths beneath nodes that are categories) 
    // - only changing category structure requires a cascade not changing a node's on a categories
    
    this.policyComponent.bindAssociationBehaviour(OnCreateChildAssociationPolicy.QNAME,
            ContentModel.TYPE_BASE,
            new JavaBehaviour(this, "onCreateChildAssociation", Behaviour.NotificationFrequency.EVERY_EVENT));
    this.policyComponent.bindAssociationBehaviour(OnDeleteChildAssociationPolicy.QNAME,
            ContentModel.TYPE_BASE,
            new JavaBehaviour(this, "onDeleteChildAssociation", Behaviour.NotificationFrequency.EVERY_EVENT));
    this.policyComponent.bindClassBehaviour(OnMoveNodePolicy.QNAME,
            ContentModel.TYPE_BASE,
            new JavaBehaviour(this, "onMoveNode", Behaviour.NotificationFrequency.EVERY_EVENT));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:23,代码来源:CascadeUpdateAspect.java

示例5: init

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
/**
 * Registers to listen for events of interest.
 * @since 3.5.0
 */
public void init()
{
    policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnCreateNodePolicy.QNAME,
            ContentModel.TYPE_THUMBNAIL,
            new JavaBehaviour(this, "onCreateNode", Behaviour.NotificationFrequency.EVERY_EVENT));
    policyComponent.bindClassBehaviour(
            NodeServicePolicies.BeforeCreateNodePolicy.QNAME,
            ContentModel.TYPE_FAILED_THUMBNAIL,
            new JavaBehaviour(this, "beforeCreateNode", Behaviour.NotificationFrequency.EVERY_EVENT));
    policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnDeleteNodePolicy.QNAME,
            ContentModel.TYPE_THUMBNAIL,
            new JavaBehaviour(this, "onDeleteNode", Behaviour.NotificationFrequency.EVERY_EVENT));

    transactionListener = new ThumbnailTransactionListenerAdapter();
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:22,代码来源:ThumbnailServiceImpl.java

示例6: before

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Before
@Override
public void before() throws Exception
{
    super.before();

    nonStandardFilePlanComponent = generateNodeRef(TYPE_RECORD_CATEGORY);
    nonStandardFilePlan = generateNodeRef(TYPE_MY_FILE_PLAN);

    // set-up node service
    when(mockedNodeService.getProperty(nonStandardFilePlanComponent, PROP_ROOT_NODEREF)).thenReturn(nonStandardFilePlan);

    // set-up dictionary service
    when(mockedDictionaryService.getAllAspects()).thenReturn(CollectionUtils.EMPTY_COLLECTION);
    
    // mock up getting behaviours
    when(recordService.getBehaviour(any(String.class))).thenReturn(mock(Behaviour.class));
}
 
开发者ID:Alfresco,项目名称:records-management-old,代码行数:20,代码来源:RecordServiceImplUnitTest.java

示例7: init

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
/**
 * Initialise method
 */
public void init()
{
    this.policyComponent.bindClassBehaviour(
            QName.createQName(NamespaceService.ALFRESCO_URI, "onUpdateProperties"), 
            RenditionModel.ASPECT_RENDITIONED, 
            new JavaBehaviour(this, "onUpdateProperties", Behaviour.NotificationFrequency.EVERY_EVENT));
    this.policyComponent.bindClassBehaviour(
            QName.createQName(NamespaceService.ALFRESCO_URI, "getCopyCallback"), 
            RenditionModel.ASPECT_RENDITIONED, 
            new JavaBehaviour(this, "getCopyCallback"));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:15,代码来源:RenditionedAspect.java

示例8: init

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
/**
 * Initialise method
 */
public void init()
{
    this.policyComponent.bindClassBehaviour(BeforeMoveNodePolicy.QNAME,
            ContentModel.ASPECT_UNMOVABLE,
            new JavaBehaviour(this, "beforeMoveNode", Behaviour.NotificationFrequency.EVERY_EVENT));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:10,代码来源:UnmovableAspect.java

示例9: init

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
/**
 * Initialise method
 */
public void init()
{
    this.policyComponent.bindClassBehaviour(BeforeDeleteNodePolicy.QNAME,
            ContentModel.ASPECT_UNDELETABLE,
            new JavaBehaviour(this, "beforeDeleteNode", Behaviour.NotificationFrequency.EVERY_EVENT));

    policyComponent.bindClassBehaviour(
            QName.createQName(NamespaceService.ALFRESCO_URI, "getCopyCallback"),
            ContentModel.ASPECT_UNDELETABLE,
            new JavaBehaviour(this, "getCopyCallback"));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:15,代码来源:UndeletableAspect.java

示例10: init

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
/**
 * Initialise method
 */
public void init()
{
    this.policyComponent.bindClassBehaviour(BeforeDeleteNodePolicy.QNAME,
            ContentModel.ASPECT_UNDELETABLE,
            new JavaBehaviour(this, "beforeDeleteNode", Behaviour.NotificationFrequency.EVERY_EVENT));
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:10,代码来源:UndeletableAspect.java

示例11: init

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
/**
 * Initialize this behaviour component, binding class behaviour.
 */
public void init() {
	
    this.onAddAspect = new JavaBehaviour(this, "onAddAspect", Behaviour.NotificationFrequency.TRANSACTION_COMMIT);
    
    // when the aspect is initially added, extract the unused sig fields
    this.policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnAddAspectPolicy.QNAME,
            CounterSignSignatureModel.ASPECT_SIGNABLE,
            this.onAddAspect);
}
 
开发者ID:ntmcminn,项目名称:CounterSign,代码行数:14,代码来源:SignableDocumentBehavior.java

示例12: init

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
/**
 * Initialise the versionable aspect policies
 */
public void init()
{
    this.policyComponent.bindClassBehaviour(
            QName.createQName(NamespaceService.ALFRESCO_URI, "beforeAddAspect"),
            ContentModel.ASPECT_VERSIONABLE,
            new JavaBehaviour(this, "beforeAddAspect", Behaviour.NotificationFrequency.EVERY_EVENT));

    this.policyComponent.bindClassBehaviour(
            QName.createQName(NamespaceService.ALFRESCO_URI, "onAddAspect"),
            ContentModel.ASPECT_VERSIONABLE,
            new JavaBehaviour(this, "onAddAspect", Behaviour.NotificationFrequency.TRANSACTION_COMMIT));
            
    this.policyComponent.bindClassBehaviour(
            QName.createQName(NamespaceService.ALFRESCO_URI, "onRemoveAspect"),
            ContentModel.ASPECT_VERSIONABLE,
            new JavaBehaviour(this, "onRemoveAspect", Behaviour.NotificationFrequency.TRANSACTION_COMMIT));
    
    this.policyComponent.bindClassBehaviour(
            QName.createQName(NamespaceService.ALFRESCO_URI, "onDeleteNode"),
            ContentModel.ASPECT_VERSIONABLE, 
            new JavaBehaviour(this, "onDeleteNode", Behaviour.NotificationFrequency.TRANSACTION_COMMIT));
    
    this.policyComponent.bindClassBehaviour(
            QName.createQName(NamespaceService.ALFRESCO_URI, "afterCreateVersion"),
            ContentModel.ASPECT_VERSIONABLE,
            new JavaBehaviour(this, "afterCreateVersion", Behaviour.NotificationFrequency.EVERY_EVENT));
    
    this.policyComponent.bindClassBehaviour(
            ContentServicePolicies.OnContentUpdatePolicy.QNAME,
            ContentModel.ASPECT_VERSIONABLE,
            new JavaBehaviour(this, "onContentUpdate", Behaviour.NotificationFrequency.TRANSACTION_COMMIT));
    
    onUpdatePropertiesBehaviour = new JavaBehaviour(this, "onUpdateProperties", Behaviour.NotificationFrequency.TRANSACTION_COMMIT);
    this.policyComponent.bindClassBehaviour(
        OnUpdatePropertiesPolicy.QNAME,
        ContentModel.ASPECT_VERSIONABLE,
        onUpdatePropertiesBehaviour);
    
    this.policyComponent.bindClassBehaviour(
            QName.createQName(NamespaceService.ALFRESCO_URI, "getCopyCallback"),
            ContentModel.ASPECT_VERSIONABLE,
            new JavaBehaviour(this, "getCopyCallback"));
    
    this.dictionaryDAO.registerListener(this);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:49,代码来源:VersionableAspect.java

示例13: init

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
public void init() {
	Behaviour onCreateNode = new JavaBehaviour(this, "onCreateNode", NotificationFrequency.TRANSACTION_COMMIT);
	policyComponent.bindClassBehaviour(NodeServicePolicies.OnCreateNodePolicy.QNAME, ContentModel.TYPE_PERSON, onCreateNode);
	transactionListener = new UserCreatedTransactionListener();
}
 
开发者ID:keensoft,项目名称:alfresco-user-space-template,代码行数:6,代码来源:UserHomeFromTemplate.java

示例14: init

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
public void init() {
       policyComponent.bindClassBehaviour(NodeServicePolicies.OnCreateNodePolicy.QNAME, ContentModel.TYPE_CONTENT,
               new JavaBehaviour(this, "onCreateNode", Behaviour.NotificationFrequency.TRANSACTION_COMMIT));
}
 
开发者ID:keensoft,项目名称:alfresco-version-by-name,代码行数:5,代码来源:AutoVersionByNameBehaviour.java

示例15: init

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
public void init() {
    policyComponent.bindClassBehaviour(ContentServicePolicies.OnContentPropertyUpdatePolicy.QNAME, ContentModel.TYPE_CONTENT, 
    		new JavaBehaviour(this, "onContentPropertyUpdate", Behaviour.NotificationFrequency.EVERY_EVENT));
}
 
开发者ID:keensoft,项目名称:alfresco-mimetype-blocker,代码行数:5,代码来源:MimeTypeBlockerBehaviour.java


注:本文中的org.alfresco.repo.policy.Behaviour类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。