@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);
    PropertyCheck.mandatory(this, "methodSecurity", methodSecurity);
  }
예제 #2
0
  /** 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");
    }
  }
  /** Initialise - after bootstrap of schema and tenant admin service */
  public void init() {
    PropertyCheck.mandatory(this, "dictionaryDAO", dictionaryDAO);
    PropertyCheck.mandatory(this, "contentService", contentService);
    PropertyCheck.mandatory(this, "nodeService", nodeService);
    PropertyCheck.mandatory(this, "tenantAdminService", tenantAdminService);
    PropertyCheck.mandatory(this, "namespaceService", namespaceService);
    PropertyCheck.mandatory(this, "messageService", messageService);
    PropertyCheck.mandatory(this, "transactionService", transactionService);
    PropertyCheck.mandatory(this, "policyComponent", policyComponent);

    if (onLoadDynamicModelDelegate == null) {
      onLoadDynamicModelDelegate =
          policyComponent.registerClassPolicy(DynamicModelPolicies.OnLoadDynamicModel.class);
    }

    transactionService
        .getRetryingTransactionHelper()
        .doInTransaction(
            new RetryingTransactionCallback<Object>() {
              public Object execute() throws Exception {
                onDictionaryInit();
                initMessages();

                return (Object) null;
              }
            },
            transactionService.isReadOnly(),
            false);
  }
  /** Ensures that all properties have been set */
  public void afterPropertiesSet() throws Exception {
    PropertyCheck.mandatory(this, "name", name);
    PropertyCheck.mandatory(this, "sharedCache", sharedCache);

    // generate the resource binding key
    resourceKeyTxnData = RESOURCE_KEY_TXN_DATA + "." + name;
    // Refine the log category
    logger = LogFactory.getLog(TransactionalCache.class.getName() + "." + name);
    isDebugEnabled = logger.isDebugEnabled();

    // Assign a 'null' cache if write-through is disabled
    if (disableSharedCache) {
      sharedCache = NullCache.getInstance();
    }
  }
  /** {@inheritDoc} */
  @Override
  public void afterPropertiesSet() throws Exception {
    PropertyCheck.mandatory(this, "policyComponent", this.policyComponent);
    PropertyCheck.mandatory(this, "auditComponent", this.auditComponent);

    this.policyComponent.bindClassBehaviour(
        OnCreateNodePolicy.QNAME,
        ContentModel.TYPE_RATING,
        new JavaBehaviour(this, "onCreateNode", NotificationFrequency.EVERY_EVENT));
    this.policyComponent.bindClassBehaviour(
        BeforeDeleteNodePolicy.QNAME,
        ContentModel.TYPE_RATING,
        new JavaBehaviour(this, "beforeDeleteNode", NotificationFrequency.EVERY_EVENT));
    this.policyComponent.bindClassBehaviour(
        OnUpdatePropertiesPolicy.QNAME,
        ContentModel.TYPE_RATING,
        new JavaBehaviour(this, "onUpdateProperties", NotificationFrequency.EVERY_EVENT));
  }
  public void init() {
    PropertyCheck.mandatory(this, "policyComponent", policyComponent);
    PropertyCheck.mandatory(this, "behaviourFilter", behaviourFilter);
    PropertyCheck.mandatory(this, "ruleService", ruleService);
    PropertyCheck.mandatory(this, "nodeService", nodeService);

    this.policyComponent.bindClassBehaviour(
        QName.createQName(NamespaceService.ALFRESCO_URI, "getCopyCallback"),
        RuleModel.ASPECT_RULES,
        new JavaBehaviour(this, "getCopyCallback"));
    this.policyComponent.bindClassBehaviour(
        QName.createQName(NamespaceService.ALFRESCO_URI, "onCopyComplete"),
        RuleModel.ASPECT_RULES,
        new JavaBehaviour(this, "onCopyComplete"));
    this.policyComponent.bindClassBehaviour(
        QName.createQName(NamespaceService.ALFRESCO_URI, "onAddAspect"),
        RuleModel.ASPECT_RULES,
        new JavaBehaviour(this, "onAddAspect"));
  }
예제 #7
0
 public void init() {
   PropertyCheck.mandatory(this, "dictionaryService", dictionaryService);
   PropertyCheck.mandatory(this, "nodeService", nodeService);
   PropertyCheck.mandatory(this, "fileFolderService", fileFolderService);
   PropertyCheck.mandatory(this, "permissionService", permissionService);
   PropertyCheck.mandatory(this, "lockService", lockService);
   PropertyCheck.mandatory(this, "mimetypeService", mimetypeService);
   PropertyCheck.mandatory(this, "transactionHelper", getRetryingTransactionHelper());
 }
  public void afterPropertiesSet() throws IOException, CacheException {
    PropertyCheck.mandatory(this, "configLocation", configLocation);

    // Double-check the config location or EHCache will throw an NPE
    try {
      URL configUrl = this.configLocation.getURL();
      logger.info("Initializing EHCache CacheManager using URL: " + configLocation);
      this.cacheManager = new CacheManager(configUrl);
    } catch (IOException e) {
      throw new AlfrescoRuntimeException(
          "Unabled to read EHCache configuration file at " + configLocation, e);
    }
  }
  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);

    for (SolrStoreMapping mapping : storeMappings) {
      mappingLookup.put(mapping.getStoreRef(), new SolrStoreMappingWrapper(mapping, beanFactory));
    }
  }
 @Override
 public void init() {
   super.init();
   PropertyCheck.mandatory(this, "template", template);
 }
 /**
  * @return Returns the WebDAV root path within the store
  * @throws ServletException if the root path was not set
  */
 public String getRootPath() throws ServletException {
   if (!PropertyCheck.isValidPropertyString(rootPath)) {
     throw new ServletException("WebDAV missing 'rootPath' value.");
   }
   return rootPath;
 }
 /**
  * @return Returns the name of the store
  * @throws ServletException if the store name was not set
  */
 public String getStoreName() throws ServletException {
   if (!PropertyCheck.isValidPropertyString(storeName)) {
     throw new ServletException("WebDAV missing 'storeName' value.");
   }
   return storeName;
 }
예제 #13
0
 public void init() {
   PropertyCheck.mandatory(this, "diskInterface", diskInterface);
 }
 public void init() {
   PropertyCheck.mandatory(this, "diskInterface", diskInterface);
   PropertyCheck.mandatory(this, "ruleEvaluator", getRuleEvaluator());
   PropertyCheck.mandatory(this, "repositoryDiskInterface", getRepositoryDiskInterface());
   PropertyCheck.mandatory(this, "commandExecutor", getCommandExecutor());
 }
 /** Initialize */
 public void init() {
   PropertyCheck.mandatory(this, "solrDAO", solrDAO);
   PropertyCheck.mandatory(this, "nodeDAO", nodeDAO);
   PropertyCheck.mandatory(this, "qnameDAO", qnameDAO);
   PropertyCheck.mandatory(this, "permissionService", permissionService);
   PropertyCheck.mandatory(this, "ownableService", ownableService);
   PropertyCheck.mandatory(this, "tenantService", tenantService);
   PropertyCheck.mandatory(this, "dictionaryService", dictionaryService);
   PropertyCheck.mandatory(this, "dictionaryDAO", dictionaryDAO);
   PropertyCheck.mandatory(this, "aclDAO", aclDAO);
   PropertyCheck.mandatory(this, "typeIndexFilter", typeIndexFilter);
   PropertyCheck.mandatory(this, "aspectIndexFilter", aspectIndexFilter);
 }
  /** {@inheritDoc} */
  @Override
  public void afterPropertiesSet() {
    PropertyCheck.mandatory(this, "registry", this.registry);

    this.registry.registerValueInstanceConverter(String.class, this);
  }
예제 #17
0
 public void init() {
   PropertyCheck.mandatory(this, "nodeService", nodeService);
   PropertyCheck.mandatory(this, "contentService", contentService);
 }
 public void init() {
   PropertyCheck.mandatory(this, "contentService", getContentService());
   PropertyCheck.mandatory(this, "contentUsageService", m_usageService);
 }