org.alfresco.util.PropertyCheck Java Examples

The following examples show how to use org.alfresco.util.PropertyCheck. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ModuleStarter.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
protected void onBootstrap(ApplicationEvent event)
{
    PropertyCheck.mandatory(this, "moduleService", moduleService);
    final RetryingTransactionCallback<Object> startModulesCallback = new RetryingTransactionCallback<Object>()
    {
        public Object execute() throws Throwable
        {
            moduleService.startModules();
            return null;
        }
    };
    
    AuthenticationUtil.runAs(new RunAsWork<Object>()
    {
        @Override
        public Object doWork() throws Exception 
        {
            transactionService.getRetryingTransactionHelper().doInTransaction(startModulesCallback, transactionService.isReadOnly());
            return null;
        }
    	
    }, AuthenticationUtil.getSystemUserName());       
}
 
Example #2
Source File: SelectorPropertyContentStore.java    From alfresco-simple-content-stores with Apache License 2.0 6 votes vote down vote up
private void afterPropertiesSet_setupStoreData()
{
    PropertyCheck.mandatory(this, "storeBySelectorPropertyValue", this.storeBySelectorPropertyValue);
    if (this.storeBySelectorPropertyValue.isEmpty())
    {
        throw new IllegalStateException("No stores have been defined for property values");
    }

    this.allStores = new ArrayList<>();
    for (final ContentStore store : this.storeBySelectorPropertyValue.values())
    {
        if (!this.allStores.contains(store))
        {
            this.allStores.add(store);
        }
    }

    if (!this.allStores.contains(this.fallbackStore))
    {
        this.allStores.add(this.fallbackStore);
    }
}
 
Example #3
Source File: MoveCapableCommonRoutingContentStore.java    From alfresco-simple-content-stores with Apache License 2.0 6 votes vote down vote up
/**
 *
 * {@inheritDoc}
 */
@Override
public void afterPropertiesSet()
{
    PropertyCheck.mandatory(this, "applicationContext", this.applicationContext);

    PropertyCheck.mandatory(this, "policyComponent", this.policyComponent);
    PropertyCheck.mandatory(this, "dictionaryService", this.dictionaryService);
    PropertyCheck.mandatory(this, "nodeService", this.nodeService);

    PropertyCheck.mandatory(this, "storesByContentUrl", this.storesByContentUrl);
    PropertyCheck.mandatory(this, "fallbackStore", this.fallbackStore);

    if (this.allStores == null)
    {
        this.allStores = new ArrayList<>();
    }

    if (!this.allStores.contains(this.fallbackStore))
    {
        this.allStores.add(this.fallbackStore);
    }
}
 
Example #4
Source File: ConfigurationDataCollector.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public void afterPropertiesSet() throws Exception
{
    PropertyCheck.mandatory(this, "currentRepoDescriptorDAO", currentRepoDescriptorDAO);
    PropertyCheck.mandatory(this, "smartFoldersBundle", smartFoldersBundle);
    PropertyCheck.mandatory(this, "dataSource", dataSource);
    PropertyCheck.mandatory(this, "repoUsageComponent", repoUsageComponent);
    PropertyCheck.mandatory(this, "moduleService", moduleService);
    PropertyCheck.mandatory(this, "auditService", auditService);
    PropertyCheck.mandatory(this, "transactionService", transactionService);
    PropertyCheck.mandatory(this, "thumbnailService", thumbnailService);
    PropertyCheck.mandatory(this, "webdavService", webdavService);
    PropertyCheck.mandatory(this, "workflowAdminService", workflowAdminService);
    PropertyCheck.mandatory(this, "replicationSubsystem", replicationSubsystem);
    PropertyCheck.mandatory(this, "imapSubsystem", imapSubsystem);
    PropertyCheck.mandatory(this, "inboundSMTPSubsystem", inboundSMTPSubsystem);
    PropertyCheck.mandatory(this, "serverModeProvider", serverModeProvider);
    PropertyCheck.mandatory(this, "activitiesFeedSubsystem", activitiesFeedSubsystem);
    PropertyCheck.mandatory(this, "fileServersSubsystem", fileServersSubsystem);
    PropertyCheck.mandatory(this, "authenticationSubsystem", authenticationSubsystem);
}
 
Example #5
Source File: AlfrescoKeyStoreImpl.java    From alfresco-core with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 * Initializes class
 */
private void safeInit()
{
    PropertyCheck.mandatory(this, "location", getKeyStoreParameters().getLocation());

    // Make sure we choose the default type, if required
    if(getKeyStoreParameters().getType() == null)
    {
        keyStoreParameters.setType(KeyStore.getDefaultType());
    }

    writeLock.lock();
    try
    {
        keys = loadKeyStore(keyStoreParameters);
        backupKeys = loadKeyStore(backupKeyStoreParameters);
    }
    finally
    {
        writeLock.unlock();
    }
}
 
Example #6
Source File: EmailServer.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void onBootstrap(ApplicationEvent event)
{
    if (!enabled)
    {
        return;
    }
    // Check properties
    PropertyCheck.mandatory(this, "domain", domain);
    if (port <= 0 || port > 65535)
    {
        throw new AlfrescoRuntimeException("Property 'port' is incorrect");
    }
    PropertyCheck.mandatory(this, "emailService", emailService);
    // Startup
    startup();
}
 
Example #7
Source File: QuickShareServiceImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
private void checkMandatoryProperties()
{
    PropertyCheck.mandatory(this, "attributeService", attributeService);
    PropertyCheck.mandatory(this, "dictionaryService", dictionaryService);
    PropertyCheck.mandatory(this, "nodeService", nodeService);
    PropertyCheck.mandatory(this, "permissionService", permissionService);
    PropertyCheck.mandatory(this, "personService", personService);
    PropertyCheck.mandatory(this, "policyComponent", policyComponent);
    PropertyCheck.mandatory(this, "tenantService", tenantService);
    PropertyCheck.mandatory(this, "thumbnailService", thumbnailService);
    PropertyCheck.mandatory(this, "eventPublisher", eventPublisher);
    PropertyCheck.mandatory(this, "actionService", actionService);
    PropertyCheck.mandatory(this, "behaviourFilter", behaviourFilter);
    PropertyCheck.mandatory(this, "defaultEmailSender", defaultEmailSender);
    PropertyCheck.mandatory(this, "clientAppConfig", clientAppConfig);
    PropertyCheck.mandatory(this, "searchService", searchService);
    PropertyCheck.mandatory(this, "siteService", siteService);
    PropertyCheck.mandatory(this, "authorityService", authorityService);
    PropertyCheck.mandatory(this, "sysAdminParams", sysAdminParams);
    PropertyCheck.mandatory(this, "emailHelper", emailHelper);
    PropertyCheck.mandatory(this, "scheduledPersistedActionService", scheduledPersistedActionService);
    PropertyCheck.mandatory(this, "quickShareLinkExpiryActionPersister", quickShareLinkExpiryActionPersister);
}
 
Example #8
Source File: AuthorityDAOImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public void afterPropertiesSet() throws Exception
{
    PropertyCheck.mandatory(this, "aclDao", aclDao);
    PropertyCheck.mandatory(this, "authorityBridgeDAO", authorityBridgeDAO);
    PropertyCheck.mandatory(this, "authorityBridgeTableCache", authorityBridgeTableCache);
    PropertyCheck.mandatory(this, "authorityLookupCache", authorityLookupCache);
    PropertyCheck.mandatory(this, "cannedQueryRegistry", cannedQueryRegistry);
    PropertyCheck.mandatory(this, "childAuthorityCache", childAuthorityCache);
    PropertyCheck.mandatory(this, "dictionaryService", dictionaryService);
    PropertyCheck.mandatory(this, "namespacePrefixResolver", namespacePrefixResolver);
    PropertyCheck.mandatory(this, "nodeService", nodeService);
    PropertyCheck.mandatory(this, "personService", personService);
    PropertyCheck.mandatory(this, "policyComponent", policyComponent);
    PropertyCheck.mandatory(this, "searchService", searchService);
    PropertyCheck.mandatory(this, "storeRef", storeRef);
    PropertyCheck.mandatory(this, "tenantService", tenantService);
    PropertyCheck.mandatory(this, "userAuthorityCache", userAuthorityCache);
    PropertyCheck.mandatory(this, "zoneAuthorityCache", zoneAuthorityCache);
    PropertyCheck.mandatory(this, "storeRef", storeRef);
    PropertyCheck.mandatory(this, "storeRef", storeRef);
    authorityBridgeTableCache.register(this);
    
}
 
Example #9
Source File: RepositoryFolderConfigBean.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 * Set the folder name path <b>relative to the {@link #getFolderPath() path}</b>.
 * 
 * @param folderPath            a folder-name path using the '<b>/</b>' path separator e.g. '<b>IMAP HOME/MAIL-1</b>'
 */
public void setFolderPath(String folderPath)
{
    if (!PropertyCheck.isValidPropertyString(folderPath))
    {
        throw new IllegalArgumentException("Invalid folder name path for property 'folderPath': " + folderPath);
    }
    StringTokenizer tokenizer = new StringTokenizer(folderPath, "/");
    StringBuilder pathBuff = new StringBuilder(folderPath.length());
    while (tokenizer.hasMoreTokens())
    {
        String folderName = tokenizer.nextToken();
        if (folderName.length() == 0)
        {
            throw new IllegalArgumentException("Invalid folder name path for property 'folderPath': " + folderPath);
        }
        pathBuff.append(folderName);
        if (tokenizer.hasMoreTokens())
        {
            pathBuff.append('/');
        }
    }
    this.folderPath = pathBuff.toString();
}
 
Example #10
Source File: EncryptingContentStore.java    From alfresco-simple-content-stores with Apache License 2.0 6 votes vote down vote up
/**
 *
 * {@inheritDoc}
 */
@Override
public void afterPropertiesSet()
{
    super.afterPropertiesSet();

    PropertyCheck.mandatory(this, "contentDataDAO", this.contentDataDAO);
    PropertyCheck.mandatory(this, "keyStorePath", this.keyStorePath);
    PropertyCheck.mandatory(this, "keyStoreType", this.keyStoreType);
    PropertyCheck.mandatory(this, "masterKeyAlias", this.masterKeyAlias);
    PropertyCheck.mandatory(this, "masterKeyStoreId", this.masterKeyStoreId);

    PropertyCheck.mandatory(this, "keyAlgorithm", this.keyAlgorithm);

    this.loadMasterKey();
}
 
Example #11
Source File: SiteRoutingFileContentStore.java    From alfresco-simple-content-stores with Apache License 2.0 6 votes vote down vote up
protected void afterPropertiesSet_setupDefaultStore()
{
    PropertyCheck.mandatory(this, "rootAbsolutePath", this.rootAbsolutePath);
    PropertyCheck.mandatory(this, "protocol", this.protocol);

    if (this.allStores == null)
    {
        this.allStores = new ArrayList<>();
    }

    final SiteAwareFileContentStore defaultFileContentStore = new SiteAwareFileContentStore();
    defaultFileContentStore.setProtocol(this.protocol);
    defaultFileContentStore.setRootAbsolutePath(this.rootAbsolutePath);
    defaultFileContentStore.setApplicationContext(this.applicationContext);
    defaultFileContentStore.setContentLimitProvider(this.contentLimitProvider);
    defaultFileContentStore.setAllowRandomAccess(this.allowRandomAccess);
    defaultFileContentStore.setDeleteEmptyDirs(this.deleteEmptyDirs);
    defaultFileContentStore.setReadOnly(this.readOnly);
    defaultFileContentStore.setUseSiteFolderInGenericDirectories(this.useSiteFolderInGenericDirectories);

    this.storeByProtocol.put(this.protocol, defaultFileContentStore);
    this.allStores.add(defaultFileContentStore);
    this.fallbackStore = defaultFileContentStore;

    defaultFileContentStore.afterPropertiesSet();
}
 
Example #12
Source File: NameChecker.java    From alfresco-data-model with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 * Loads filename constraint from dictionary
 */
@Override
public void afterPropertiesSet() throws Exception
{
    PropertyCheck.mandatory(this, "dictionaryService", dictionaryService);

    QName qNameConstraint = QName.createQName(namespaceURI, constraintLocalName);
    ConstraintDefinition constraintDef = dictionaryService.getConstraint(qNameConstraint);
    if (constraintDef == null)
    {
        throw new AlfrescoRuntimeException("Constraint definition does not exist: " + qNameConstraint);
    }
    nameConstraint = constraintDef.getConstraint();
    if (nameConstraint == null)
    {
        throw new AlfrescoRuntimeException("Constraint does not exist: " + qNameConstraint);
    }
}
 
Example #13
Source File: TenantRoutingContentStore.java    From alfresco-simple-content-stores with Apache License 2.0 6 votes vote down vote up
private void afterPropertiesSet_setupStoreData()
{
    PropertyCheck.mandatory(this, "storeByTenant", this.storeByTenant);

    if (this.allStores == null)
    {
        this.allStores = new ArrayList<>();
    }

    for (final ContentStore store : this.storeByTenant.values())
    {
        if (!this.allStores.contains(store))
        {
            this.allStores.add(store);
        }
    }
}
 
Example #14
Source File: BufferedContentDiskDriver.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
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"));
}
 
Example #15
Source File: LockOwnerDynamicAuthority.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
protected void onBootstrap(ApplicationEvent event)
{
    ApplicationContext ctx = super.getApplicationContext();
    checkOutCheckInService = (CheckOutCheckInService) ctx.getBean("checkOutCheckInService");
    
    PropertyCheck.mandatory(this, "lockService", lockService);
    PropertyCheck.mandatory(this, "checkOutCheckInService", checkOutCheckInService);
    PropertyCheck.mandatory(this, "modelDAO", modelDAO);

    // Build the permission set
    if(requiredFor != null)
    {
        whenRequired = new HashSet<PermissionReference>();
        for(String permission : requiredFor)
        {
            PermissionReference permissionReference = modelDAO.getPermissionReference(null, permission);
            whenRequired.addAll(modelDAO.getGranteePermissions(permissionReference));
            whenRequired.addAll(modelDAO.getGrantingPermissions(permissionReference));
        }
    }
}
 
Example #16
Source File: MultiTAdminServiceImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public void afterPropertiesSet() throws Exception
{
    // for upgrade/backwards compatibility with 3.0.x (mt-admin-context.xml)
    if (baseAdminUsername == null)
    {
        logger.warn(I18NUtil.getMessage(WARN_MSG));
    }
    
    PropertyCheck.mandatory(this, "NodeService", nodeService);
    PropertyCheck.mandatory(this, "DictionaryComponent", dictionaryComponent);
    PropertyCheck.mandatory(this, "RepoAdminService", repoAdminService);
    PropertyCheck.mandatory(this, "TransactionService", transactionService);
    PropertyCheck.mandatory(this, "TenantService", tenantService);
    PropertyCheck.mandatory(this, "TenantAdminDAO", tenantAdminDAO);
    PropertyCheck.mandatory(this, "PasswordEncoder", passwordEncoder);
    PropertyCheck.mandatory(this, "TenantFileContentStore", tenantFileContentStore);
    PropertyCheck.mandatory(this, "WorkflowService", workflowService);
    PropertyCheck.mandatory(this, "RepositoryExporterService", repositoryExporterService);
    PropertyCheck.mandatory(this, "moduleService", moduleService);
}
 
Example #17
Source File: DummyFallbackContentStore.java    From alfresco-simple-content-stores with Apache License 2.0 5 votes vote down vote up
/**
 *
 * {@inheritDoc}
 */
@Override
public void afterPropertiesSet()
{
    PropertyCheck.mandatory(this, "mimetypeService", this.mimetypeService);
    PropertyCheck.mandatory(this, "dummyFilePaths", this.dummyFilePaths);
}
 
Example #18
Source File: AbstractUserNotifier.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Perform basic checks to ensure that the necessary dependencies were injected.
 */
protected void checkProperties()
{
    PropertyCheck.mandatory(this, "activitiesFeedModelBuilderFactory", activitiesFeedModelBuilderFactory);
    PropertyCheck.mandatory(this, "activityService", activityService);
    PropertyCheck.mandatory(this, "nodeService", nodeService);
    PropertyCheck.mandatory(this, "namespaceService", namespaceService);
    PropertyCheck.mandatory(this, "siteService", siteService);
}
 
Example #19
Source File: FeedCleaner.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Perform basic checks to ensure that the necessary dependencies were injected.
 */
private void checkProperties()
{
    PropertyCheck.mandatory(this, "feedDAO", feedDAO);
    PropertyCheck.mandatory(this, "policyComponent", policyComponent);
    PropertyCheck.mandatory(this, "nodeService", nodeService);
    PropertyCheck.mandatory(this, "jobLockService", jobLockService);
    
    // check the max age and max feed size
    if ((maxAgeMins <= 0) && (maxFeedSize <= 0))
    {
        logger.warn("Neither maxAgeMins or maxFeedSize set - feeds will not be cleaned");
    }
}
 
Example #20
Source File: SchemaBootstrapRegistration.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Registers all the necessary scripts and patches with the {@link SchemaBootstrap}.
 */
public void register()
{
    PropertyCheck.mandatory(this, "schemaBootstrap", schemaBootstrap);
    PropertyCheck.mandatory(this, "preCreateScriptUrls", preCreateScriptUrls);
    PropertyCheck.mandatory(this, "postCreateScriptUrls", postCreateScriptUrls);
    PropertyCheck.mandatory(this, "preUpdateScriptPatches", preUpdateScriptPatches);
    PropertyCheck.mandatory(this, "postUpdateScriptPatches", postUpdateScriptPatches);
    PropertyCheck.mandatory(this, "updateActivitiScriptPatches", updateActivitiScriptPatches);
    
    for (String preCreateScriptUrl : preCreateScriptUrls)
    {
        schemaBootstrap.addPreCreateScriptUrl(preCreateScriptUrl);
    }
    for (String postCreateScriptUrl : postCreateScriptUrls)
    {
        schemaBootstrap.addPostCreateScriptUrl(postCreateScriptUrl);
    }
    for (SchemaUpgradeScriptPatch preUpdateScriptPatch : preUpdateScriptPatches)
    {
        schemaBootstrap.addPreUpdateScriptPatch(preUpdateScriptPatch);
    }
    for (SchemaUpgradeScriptPatch postUpdateScriptPatch : postUpdateScriptPatches)
    {
        schemaBootstrap.addPostUpdateScriptPatch(postUpdateScriptPatch);
    }
    for (SchemaUpgradeScriptPatch updateActivitiScriptPatch : updateActivitiScriptPatches)
    {
        schemaBootstrap.addUpdateActivitiScriptPatch(updateActivitiScriptPatch);
    }
}
 
Example #21
Source File: CommonFacadingContentStore.java    From alfresco-simple-content-stores with Apache License 2.0 5 votes vote down vote up
/**
 *
 * {@inheritDoc}
 */
@Override
public void afterPropertiesSet()
{
    PropertyCheck.mandatory(this, "namespaceService", this.namespaceService);
    PropertyCheck.mandatory(this, "dictionaryService", this.dictionaryService);
    PropertyCheck.mandatory(this, "backingStore", this.backingStore);

    this.afterPropertiesSet_setupHandleContentProperties();
}
 
Example #22
Source File: SolrQueryHTTPClient.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void init()
{
    PropertyCheck.mandatory(this, "NodeService", nodeService);
    PropertyCheck.mandatory(this, "PermissionService", permissionService);
    PropertyCheck.mandatory(this, "TenantService", tenantService);
    PropertyCheck.mandatory(this, "LanguageMappings", languageMappings);
    PropertyCheck.mandatory(this, "StoreMappings", storeMappings);
    PropertyCheck.mandatory(this, "RepositoryState", repositoryState);
    PropertyCheck.mandatory(this, "namespaceDAO", namespaceDAO);
    PropertyCheck.mandatory(this, "dictionaryService", dictionaryService);
}
 
Example #23
Source File: LDAPInitialDirContextFactoryImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void setTrustStoreType(String trustStoreType)
{
    if (PropertyCheck.isValidPropertyString(trustStoreType))
    {
        this.trustStoreType = trustStoreType;
    }
}
 
Example #24
Source File: GetPeopleCannedQueryFactory.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void afterPropertiesSet() throws Exception
{
    super.afterPropertiesSet();
    
    PropertyCheck.mandatory(this, "tenantService", tenantService);
    PropertyCheck.mandatory(this, "nodeDAO", nodeDAO);
    PropertyCheck.mandatory(this, "qnameDAO", qnameDAO);
    PropertyCheck.mandatory(this, "cannedQueryDAO", cannedQueryDAO);
}
 
Example #25
Source File: ContentTransformServiceImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void afterPropertiesSet() throws Exception
{
    PropertyCheck.mandatory(this, "mimetypeService", mimetypeService);
    PropertyCheck.mandatory(this, "transformerRegistry", transformerRegistry);
    PropertyCheck.mandatory(this, "transformerDebug", transformerDebug);
}
 
Example #26
Source File: SingleAssocRefPolicyRuleTrigger.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * @see org.alfresco.repo.rule.ruletrigger.RuleTrigger#registerRuleTrigger()
 */
public void registerRuleTrigger()
{
    PropertyCheck.mandatory(this, "policyNamespace", policyNamespace);
    PropertyCheck.mandatory(this, "policyName", policyName);
    
    this.policyComponent.bindAssociationBehaviour(
            QName.createQName(this.policyNamespace, this.policyName),
            this,
            new JavaBehaviour(this, "policyBehaviour"));
}
 
Example #27
Source File: AbstractAsynchronouslyRefreshedCache.java    From alfresco-core with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void afterPropertiesSet() throws Exception
{
    PropertyCheck.mandatory(this, "threadPoolExecutor", threadPoolExecutor);
    PropertyCheck.mandatory(this, "registry", registry);
    registry.register(this);
    
    resourceKeyTxnData = RESOURCE_KEY_TXN_DATA + "." + cacheId;

}
 
Example #28
Source File: MultiTenantShareMapper.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void init()
{
    PropertyCheck.mandatory(this, "ServerConfiguration", m_config);
    PropertyCheck.mandatory(this, "Tenant share name", m_tenantShareName);
    PropertyCheck.mandatory(this, "repoDiskInterface", getRepoDiskInterface());
    PropertyCheck.mandatory(this, "Store name", m_storeName);
    PropertyCheck.mandatory(this, "Root Path", m_rootPath);
}
 
Example #29
Source File: LDAPInitialDirContextFactoryImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void setTrustStorePassPhrase(String trustStorePassPhrase)
{
    if (PropertyCheck.isValidPropertyString(trustStorePassPhrase))
    {
        this.trustStorePassPhrase = trustStorePassPhrase;
    }
}
 
Example #30
Source File: AccessAuditor.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Checks that all necessary properties have been set and binds with the policy component.
 */
public void afterPropertiesSet()
{
    PropertyCheck.mandatory(this, "properties", properties);
    PropertyCheck.mandatory(this, "policyComponent", policyComponent);
    PropertyCheck.mandatory(this, "auditComponent", auditComponent);
    PropertyCheck.mandatory(this, "transactionService", transactionService);
    PropertyCheck.mandatory(this, "namespaceService", namespaceService);
    PropertyCheck.mandatory(this, "nodeInfoFactory", nodeInfoFactory);
    
    policyComponent.bindClassBehaviour(BeforeDeleteNodePolicy.QNAME, this, new JavaBehaviour(this, "beforeDeleteNode"));
    policyComponent.bindClassBehaviour(OnCreateNodePolicy.QNAME, this, new JavaBehaviour(this, "onCreateNode"));
    policyComponent.bindClassBehaviour(OnMoveNodePolicy.QNAME, this, new JavaBehaviour(this, "onMoveNode"));
    policyComponent.bindClassBehaviour(OnUpdatePropertiesPolicy.QNAME, this, new JavaBehaviour(this, "onUpdateProperties"));
    policyComponent.bindClassBehaviour(OnAddAspectPolicy.QNAME, this, new JavaBehaviour(this, "onAddAspect"));
    policyComponent.bindClassBehaviour(OnRemoveAspectPolicy.QNAME, this, new JavaBehaviour(this, "onRemoveAspect"));

    policyComponent.bindClassBehaviour(OnContentUpdatePolicy.QNAME, this, new JavaBehaviour(this, "onContentUpdate"));
    policyComponent.bindClassBehaviour(OnContentReadPolicy.QNAME, this, new JavaBehaviour(this, "onContentRead"));

    policyComponent.bindClassBehaviour(OnCreateVersionPolicy.QNAME, ContentModel.TYPE_CONTENT, new JavaBehaviour(this, "onCreateVersion"));
    policyComponent.bindClassBehaviour(OnCreateVersionPolicy.QNAME, ContentModel.TYPE_FOLDER, new JavaBehaviour(this, "onCreateVersion"));

    policyComponent.bindClassBehaviour(OnCopyCompletePolicy.QNAME, ContentModel.TYPE_CONTENT, new JavaBehaviour(this, "onCopyComplete"));
    policyComponent.bindClassBehaviour(OnCopyCompletePolicy.QNAME, ContentModel.TYPE_FOLDER, new JavaBehaviour(this, "onCopyComplete"));

    policyComponent.bindClassBehaviour(OnCheckOut.QNAME, ContentModel.TYPE_CONTENT, new JavaBehaviour(this, "onCheckOut"));
    policyComponent.bindClassBehaviour(OnCheckIn.QNAME, ContentModel.TYPE_CONTENT, new JavaBehaviour(this, "onCheckIn"));
    policyComponent.bindClassBehaviour(OnCancelCheckOut.QNAME, ContentModel.TYPE_CONTENT, new JavaBehaviour(this, "onCancelCheckOut"));
}