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

Java NodeServicePolicies类代码示例

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

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



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

示例1: init

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


示例3: init

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


示例4: init

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


示例5: registerRuleTrigger

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


示例6: init

import org.alfresco.repo.node.NodeServicePolicies; //导入依赖的package包/类
/**
 * The initialise method. Register our policies.
 */
public void init()
{
    checkMandatoryProperties();

    // Register interest in the beforeDeleteNode policy - note: currently for content only !!
    policyComponent.bindClassBehaviour(
            QName.createQName(NamespaceService.ALFRESCO_URI, "beforeDeleteNode"),
            ContentModel.TYPE_CONTENT,
            new JavaBehaviour(this, "beforeDeleteNode"));
    
    //Register interest in the onCopyNodePolicy to block copying of quick share metadta
    policyComponent.bindClassBehaviour(
                CopyServicePolicies.OnCopyNodePolicy.QNAME, 
                QuickShareModel.ASPECT_QSHARE, 
                new JavaBehaviour(this, "getCopyCallback"));

    this.policyComponent.bindClassBehaviour(
                NodeServicePolicies.OnRestoreNodePolicy.QNAME,
                QuickShareModel.ASPECT_QSHARE,
                new JavaBehaviour(this, "onRestoreNode"));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:25,代码来源:QuickShareServiceImpl.java


示例7: test2ClasspathLocationBehaviour

import org.alfresco.repo.node.NodeServicePolicies; //导入依赖的package包/类
public void test2ClasspathLocationBehaviour()
{
	// Register the onCreateNode behaviour script
	ScriptLocation location = new ClasspathScriptLocation("org/alfresco/repo/jscript/test_onCreateNode_cmContent.js");
	ScriptBehaviour behaviour = new ScriptBehaviour(this.serviceRegistry, location);
	
	this.policyComponent.bindClassBehaviour(
			QName.createQName(NodeServicePolicies.OnCreateNodePolicy.NAMESPACE, "onCreateNode"),
			ContentModel.TYPE_CONTENT,
			behaviour);
	
	// Create a content node
	Map<QName, Serializable> props = new HashMap<QName, Serializable>(1);
	props.put(ContentModel.PROP_NAME, "myDoc.txt");
	ChildAssociationRef childAssoc = this.nodeService.createNode(
			this.folderNodeRef,
			ContentModel.ASSOC_CONTAINS,
			QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "myDoc.txt"),
			ContentModel.TYPE_CONTENT,
			props);
	
	// Since the behavoiour will have been run check that the titled aspect has been applied
	assertTrue(this.nodeService.hasAspect(childAssoc.getChildRef(), ContentModel.ASPECT_TITLED));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:25,代码来源:ScriptBehaviourTest.java


示例8: init

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


示例9: init

import org.alfresco.repo.node.NodeServicePolicies; //导入依赖的package包/类
/**
 * Initialisation method
 */
public void init()
{
    getPolicyComponent().bindClassBehaviour(
            NodeServicePolicies.OnAddAspectPolicy.QNAME,
            ASPECT_RECORD,
            new JavaBehaviour(this, "onAddRecord", TRANSACTION_COMMIT));
    getPolicyComponent().bindClassBehaviour(
            NodeServicePolicies.OnMoveNodePolicy.QNAME,
            ASPECT_RECORD,
            new JavaBehaviour(this, "onMoveRecord", TRANSACTION_COMMIT));
    getPolicyComponent().bindClassBehaviour(
            NodeServicePolicies.OnMoveNodePolicy.QNAME,
            TYPE_RECORD_CATEGORY,
            new JavaBehaviour(this, "onMoveNode", TRANSACTION_COMMIT));
}
 
开发者ID:Alfresco,项目名称:records-management-old,代码行数:19,代码来源:FilePlanPermissionServiceImpl.java


示例10: init

import org.alfresco.repo.node.NodeServicePolicies; //导入依赖的package包/类
/**
 * Init method
 */
public void init()
{
    // bind policies
    beforeFileRecord = policyComponent.registerClassPolicy(BeforeFileRecord.class);
    onFileRecord = policyComponent.registerClassPolicy(OnFileRecord.class);

    // bind behaviours
    policyComponent.bindAssociationBehaviour(
            NodeServicePolicies.OnCreateChildAssociationPolicy.QNAME,
            TYPE_RECORD_FOLDER,
            ContentModel.ASSOC_CONTAINS,
            onCreateChildAssociation);
    policyComponent.bindAssociationBehaviour(
            NodeServicePolicies.BeforeDeleteChildAssociationPolicy.QNAME,
            ContentModel.TYPE_FOLDER,
            ContentModel.ASSOC_CONTAINS,
            onDeleteDeclaredRecordLink);
}
 
开发者ID:Alfresco,项目名称:records-management-old,代码行数:22,代码来源:RecordServiceImpl.java


示例11: init

import org.alfresco.repo.node.NodeServicePolicies; //导入依赖的package包/类
public void init()
{
    PropertyCheck.mandatory(this, "policyComponent", policyComponent);
    PropertyCheck.mandatory(this, "behaviourFilter", behaviourFilter);
    PropertyCheck.mandatory(this, "ruleService", ruleService);
    PropertyCheck.mandatory(this, "nodeService", nodeService);

    this.policyComponent.bindClassBehaviour(
            CopyServicePolicies.OnCopyNodePolicy.QNAME,
            RuleModel.ASPECT_RULES,
            new JavaBehaviour(this, "getCopyCallback"));
    this.policyComponent.bindClassBehaviour(
            CopyServicePolicies.OnCopyCompletePolicy.QNAME,
            RuleModel.ASPECT_RULES,
            new JavaBehaviour(this, "onCopyComplete"));
    this.policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnAddAspectPolicy.QNAME, 
            RuleModel.ASPECT_RULES, 
            new JavaBehaviour(this, "onAddAspect"));
    this.policyComponent.bindClassBehaviour(
            NodeServicePolicies.BeforeRemoveAspectPolicy.QNAME, 
            RuleModel.ASPECT_RULES, 
            new JavaBehaviour(this, "beforeRemoveAspect"));
    this.policyComponent.bindClassBehaviour(
            NodeServicePolicies.BeforeDeleteNodePolicy.QNAME, 
            RuleModel.ASPECT_RULES, 
            new JavaBehaviour(this, "beforeDeleteNode"));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:29,代码来源:RulesAspect.java


示例12: registerRuleTrigger

import org.alfresco.repo.node.NodeServicePolicies; //导入依赖的package包/类
/**
    * {@inheritDoc}
    */
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));
	}	
	
       for (QName ignoreAspect : getIgnoredAspects())
       {
           // Register interest in the addition and removal of the sys:noContent aspect
           this.policyComponent.bindClassBehaviour(
                   NodeServicePolicies.OnAddAspectPolicy.QNAME, 
                   ignoreAspect, 
                   new JavaBehaviour(this, "onAddAspect", NotificationFrequency.EVERY_EVENT));
           this.policyComponent.bindClassBehaviour(
                   NodeServicePolicies.OnRemoveAspectPolicy.QNAME, 
                   ignoreAspect, 
                   new JavaBehaviour(this, "onRemoveAspect", NotificationFrequency.EVERY_EVENT));
       }
   }
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:34,代码来源:CreateNodeRuleTrigger.java


示例13: init

import org.alfresco.repo.node.NodeServicePolicies; //导入依赖的package包/类
/**
 * Initialise method
 */
public void init()
{
    // Register the policies
    onCopyNodeDelegate = policyComponent.registerClassPolicy(CopyServicePolicies.OnCopyNodePolicy.class);
    onCopyCompleteDelegate = policyComponent.registerClassPolicy(CopyServicePolicies.OnCopyCompletePolicy.class);
    beforeCopyDelegate = policyComponent.registerClassPolicy(CopyServicePolicies.BeforeCopyPolicy.class);
    
    // Register policy behaviours
    this.policyComponent.bindAssociationBehaviour(
            NodeServicePolicies.BeforeDeleteAssociationPolicy.QNAME,
            ContentModel.ASPECT_COPIEDFROM,
            ContentModel.ASSOC_ORIGINAL,
            new JavaBehaviour(this, "beforeDeleteOriginalAssociation"));    
    this.policyComponent.bindClassBehaviour(
            CopyServicePolicies.OnCopyNodePolicy.QNAME,
            ContentModel.ASPECT_COPIEDFROM,
            new JavaBehaviour(this, "getCallbackForCopiedFromAspect"));    
    this.policyComponent.bindClassBehaviour(
            CopyServicePolicies.OnCopyNodePolicy.QNAME,
            ContentModel.TYPE_FOLDER,
            new JavaBehaviour(this, "getCallbackForFolderType"));    
    this.policyComponent.bindClassBehaviour(
            CopyServicePolicies.OnCopyNodePolicy.QNAME,
            ContentModel.ASPECT_OWNABLE,
            new JavaBehaviour(this, "getCallbackForOwnableAspect"));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:30,代码来源:CopyServiceImpl.java


示例14: init

import org.alfresco.repo.node.NodeServicePolicies; //导入依赖的package包/类
public void init()
{
    PropertyCheck.mandatory(this, "policyComponent", policyComponent);
    PropertyCheck.mandatory(this, "behaviourFilter", behaviourFilter);
    PropertyCheck.mandatory(this, "ruleService", ruleService);
    PropertyCheck.mandatory(this, "nodeService", nodeService);
    
    this.policyComponent.bindAssociationBehaviour(
            NodeServicePolicies.OnDeleteAssociationPolicy.QNAME,
            ActionModel.TYPE_ACTION_SCHEDULE,
            ActionModel.ASSOC_SCHEDULED_ACTION,
            new JavaBehaviour(this, "onDeleteAssociation"));
    
    this.policyComponent.bindClassBehaviour(
            CopyServicePolicies.OnCopyNodePolicy.QNAME,
            ActionModel.ASPECT_ACTIONS,
            new JavaBehaviour(this, "getCopyCallback"));
    this.policyComponent.bindClassBehaviour(
            CopyServicePolicies.OnCopyCompletePolicy.QNAME,
            ActionModel.ASPECT_ACTIONS,
            new JavaBehaviour(this, "onCopyComplete"));
    
    this.policyComponent.bindClassBehaviour(
            QName.createQName(NamespaceService.ALFRESCO_URI, "onAddAspect"), 
            ActionModel.ASPECT_ACTIONS, 
            new JavaBehaviour(this, "onAddAspect"));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:28,代码来源:ActionsAspect.java


示例15: test1EnableDisableBehaviour

import org.alfresco.repo.node.NodeServicePolicies; //导入依赖的package包/类
public void test1EnableDisableBehaviour()
{
	// Register the onCreateNode behaviour script
	ScriptLocation location = new ClasspathScriptLocation("org/alfresco/repo/jscript/test_onCreateNode_cmContent.js");
	ScriptBehaviour behaviour = new ScriptBehaviour(this.serviceRegistry, location);
	
	this.policyComponent.bindClassBehaviour(
			QName.createQName(NodeServicePolicies.OnCreateNodePolicy.NAMESPACE, "onCreateNode"),
			ContentModel.TYPE_CONTENT,
			behaviour);
	
	behaviour.disable();
	
	// Create a content node
	Map<QName, Serializable> props = new HashMap<QName, Serializable>(1);
	props.put(ContentModel.PROP_NAME, "myDoc.txt");
	ChildAssociationRef childAssoc = this.nodeService.createNode(
			this.folderNodeRef,
			ContentModel.ASSOC_CONTAINS,
			QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "myDoc.txt"),
			ContentModel.TYPE_CONTENT,
			props);
	assertFalse(this.nodeService.hasAspect(childAssoc.getChildRef(), ContentModel.ASPECT_TITLED));
	
	behaviour.enable();
	
	Map<QName, Serializable> props2 = new HashMap<QName, Serializable>(1);
	props2.put(ContentModel.PROP_NAME, "myDoc1.txt");
	ChildAssociationRef childAssoc2 = this.nodeService.createNode(
			this.folderNodeRef,
			ContentModel.ASSOC_CONTAINS,
			QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "myDoc1.txt"),
			ContentModel.TYPE_CONTENT,
			props2);
	assertTrue(this.nodeService.hasAspect(childAssoc2.getChildRef(), ContentModel.ASPECT_TITLED));		
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:37,代码来源:ScriptBehaviourTest.java


示例16: init

import org.alfresco.repo.node.NodeServicePolicies; //导入依赖的package包/类
public void init() {
	// policyComponent.bindClassBehaviour(NodeServicePolicies.OnUpdateNodePolicy.QNAME,
	// ASPECT_NOTIFY, new JavaBehaviour(this,
	// "onUpdateNode"));
	policyComponent.bindClassBehaviour(NodeServicePolicies.OnUpdatePropertiesPolicy.QNAME, ASPECT_NOTIFY, new JavaBehaviour(this,
			"onUpdateProperties"));
}
 
开发者ID:shazada,项目名称:cntz-document-notification,代码行数:8,代码来源:NotifyBehaviour.java


示例17: init

import org.alfresco.repo.node.NodeServicePolicies; //导入依赖的package包/类
/**
 * Init method. Binds model behaviours to policies.
 */
public void init()
{
    // Register the association behaviours
    policyComponent.bindClassBehaviour(NodeServicePolicies.OnCreateNodePolicy.QNAME, SiteModel.TYPE_SITE,
            new JavaBehaviour(this, "onCreateNode", NotificationFrequency.TRANSACTION_COMMIT));
}
 
开发者ID:Alfresco,项目名称:community-edition-old,代码行数:10,代码来源:SiteType.java


示例18: init

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


示例19: onBootstrap

import org.alfresco.repo.node.NodeServicePolicies; //导入依赖的package包/类
@Override
protected void onBootstrap(ApplicationEvent event)
{
    // belts-and-braces (in case of broken spring-bean override)
    ApplicationContext ctx = getApplicationContext();
    if (ctx != null)
    {
        if (this.nodeService == null)
        {
            this.nodeService = (NodeService)ctx.getBean("NodeService");
        }
        if (this.contentService == null)
        {
            this.contentService = (ContentService)ctx.getBean("ContentService");
        }
        if (this.siteService == null)
        {
            this.siteService = (SiteService)ctx.getBean("SiteService");
        }
        if (this.activityService == null)
        {
            this.activityService = (ActivityService)ctx.getBean("activityService");
        }
        if (this.cannedQueryRegistry == null)
        {
            this.cannedQueryRegistry = (NamedObjectRegistry<CannedQueryFactory<? extends Object>>)ctx.getBean("commentsCannedQueryRegistry");
        }
        if (this.policyComponent == null)
        {
            this.policyComponent = (PolicyComponent)ctx.getBean("policyComponent");
        }
        if (this.behaviourFilter == null)
        {
            this.behaviourFilter = (BehaviourFilter)ctx.getBean("policyBehaviourFilter");
        }
        if (this.permissionService == null)
        {
            this.permissionService = (PermissionService)ctx.getBean("PermissionService");
        }
        if (this.lockService == null)
        {
            this.lockService = (LockService)ctx.getBean("LockService");
        }
        if (this.dictionaryService == null)
        {
            this.dictionaryService = (DictionaryService)ctx.getBean("DictionaryService");
        }
    }
    
    this.policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnUpdatePropertiesPolicy.QNAME,
            ForumModel.TYPE_POST,
            new JavaBehaviour(this, "onUpdateProperties"));
    this.policyComponent.bindClassBehaviour(
            NodeServicePolicies.BeforeDeleteNodePolicy.QNAME,
            ForumModel.TYPE_POST,
            new JavaBehaviour(this, "beforeDeleteNode"));
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:59,代码来源:CommentServiceImpl.java


示例20: init

import org.alfresco.repo.node.NodeServicePolicies; //导入依赖的package包/类
public void init()
{
    policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnAddAspectPolicy.QNAME,
            ContentModel.ASPECT_OWNABLE,
            new JavaBehaviour(this, "onAddAspect"));
    policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnUpdatePropertiesPolicy.QNAME,
            ContentModel.ASPECT_OWNABLE,
            new JavaBehaviour(this, "onUpdateProperties"));
    policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnRemoveAspectPolicy.QNAME,
            ContentModel.ASPECT_OWNABLE,
            new JavaBehaviour(this, "onRemoveAspect"));
    policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnDeleteNodePolicy.QNAME,
            ContentModel.ASPECT_OWNABLE,
            new JavaBehaviour(this, "onDeleteNode"));
    
    policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnAddAspectPolicy.QNAME,
            ContentModel.ASPECT_AUDITABLE,
            new JavaBehaviour(this, "onAddAspect"));
    policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnUpdatePropertiesPolicy.QNAME,
            ContentModel.ASPECT_AUDITABLE,
            new JavaBehaviour(this, "onUpdateProperties"));
    policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnRemoveAspectPolicy.QNAME,
            ContentModel.ASPECT_AUDITABLE,
            new JavaBehaviour(this, "onRemoveAspect"));
    policyComponent.bindClassBehaviour(
            NodeServicePolicies.OnDeleteNodePolicy.QNAME,
            ContentModel.ASPECT_AUDITABLE,
            new JavaBehaviour(this, "onDeleteNode"));
    
    policyComponent.bindClassBehaviour(
            CopyServicePolicies.OnCopyNodePolicy.QNAME,
            ContentModel.ASPECT_OWNABLE, 
            new JavaBehaviour(this, "onCopyNode", NotificationFrequency.EVERY_EVENT));      
    policyComponent.bindClassBehaviour(
            CopyServicePolicies.OnCopyNodePolicy.QNAME,
            ContentModel.ASPECT_AUDITABLE, 
            new JavaBehaviour(this, "onCopyNode", NotificationFrequency.EVERY_EVENT));      
}
 
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:46,代码来源:OwnableServiceImpl.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java GeneratedPropertyContainer类代码示例发布时间:2022-05-22
下一篇:
Java DependencyClass类代码示例发布时间: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