• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Behaviour类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: registerBehaviour

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
/**
 * Register a behaviour against a given name.
 *
 * @param behaviour behaviour
 */
void registerBehaviour(String name, Behaviour behaviour);
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:7,代码来源:BehaviourRegistry.java


示例17: getBehaviour

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
/**
 * Gets the behaviour for a given name.
 *
 * @param name                  behaviour name
 * @return {@link Behaviour}    behaviour, null otherwise
 */
Behaviour getBehaviour(String name);
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:8,代码来源:BehaviourRegistry.java


示例18: setBehaviour

import org.alfresco.repo.policy.Behaviour; //导入依赖的package包/类
/**
 * Set the behaviour
 * 
 * @param behaviour	the behaviour
 */
public void setBehaviour(Behaviour behaviour) 
{
	this.behaviour = behaviour;
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:10,代码来源:PolicyRegistration.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Operation类代码示例发布时间:2022-05-22
下一篇:
Java APManager类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap