本文整理汇总了Java中org.alfresco.repo.policy.BehaviourFilter类的典型用法代码示例。如果您正苦于以下问题:Java BehaviourFilter类的具体用法?Java BehaviourFilter怎么用?Java BehaviourFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BehaviourFilter类属于org.alfresco.repo.policy包,在下文中一共展示了BehaviourFilter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FileFolderLoader
import org.alfresco.repo.policy.BehaviourFilter; //导入依赖的package包/类
/**
* @param repoState keep track of repository readiness
* @param transactionService ensure proper rollback, where required
* @param repositoryHelper access standard repository paths
* @param fileFolderService perform actual file-folder manipulation
*/
public FileFolderLoader(
RepositoryState repoState,
TransactionService transactionService,
Repository repositoryHelper,
FileFolderService fileFolderService,
NodeService nodeService,
ContentService contentService,
BehaviourFilter policyBehaviourFilter)
{
this.repoState = repoState;
this.transactionService = transactionService;
this.repositoryHelper = repositoryHelper;
this.fileFolderService = fileFolderService;
this.nodeService = nodeService;
this.contentService = contentService;
this.policyBehaviourFilter = policyBehaviourFilter;
this.normalDistribution = new NormalDistributionHelper();
}
示例2: TaskFormPersister
import org.alfresco.repo.policy.BehaviourFilter; //导入依赖的package包/类
public TaskFormPersister(ContentModelItemData<WorkflowTask> itemData,
NamespaceService namespaceService,
DictionaryService dictionaryService,
WorkflowService workflowService,
NodeService nodeService,
AuthenticationService authenticationService,
BehaviourFilter behaviourFilter, Log logger)
{
super(itemData, namespaceService, dictionaryService, logger);
WorkflowTask item = itemData.getItem();
// make sure that the task is not already completed
if (item.getState().equals(WorkflowTaskState.COMPLETED))
{
throw new AlfrescoRuntimeException("workflowtask.already.done.error");
}
// make sure the current user is able to edit the task
if (!workflowService.isTaskEditable(item, authenticationService.getCurrentUserName()))
{
throw new AccessDeniedException("Failed to update task with id '" + item.getId() + "'.");
}
this.updater = new TaskUpdater(item.getId(), workflowService, nodeService, behaviourFilter);
}
示例3: makeFolders
import org.alfresco.repo.policy.BehaviourFilter; //导入依赖的package包/类
/**
* Same as above, with option to disable parent behaviour(s) when creating sub-folder
*
* @param service FileFolderService
* @param parentNodeRef NodeRef
* @param folderTypeQName QName
* @param behaviourFilter BehaviourFilter
* @return FileInfo
*/
public static FileInfo makeFolders(FileFolderService service, NodeRef parentNodeRef, List<String> pathElements,
QName folderTypeQName, BehaviourFilter behaviourFilter, Set<QName> parentBehavioursToDisable)
{
validate(pathElements, service, folderTypeQName);
List<PathElementDetails> list = new ArrayList<>(pathElements.size());
for (String pathElement : pathElements)
{
list.add(new PathElementDetails(pathElement, null));
}
FileInfo fileInfo = makeFolders(service, null, parentNodeRef, list, folderTypeQName, behaviourFilter, parentBehavioursToDisable);
// Should we check the type?
return fileInfo;
}
示例4: setUp
import org.alfresco.repo.policy.BehaviourFilter; //导入依赖的package包/类
@Override
protected void setUp() throws Exception
{
super.setUp();
repoAdminService = (RepoAdminService) ctx.getBean("RepoAdminService");
dictionaryService = (DictionaryService) ctx.getBean("DictionaryService");
transactionService = (TransactionService) ctx.getBean("TransactionService");
nodeService = (NodeService) ctx.getBean("NodeService");
contentService = (ContentService) ctx.getBean("ContentService");
searchService = (SearchService) ctx.getBean("SearchService");
namespaceService = (NamespaceService) ctx.getBean("NamespaceService");
behaviourFilter = (BehaviourFilter)ctx.getBean("policyBehaviourFilter");
dictionaryDAO = (DictionaryDAO) ctx.getBean("dictionaryDAO");
DbNodeServiceImpl dbNodeService = (DbNodeServiceImpl)ctx.getBean("dbNodeService");
dbNodeService.setEnableTimestampPropagation(false);
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
}
示例5: initTestsContext
import org.alfresco.repo.policy.BehaviourFilter; //导入依赖的package包/类
@BeforeClass public static void initTestsContext() throws Exception
{
ApplicationContext testContext = APP_CONTEXT_INIT.getApplicationContext();
PRIVATE_REMOTE_CREDENTIALS_SERVICE = (RemoteCredentialsService)testContext.getBean("remoteCredentialsService");
REMOTE_CREDENTIALS_SERVICE = (RemoteCredentialsService)testContext.getBean("RemoteCredentialsService");
AUTHENTICATION_SERVICE = (MutableAuthenticationService)testContext.getBean("authenticationService");
BEHAVIOUR_FILTER = (BehaviourFilter)testContext.getBean("policyBehaviourFilter");
DICTIONARY_SERVICE = (DictionaryService)testContext.getBean("dictionaryService");
NAMESPACE_SERVICE = (NamespaceService)testContext.getBean("namespaceService");
REPOSITORY_HELPER = (Repository)testContext.getBean("repositoryHelper");
NODE_SERVICE = (NodeService)testContext.getBean("nodeService");
PUBLIC_NODE_SERVICE = (NodeService)testContext.getBean("NodeService");
PERSON_SERVICE = (PersonService)testContext.getBean("personService");
TRANSACTION_HELPER = (RetryingTransactionHelper)testContext.getBean("retryingTransactionHelper");
TRANSACTION_SERVICE = (TransactionService)testContext.getBean("TransactionService");
PERMISSION_SERVICE = (PermissionService)testContext.getBean("permissionService");
// Switch to a test shared system container
RemoteCredentialsServiceImpl.setSharedCredentialsSystemContainerName(SHARED_SYSTEM_CONTAINER_NAME);
}
示例6: initBasicServices
import org.alfresco.repo.policy.BehaviourFilter; //导入依赖的package包/类
@BeforeClass public static void initBasicServices() throws Exception
{
behaviourFilter = (BehaviourFilter)APP_CONTEXT_INIT.getApplicationContext().getBean("policyBehaviourFilter");
contentService = (ContentService)APP_CONTEXT_INIT.getApplicationContext().getBean("ContentService");
nodeService = (NodeService)APP_CONTEXT_INIT.getApplicationContext().getBean("NodeService");
repositoryHelper = (Repository)APP_CONTEXT_INIT.getApplicationContext().getBean("repositoryHelper");
siteService = (SiteService)APP_CONTEXT_INIT.getApplicationContext().getBean("SiteService");
transactionHelper = (RetryingTransactionHelper)APP_CONTEXT_INIT.getApplicationContext().getBean("retryingTransactionHelper");
authenticationComponent = (AuthenticationComponent)APP_CONTEXT_INIT.getApplicationContext().getBean("authenticationComponent");
commentService = (CommentService)APP_CONTEXT_INIT.getApplicationContext().getBean("commentService");
authenticationService = (MutableAuthenticationService)APP_CONTEXT_INIT.getApplicationContext().getBean("AuthenticationService");
personService = (PersonService)APP_CONTEXT_INIT.getApplicationContext().getBean("PersonService");
postDAO = (ActivityPostDAO)APP_CONTEXT_INIT.getApplicationContext().getBean("postDAO");
permissionServiceImpl = (PermissionServiceImpl)APP_CONTEXT_INIT.getApplicationContext().getBean("permissionServiceImpl");
permissionModelDAO = (ModelDAO)APP_CONTEXT_INIT.getApplicationContext().getBean("permissionsModelDAO");
lockService = (LockService)APP_CONTEXT_INIT.getApplicationContext().getBean("lockService");
COMPANY_HOME = repositoryHelper.getCompanyHome();
}
示例7: setUp
import org.alfresco.repo.policy.BehaviourFilter; //导入依赖的package包/类
@Override
public void setUp() throws Exception
{
ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
// Set the services
this.transactionService = serviceRegistry.getTransactionService();
this.nodeService = serviceRegistry.getNodeService();
this.contentService = serviceRegistry.getContentService();
this.behaviourFilter = (BehaviourFilter) ctx.getBean("policyBehaviourFilter");
AuthenticationUtil.setRunAsUserSystem();
// Create the store and get the root node reference
this.storeRef = this.nodeService.createStore(StoreRef.PROTOCOL_WORKSPACE, "Test_" + System.currentTimeMillis());
this.rootNodeRef = this.nodeService.getRootNode(storeRef);
}
示例8: initTestsContext
import org.alfresco.repo.policy.BehaviourFilter; //导入依赖的package包/类
@BeforeClass public static void initTestsContext() throws Exception
{
AUTHENTICATION_SERVICE = (MutableAuthenticationService)testContext.getBean("authenticationService");
BEHAVIOUR_FILTER = (BehaviourFilter)testContext.getBean("policyBehaviourFilter");
BLOG_SERVICE = (BlogService)testContext.getBean("blogService");
DICTIONARY_SERVICE = (DictionaryService)testContext.getBean("dictionaryService");
NODE_SERVICE = (NodeService)testContext.getBean("nodeService");
PERSON_SERVICE = (PersonService)testContext.getBean("personService");
TRANSACTION_HELPER = (RetryingTransactionHelper)testContext.getBean("retryingTransactionHelper");
SITE_SERVICE = (SiteService)testContext.getBean("siteService");
TAGGING_SERVICE = (TaggingService)testContext.getBean("TaggingService");
AuthenticationUtil.setFullyAuthenticatedUser(ADMIN_USER);
createUser(TEST_USER);
// We need to create the test site as the test user so that they can contribute content to it in tests below.
AuthenticationUtil.setFullyAuthenticatedUser(TEST_USER);
createTestSiteWithBlogContainer();
}
示例9: initTestsContext
import org.alfresco.repo.policy.BehaviourFilter; //导入依赖的package包/类
@BeforeClass public static void initTestsContext() throws Exception
{
AUTHENTICATION_SERVICE = (MutableAuthenticationService)testContext.getBean("authenticationService");
BEHAVIOUR_FILTER = (BehaviourFilter)testContext.getBean("policyBehaviourFilter");
LINKS_SERVICE = (LinksService)testContext.getBean("LinksService");
NODE_SERVICE = (NodeService)testContext.getBean("nodeService");
PUBLIC_NODE_SERVICE = (NodeService)testContext.getBean("NodeService");
PERSON_SERVICE = (PersonService)testContext.getBean("personService");
TRANSACTION_HELPER = (RetryingTransactionHelper)testContext.getBean("retryingTransactionHelper");
PERMISSION_SERVICE = (PermissionService)testContext.getBean("permissionService");
SITE_SERVICE = (SiteService)testContext.getBean("siteService");
CONTENT_SERVICE = (ContentService)testContext.getBean("ContentService");
// Do the setup as admin
AuthenticationUtil.setFullyAuthenticatedUser(ADMIN_USER);
createUser(TEST_USER);
// We need to create the test site as the test user so that they can contribute content to it in tests below.
AuthenticationUtil.setFullyAuthenticatedUser(TEST_USER);
createTestSites();
}
示例10: deleteTenant
import org.alfresco.repo.policy.BehaviourFilter; //导入依赖的package包/类
private static void deleteTenant()
{
TRANSACTION_HELPER.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
{
@Override
public Void execute() throws Throwable
{
// TODO: WARNING: HACK for ALF-19155: MT deleteTenant does not work
// PersonService prevents 'guest' authorities from being deleted
{
BehaviourFilter behaviourFilter = (BehaviourFilter) testContext.getBean("policyBehaviourFilter");
behaviourFilter.disableBehaviour(ContentModel.TYPE_PERSON);
behaviourFilter.disableBehaviour(ContentModel.ASPECT_UNDELETABLE);
}
TENANT_ADMIN_SERVICE.deleteTenant(TENANT_DOMAIN);
return null;
}
});
}
示例11: AbstractBulkFilesystemImporter
import org.alfresco.repo.policy.BehaviourFilter; //导入依赖的package包/类
protected AbstractBulkFilesystemImporter(final ServiceRegistry serviceRegistry,
final BehaviourFilter behaviourFilter,
final ContentStore configuredContentStore,
final BulkImportStatusImpl importStatus,
final DataDictionaryBuilder dataDictionaryBuilder)
{
this.serviceRegistry = serviceRegistry;
this.behaviourFilter = behaviourFilter;
this.configuredContentStore = configuredContentStore;
this.fileFolderService = serviceRegistry.getFileFolderService();
this.nodeService = serviceRegistry.getNodeService();
this.contentService = serviceRegistry.getContentService();
this.versionService = serviceRegistry.getVersionService();
this.mimeTypeService = serviceRegistry.getMimetypeService();
this.dictionaryService = serviceRegistry.getDictionaryService();
this.importStatus = importStatus;
this.dataDictionaryBuilder = dataDictionaryBuilder;
this.importFilters = new ArrayList<ImportFilter>();
}
示例12: initBasicServices
import org.alfresco.repo.policy.BehaviourFilter; //导入依赖的package包/类
@BeforeClass public static void initBasicServices() throws Exception
{
behaviourFilter = (BehaviourFilter)APP_CONTEXT_INIT.getApplicationContext().getBean("policyBehaviourFilter");
contentService = (ContentService)APP_CONTEXT_INIT.getApplicationContext().getBean("ContentService");
nodeService = (NodeService)APP_CONTEXT_INIT.getApplicationContext().getBean("NodeService");
repositoryHelper = (Repository)APP_CONTEXT_INIT.getApplicationContext().getBean("repositoryHelper");
siteService = (SiteService)APP_CONTEXT_INIT.getApplicationContext().getBean("SiteService");
transactionHelper = (RetryingTransactionHelper)APP_CONTEXT_INIT.getApplicationContext().getBean("retryingTransactionHelper");
authenticationComponent = (AuthenticationComponent)APP_CONTEXT_INIT.getApplicationContext().getBean("authenticationComponent");
commentService = (CommentService)APP_CONTEXT_INIT.getApplicationContext().getBean("commentService");
authenticationService = (MutableAuthenticationService)APP_CONTEXT_INIT.getApplicationContext().getBean("AuthenticationService");
personService = (PersonService)APP_CONTEXT_INIT.getApplicationContext().getBean("PersonService");
postDAO = (ActivityPostDAO)APP_CONTEXT_INIT.getApplicationContext().getBean("postDAO");
permissionServiceImpl = (PermissionServiceImpl)APP_CONTEXT_INIT.getApplicationContext().getBean("permissionServiceImpl");
permissionModelDAO = (ModelDAO)APP_CONTEXT_INIT.getApplicationContext().getBean("permissionsModelDAO");
COMPANY_HOME = repositoryHelper.getCompanyHome();
}
示例13: initTestsContext
import org.alfresco.repo.policy.BehaviourFilter; //导入依赖的package包/类
@BeforeClass public static void initTestsContext() throws Exception
{
AUTHENTICATION_SERVICE = (MutableAuthenticationService)testContext.getBean("authenticationService");
BEHAVIOUR_FILTER = (BehaviourFilter)testContext.getBean("policyBehaviourFilter");
LINKS_SERVICE = (LinksService)testContext.getBean("LinksService");
NODE_SERVICE = (NodeService)testContext.getBean("nodeService");
PUBLIC_NODE_SERVICE = (NodeService)testContext.getBean("NodeService");
PERSON_SERVICE = (PersonService)testContext.getBean("personService");
TRANSACTION_HELPER = (RetryingTransactionHelper)testContext.getBean("retryingTransactionHelper");
PERMISSION_SERVICE = (PermissionService)testContext.getBean("permissionService");
SITE_SERVICE = (SiteService)testContext.getBean("siteService");
CONTENT_SERVICE = (ContentService)testContext.getBean("ContentService");
TAGGING_SERVICE = (TaggingService)testContext.getBean("TaggingService");
// Do the setup as admin
AuthenticationUtil.setFullyAuthenticatedUser(ADMIN_USER);
createUser(TEST_USER);
// We need to create the test site as the test user so that they can contribute content to it in tests below.
AuthenticationUtil.setFullyAuthenticatedUser(TEST_USER);
createTestSites();
}
示例14: initTestsContext
import org.alfresco.repo.policy.BehaviourFilter; //导入依赖的package包/类
@BeforeClass public static void initTestsContext() throws Exception
{
AUTHENTICATION_SERVICE = (MutableAuthenticationService)testContext.getBean("authenticationService");
BEHAVIOUR_FILTER = (BehaviourFilter)testContext.getBean("policyBehaviourFilter");
DISCUSSION_SERVICE = (DiscussionService)testContext.getBean("DiscussionService");
NODE_SERVICE = (NodeService)testContext.getBean("nodeService");
PUBLIC_NODE_SERVICE = (NodeService)testContext.getBean("NodeService");
PERSON_SERVICE = (PersonService)testContext.getBean("personService");
TRANSACTION_HELPER = (RetryingTransactionHelper)testContext.getBean("retryingTransactionHelper");
PERMISSION_SERVICE = (PermissionService)testContext.getBean("permissionService");
SITE_SERVICE = (SiteService)testContext.getBean("SiteService");
TAGGING_SERVICE = (TaggingService)testContext.getBean("TaggingService");
TENANT_ADMIN_SERVICE = testContext.getBean("tenantAdminService", TenantAdminService.class);
createTenant();
// Do the setup as admin
AuthenticationUtil.setFullyAuthenticatedUser(ADMIN_USER);
createUser(TEST_USER);
// We need to create the test site as the test user so that they can contribute content to it in tests below.
AuthenticationUtil.setFullyAuthenticatedUser(TEST_USER);
createTestSites();
}
示例15: WorkflowFormPersister
import org.alfresco.repo.policy.BehaviourFilter; //导入依赖的package包/类
public WorkflowFormPersister(ContentModelItemData<?> itemData,
NamespaceService namespaceService,
DictionaryService dictionaryService,
WorkflowService workflowService,
NodeService nodeService,
BehaviourFilter behaviourFilter, Log logger)
{
super(itemData, namespaceService, dictionaryService, logger);
WorkflowDefinition definition = (WorkflowDefinition) itemData.getItem();
this.builder = new WorkflowBuilder(definition, workflowService, nodeService, behaviourFilter);
}