本文整理汇总了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"));
}
示例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);
}
示例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"));
}
示例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();
}
示例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));
}
示例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));
}
示例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"));
}
示例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"));
}
示例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"));
}
示例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));
}
示例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"));
}
示例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);
}
示例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"));
}
示例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()));
}
示例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));
}
}