• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java AttributeService类的典型用法和代码示例

java 1次浏览

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

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

示例1: findServices

点赞 3

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
private static void findServices()
{
    ApplicationContext ctx = testContext.getApplicationContext();
    
    copyService = ctx.getBean("CopyService", CopyService.class);
    nodeService = ctx.getBean("NodeService", NodeService.class);
    directQuickShareService = ctx.getBean("quickShareService", QuickShareService.class);
    quickShareService = ctx.getBean("QuickShareService", QuickShareService.class);
    repository = ctx.getBean("repositoryHelper", Repository.class);
    attributeService = ctx.getBean("AttributeService", AttributeService.class);
    permissionService = ctx.getBean("PermissionService", PermissionService.class);
    nodeArchiveService = ctx.getBean("nodeArchiveService", NodeArchiveService.class);
    scheduledPersistedActionService = ctx.getBean("scheduledPersistedActionService", ScheduledPersistedActionService.class);
    quickShareLinkExpiryActionPersister = ctx.getBean("quickShareLinkExpiryActionPersister", QuickShareLinkExpiryActionPersister.class);
    transactionHelper = ctx.getBean("retryingTransactionHelper", RetryingTransactionHelper.class);
    globalProperties = ctx.getBean("global-properties", Properties.class);
    siteService = (SiteService) ctx.getBean("SiteService");
}
 

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

示例2: removeAttributes

点赞 3

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
public void removeAttributes(final String ...keys)  {
        // remove support for leaving the middle key empty!
        if (keys.length == 3 && keys[1]==null) {

                final Set<Serializable[]> keysToDelete = new HashSet<Serializable[]>();

                attributeService.getAttributes(new AttributeService.AttributeQueryCallback() {

                        @Override
                        public boolean handleAttribute(Long id, Serializable value, Serializable[] foundKeys) {
                                if (foundKeys.length == 3 && keys[0].equals(foundKeys[0]) && keys[2].equals(foundKeys[2])) {
                                        keysToDelete.add(foundKeys);
                                }
                                return true;
                        }
                }, new Serializable[] {keys[0]});

                for (Serializable[] keyTuple : keysToDelete) {
                        attributeService.removeAttribute(keyTuple);
                }
        }
        else {
                attributeService.removeAttributes((Serializable[]) keys);
        }
}
 

开发者ID:jgoldhammer,
项目名称:alfresco-jscript-extensions,
代码行数:26,
代码来源:ScriptAttributeService.java

示例3: setUp

点赞 2

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
@Override
protected void setUp() throws Exception
{
    ctx = ApplicationContextHelper.getApplicationContext();
    attributeService = (AttributeService) ctx.getBean("AttributeService");
    propertyValueDAO = (PropertyValueDAO) ctx.getBean("propertyValueDAO");
}
 

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

示例4: setUp

点赞 2

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
@Before
public void setUp() throws Exception
{
    transactionService = (TransactionService) ctx.getBean("TransactionService");
    
    attributeService = (AttributeService) ctx.getBean("AttributeService");
    propertyValueDAO = (PropertyValueDAO) ctx.getBean("propertyValueDAO");
    
    // Remove the caches to test all functionality
    clearCaches();
}
 

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

示例5: findServices

点赞 2

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
private static void findServices()
{
    ApplicationContext ctx = testContext.getApplicationContext();
    
    copyService = ctx.getBean("CopyService", CopyService.class);
    dictionaryService = ctx.getBean("dictionaryService", DictionaryService.class);
    nodeService = ctx.getBean("NodeService", NodeService.class);
    quickShareService = ctx.getBean("QuickShareService", QuickShareService.class);
    repository = ctx.getBean("repositoryHelper", Repository.class);
    attributeService = ctx.getBean("AttributeService", AttributeService.class);
    permissionService = ctx.getBean("PermissionService", PermissionService.class);
    nodeArchiveService = ctx.getBean("nodeArchiveService", NodeArchiveService.class);
}
 

开发者ID:Alfresco,
项目名称:community-edition-old,
代码行数:14,
代码来源:QuickShareServiceIntegrationTest.java

示例6: setAttributeService

点赞 2

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
public void setAttributeService(AttributeService attributeService)
{
    this.attributeService = attributeService;
}
 

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

示例7: getAttributeService

点赞 2

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
public AttributeService getAttributeService()
{
    return attributeService;
}
 

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

示例8: setAttributeService

点赞 2

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
/**
 * @param attributeService          service used to store usage attributes
 */
public void setAttributeService(AttributeService attributeService)
{
    this.attributeService = attributeService;
}
 

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

示例9: getAttributeService

点赞 2

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
@Override
public AttributeService getAttributeService()
{
    return (AttributeService)getService(ATTRIBUTE_SERVICE);
}
 

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

示例10: setAttributeService

点赞 2

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
/**
 * Set the attribute service
 */
public void setAttributeService(AttributeService attributeService)
{
    this.attributeService = attributeService;
}
 

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

示例11: getAttributeService

点赞 2

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
@Override
public AttributeService getAttributeService()
{
    // A mock response
    return null;
}
 

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

示例12: doCleanup

点赞 2

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
protected void doCleanup(final JobExecutionContext context, final RetryingTransactionHelper retryingTransactionHelper,
        final LockReleasedCheck lockReleaseCheck)
{
    final AttributeService attributeService = JobUtilities.getJobDataValue(context, "attributeService", AttributeService.class);
    final PropertyTablesCleanupDAO propertyTablesCleanupDAO = JobUtilities.getJobDataValue(context, "propertyTablesCleanupDAO",
            PropertyTablesCleanupDAO.class);

    final String batchSizeStr = JobUtilities.getJobDataValue(context, "batchSize", String.class);
    final String idsPerWorkItemStr = JobUtilities.getJobDataValue(context, "idsPerWorkItem", String.class);
    final String workerCountStr = JobUtilities.getJobDataValue(context, "workerCount", String.class);
    final String checkItemsLimitStr = JobUtilities.getJobDataValue(context, "checkItemsLimit", String.class);

    final int batchSize = Integer.parseInt(batchSizeStr, 10);
    final int workerCount = Integer.parseInt(workerCountStr, 10);
    final int idsPerWorkItem = Integer.parseInt(idsPerWorkItemStr, 10);
    final int checkItemsLimit = Integer.parseInt(checkItemsLimitStr, 10);

    final String simpleJobClassName = this.getClass().getSimpleName();
    final Serializable attribute = attributeService.getAttribute(AuditModuleConstants.SERVICE_NAMESPACE, simpleJobClassName,
            ATTR_LAST_ID);
    final Long lastId = DefaultTypeConverter.INSTANCE.convert(Long.class, attribute);

    this.getLogger().info(
            "Running incremental cleanup from last ID {} with batchSize {}, workerCount {}, idsPerWorkrItem {} and checkItemsLimit {}",
            lastId, batchSizeStr, workerCountStr, idsPerWorkItemStr, checkItemsLimitStr);

    final EntryIdsWorkProvider workProvider = new EntryIdsWorkProvider(this, propertyTablesCleanupDAO, workerCount, batchSize,
            idsPerWorkItem, checkItemsLimit, lastId);
    final EntryIdsBatchWorker batchWorker = new EntryIdsBatchWorker(this, propertyTablesCleanupDAO);
    final BatchProcessor<List<Long>> batchProcessor = new BatchProcessor<>(simpleJobClassName, retryingTransactionHelper, workProvider,
            workerCount, batchSize, null, LogFactory.getLog(this.getClass().getName() + ".batchProcessor"),
            Math.max(25, batchSize * workerCount * 2));
    batchProcessor.process(batchWorker, true);

    final Long newLastId = workProvider.getLastId();
    final Long maxId = workProvider.getMaxId();

    if (EqualsHelper.nullSafeEquals(lastId, newLastId) || EqualsHelper.nullSafeEquals(newLastId, maxId))
    {
        // just delete the attribute so next time we start from the beginning
        attributeService.removeAttribute(AuditModuleConstants.SERVICE_NAMESPACE, simpleJobClassName, ATTR_LAST_ID);
    }
    else
    {
        // store the last ID so next time we start from there
        attributeService.setAttribute(newLastId, AuditModuleConstants.SERVICE_NAMESPACE, simpleJobClassName, ATTR_LAST_ID);
    }

    this.getLogger().info("Completed incremental cleanup with last processed ID {} and deleted {} unused entries", newLastId,
            batchWorker.getDeletedEntries());
}
 

开发者ID:Acosix,
项目名称:alfresco-audit,
代码行数:52,
代码来源:IncrementalPropertyTableCleanupJob.java

示例13: setAttributeService

点赞 2

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
/**
 * @param attributeService
 *            the attributeService to set
 */
public void setAttributeService(final AttributeService attributeService)
{
    this.attributeService = attributeService;
}
 

开发者ID:Acosix,
项目名称:alfresco-mt-support,
代码行数:9,
代码来源:TenantAwareChainingUserRegistrySynchronizer.java

示例14: setAttributeService

点赞 2

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
/**
 * @param attributeService  attribute service
 */
public void setAttributeService(AttributeService attributeService)
{
    this.attributeService = attributeService;
}
 

开发者ID:Alfresco,
项目名称:records-management-old,
代码行数:8,
代码来源:ModulePatchExecuterImpl.java

示例15: setAttributeService

点赞 2

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
public void setAttributeService(AttributeService attributeService) {
this.attributeService = attributeService;
     }
 

开发者ID:jgoldhammer,
项目名称:alfresco-jscript-extensions,
代码行数:4,
代码来源:ScriptAttributeService.java

示例16: setAttributeService

点赞 1

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
/**
 * Sets the attribute service.
 * 
 * @param attributeService
 *            the new attribute service
 */
public void setAttributeService(AttributeService attributeService)
{
    this.attributeService = attributeService;
}
 

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

示例17: getAttributeService

点赞 1

import org.alfresco.service.cmr.attributes.AttributeService; //导入依赖的package包/类
/**
 * Get the attribute service (or null if one is not provided)
 */
@NotAuditable
AttributeService getAttributeService();
 

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


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)