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