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


Java JavaBehaviour类代码示例

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


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

示例1: init

import org.alfresco.repo.policy.JavaBehaviour; //导入依赖的package包/类
public void init()
{
    PropertyCheck.mandatory(this, "diskInterface", diskInterface);
    PropertyCheck.mandatory(this, "diskSizeInterface", diskSizeInterface);
    PropertyCheck.mandatory(this, "ioctltInterface", ioctlInterface);
    PropertyCheck.mandatory(this, "fileInfoCache", fileInfoCache);
    PropertyCheck.mandatory(this, "fileLockingInterface", getFileLockingInterface());
    PropertyCheck.mandatory(this, "opLockInterface", getOpLockInterface());
    PropertyCheck.mandatory(this, "fileLockingInterface", fileLockingInterface);
    PropertyCheck.mandatory(this, "policyComponent", getPolicyComponent());
    
    getPolicyComponent().bindClassBehaviour( NodeServicePolicies.OnDeleteNodePolicy.QNAME,
            this, new JavaBehaviour(this, "onDeleteNode"));   
    getPolicyComponent().bindClassBehaviour( NodeServicePolicies.OnMoveNodePolicy.QNAME,
            this, new JavaBehaviour(this, "onMoveNode"));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:17,代码来源:BufferedContentDiskDriver.java

示例2: init

import org.alfresco.repo.policy.JavaBehaviour; //导入依赖的package包/类
public void init()
{
    policyComponent.bindClassBehaviour(QName.createQName(NamespaceService.ALFRESCO_URI, "onMoveNode"), ContentModel.TYPE_BASE, new JavaBehaviour(this, "onMoveNode"));
    
    policyComponent.bindClassBehaviour(QName.createQName(NamespaceService.ALFRESCO_URI, "onCreateChildAssociation"), ContentModel.TYPE_AUTHORITY_CONTAINER, new JavaBehaviour(this, "onCreateChildAssociation"));
    policyComponent.bindClassBehaviour(QName.createQName(NamespaceService.ALFRESCO_URI, "beforeDeleteChildAssociation"), ContentModel.TYPE_AUTHORITY_CONTAINER, new JavaBehaviour(this, "beforeDeleteChildAssociation"));
    
    onGrantLocalPermissionDelegate = policyComponent.registerClassPolicy(PermissionServicePolicies.OnGrantLocalPermission.class);
    onRevokeLocalPermissionDelegate = policyComponent.registerClassPolicy(PermissionServicePolicies.OnRevokeLocalPermission.class);
    onInheritPermissionsEnabledDelegate = policyComponent.registerClassPolicy(PermissionServicePolicies.OnInheritPermissionsEnabled.class);
    onInheritPermissionsDisabledDelegate = policyComponent.registerClassPolicy(PermissionServicePolicies.OnInheritPermissionsDisabled.class);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:13,代码来源:PermissionServiceImpl.java

示例3: afterPropertiesSet

import org.alfresco.repo.policy.JavaBehaviour; //导入依赖的package包/类
public void afterPropertiesSet() throws Exception
{
    this.policyComponent.bindClassBehaviour(
            OnUpdatePropertiesPolicy.QNAME,
            ContentModel.TYPE_PERSON,
            new JavaBehaviour(this, "onUpdateProperties"));
    this.policyComponent.bindClassBehaviour(
            BeforeDeleteNodePolicy.QNAME,
            ContentModel.TYPE_USER,
            new JavaBehaviour(this, "beforeDeleteNode"));
    this.policyComponent.bindClassBehaviour(
    		OnUpdatePropertiesPolicy.QNAME,
            ContentModel.TYPE_USER,
            new JavaBehaviour(this, "onUpdateUserProperties"));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:16,代码来源:RepositoryAuthenticationDao.java

示例4: init

import org.alfresco.repo.policy.JavaBehaviour; //导入依赖的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

示例5: init

import org.alfresco.repo.policy.JavaBehaviour; //导入依赖的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

示例6: init

import org.alfresco.repo.policy.JavaBehaviour; //导入依赖的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

示例7: onBootstrap

import org.alfresco.repo.policy.JavaBehaviour; //导入依赖的package包/类
@Override
protected void onBootstrap(ApplicationEvent event)
{
    this.policyComponent.bindClassBehaviour(
            BeforePurgeNodePolicy.QNAME,
            SiteModel.TYPE_SITE,
            new JavaBehaviour(this, "beforePurgeNode"));
    this.policyComponent.bindClassBehaviour(
            OnRestoreNodePolicy.QNAME,
            SiteModel.TYPE_SITE,
            new JavaBehaviour(this, "onRestoreNode"));
    this.policyComponent.bindClassBehaviour(
            BeforeRestoreArchivedNodePolicy.QNAME,
            SiteModel.TYPE_SITE,
            new JavaBehaviour(this, "beforeRestoreArchivedNode"));
    this.policyComponent.bindClassBehaviour(
            OnRestoreArchivedNodePolicy.QNAME,
            SiteModel.TYPE_SITE,
            new JavaBehaviour(this, "onRestoreArchivedNode"));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:21,代码来源:SiteServiceImpl.java

示例8: init

import org.alfresco.repo.policy.JavaBehaviour; //导入依赖的package包/类
/**
 * Initialise method
 */
public void init()
{
    this.policyComponent.bindClassBehaviour(
            OnUpdatePropertiesPolicy.QNAME,
            ForumModel.ASPECT_COMMENTS_ROLLUP,
            new JavaBehaviour(this, "onUpdateProperties"));
    this.policyComponent.bindClassBehaviour(
            OnCreateNodePolicy.QNAME,
            ForumModel.TYPE_POST,
            new JavaBehaviour(this, "onCreateNode"));
    this.policyComponent.bindClassBehaviour(
            BeforeDeleteNodePolicy.QNAME,
            ForumModel.TYPE_POST,
            new JavaBehaviour(this, "beforeDeleteNode"));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:19,代码来源:ForumPostBehaviours.java

示例9: init

import org.alfresco.repo.policy.JavaBehaviour; //导入依赖的package包/类
/**
 * Initialise method
 */
public void init()
{
    // All forum-related copy behaviour uses the same copy callback
    this.policyComponent.bindClassBehaviour(
    QName.createQName(NamespaceService.ALFRESCO_URI, "onAddAspect"),
            ForumModel.ASPECT_DISCUSSABLE,
            new JavaBehaviour(this, "onAddAspect"));
    this.policyComponent.bindClassBehaviour(
            QName.createQName(NamespaceService.ALFRESCO_URI, "getCopyCallback"),
            ForumModel.ASPECT_DISCUSSABLE,
            new JavaBehaviour(this, "getCopyCallback"));
    this.policyComponent.bindClassBehaviour(
            QName.createQName(NamespaceService.ALFRESCO_URI, "onCopyComplete"),
            ForumModel.ASPECT_DISCUSSABLE,
            new JavaBehaviour(this, "onCopyComplete"));
    this.policyComponent.bindClassBehaviour(
            AfterVersionRevertPolicy.QNAME,
            ContentModel.ASPECT_VERSIONABLE,
            new JavaBehaviour(this, "afterVersionRevert"));           
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:24,代码来源:DiscussableAspect.java

示例10: init

import org.alfresco.repo.policy.JavaBehaviour; //导入依赖的package包/类
/**
 * Init method.  Registered behaviours.
 */
public void init()
{  
    PropertyCheck.mandatory(this, "actionService", getActionService());
    PropertyCheck.mandatory(this, "policyComponent", getPolicyComponent());
    
    /**
     * Bind policies
     */
    this.getPolicyComponent().bindClassBehaviour(OnAddAspectPolicy.QNAME, 
        ImapModel.ASPECT_IMAP_CONTENT, 
        new JavaBehaviour(this, "onAddAspect", NotificationFrequency.TRANSACTION_COMMIT));
    
    /**
     * Bind policies
     */
    this.getPolicyComponent().bindClassBehaviour(OnCopyNodePolicy.QNAME , 
        ImapModel.ASPECT_IMAP_CONTENT, 
        new JavaBehaviour(this, "getCopyCallback", NotificationFrequency.EVERY_EVENT));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:23,代码来源:ImapContentPolicy.java

示例11: init

import org.alfresco.repo.policy.JavaBehaviour; //导入依赖的package包/类
/**
 * Initialise the Multilingual Aspect
 *
 * Ensures that the {@link ContentModel#ASPECT_MULTILINGUAL_DOCUMENT ml document aspect}
 */
public void init()
{
    this.policyComponent.bindClassBehaviour(
            CopyServicePolicies.OnCopyNodePolicy.QNAME,
            ContentModel.ASPECT_MULTILINGUAL_DOCUMENT,
            new JavaBehaviour(this, "getCopyCallback"));

    this.policyComponent.bindAssociationBehaviour(
            NodeServicePolicies.BeforeDeleteChildAssociationPolicy.QNAME,
            ContentModel.TYPE_MULTILINGUAL_CONTAINER,
            ContentModel.ASSOC_MULTILINGUAL_CHILD,
            new JavaBehaviour(this, "beforeDeleteChildAssociation"));

    this.policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnUpdatePropertiesPolicy.QNAME,
            ContentModel.ASPECT_MULTILINGUAL_DOCUMENT,
            new JavaBehaviour(this, "onUpdateProperties"));

}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:25,代码来源:MultilingualDocumentAspect.java

示例12: init

import org.alfresco.repo.policy.JavaBehaviour; //导入依赖的package包/类
/**
 * Service initialise 
 */
public void init()
{
    // Set up a temporary store
    this.tempStore = new FileContentStore(this.applicationContext, TempFileProvider.getTempDir().getAbsolutePath());

    // Bind on update properties behaviour
    this.policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnUpdatePropertiesPolicy.QNAME,
            this,
            new JavaBehaviour(this, "onUpdateProperties"));
    
    // Register on content update policy
    this.onContentUpdateDelegate = this.policyComponent.registerClassPolicy(OnContentUpdatePolicy.class);
    this.onContentPropertyUpdateDelegate = this.policyComponent.registerClassPolicy(OnContentPropertyUpdatePolicy.class);
    this.onContentReadDelegate = this.policyComponent.registerClassPolicy(OnContentReadPolicy.class);
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:20,代码来源:ContentServiceImpl.java

示例13: init

import org.alfresco.repo.policy.JavaBehaviour; //导入依赖的package包/类
/**
 * The initialise method     
 */
public void init()
{
    // Register interest in the onContentUpdate policy for the workflow definition type
    policyComponent.bindClassBehaviour(
            ContentServicePolicies.OnContentUpdatePolicy.QNAME, 
            WorkflowModel.TYPE_WORKFLOW_DEF, 
            new JavaBehaviour(this, "onContentUpdate"));
    
    // Register interest in the onPropertyUpdate policy for the workflow definition type
    policyComponent.bindClassBehaviour(
            QName.createQName(NamespaceService.ALFRESCO_URI, "onUpdateProperties"), 
            WorkflowModel.TYPE_WORKFLOW_DEF, 
            new JavaBehaviour(this, "onUpdateProperties"));
    
    // Register interest in the node delete policy
    policyComponent.bindClassBehaviour(
            QName.createQName(NamespaceService.ALFRESCO_URI, "beforeDeleteNode"), 
            WorkflowModel.TYPE_WORKFLOW_DEF, 
            new JavaBehaviour(this, "beforeDeleteNode"));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:24,代码来源:WorkflowDefinitionType.java

示例14: registerRuleTrigger

import org.alfresco.repo.policy.JavaBehaviour; //导入依赖的package包/类
/**
 * @see org.alfresco.repo.rule.ruletrigger.RuleTrigger#registerRuleTrigger()
 */
public void registerRuleTrigger()
{
	if (isClassBehaviour == true)
	{
		this.policyComponent.bindClassBehaviour(
				QName.createQName(NamespaceService.ALFRESCO_URI, POLICY), 
				this, 
				new JavaBehaviour(this, POLICY));
	}
	else
	{
		this.policyComponent.bindAssociationBehaviour(
				QName.createQName(NamespaceService.ALFRESCO_URI, POLICY), 
				this, 
				new JavaBehaviour(this, POLICY));
	}

       this.policyComponent.bindClassBehaviour(
               NodeServicePolicies.BeforeMoveNodePolicy.QNAME,
               this,
               new JavaBehaviour(this, NodeServicePolicies.BeforeMoveNodePolicy.QNAME.getLocalName()));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:26,代码来源:BeforeDeleteChildAssociationRuleTrigger.java

示例15: registerRuleTrigger

import org.alfresco.repo.policy.JavaBehaviour; //导入依赖的package包/类
/**
 * @see org.alfresco.repo.rule.ruletrigger.RuleTrigger#registerRuleTrigger()
 */
public void registerRuleTrigger()
{
	if (isClassBehaviour == true)
	{
		this.policyComponent.bindClassBehaviour(
				QName.createQName(NamespaceService.ALFRESCO_URI, POLICY_NAME), 
				this, 
				new JavaBehaviour(this, POLICY_NAME));
	}
	else
	{		
		this.policyComponent.bindAssociationBehaviour(
				QName.createQName(NamespaceService.ALFRESCO_URI, POLICY_NAME), 
				this, 
				new JavaBehaviour(this, POLICY_NAME));
	}
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:21,代码来源:OnCreateChildAssociationRuleTrigger.java


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