Class CryptodocSwitchableApplicationContextFactory
- java.lang.Object
-
- org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
-
- org.alfresco.repo.management.subsystems.SwitchableApplicationContextFactory
-
- org.alfresco.repo.management.subsystems.CryptodocSwitchableApplicationContextFactory
-
- All Implemented Interfaces:
java.util.EventListener,ApplicationContextFactory,PropertyBackedBean,PropertyBackedBeanState,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
public class CryptodocSwitchableApplicationContextFactory extends SwitchableApplicationContextFactory
SwitchableApplicationContextFactorythat only allows the subsystem to be switched if the current subsystem is the unencrypted content store. When an attempt is made to switch away from any other store (e.g. the encrypted store) then nothing happens. This is achieved by returningfalseforisUpdateable(String)calls when the current sourceBeanName is that of the unencrypted content store's subsystem.- Author:
- Matt Ward
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classCryptodocSwitchableApplicationContextFactory.CryptoSwitchableState-
Nested classes/interfaces inherited from class org.alfresco.repo.management.subsystems.SwitchableApplicationContextFactory
SwitchableApplicationContextFactory.SwitchableState
-
Nested classes/interfaces inherited from class org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
AbstractPropertyBackedBean.DefaultResolver, AbstractPropertyBackedBean.RuntimeState
-
-
Field Summary
-
Fields inherited from class org.alfresco.repo.management.subsystems.SwitchableApplicationContextFactory
sourceBeanName
-
Fields inherited from class org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
DEFAULT_INSTANCE_NAME, lock, runtimeState
-
-
Constructor Summary
Constructors Constructor Description CryptodocSwitchableApplicationContextFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PropertyBackedBeanStatecreateInitialState()Creates the initial state.java.lang.StringgetEncryptedContentStoreBeanName()booleanisUpdateable(java.lang.String name)Checks if a property is updateable.voidonApplicationEvent(org.springframework.context.ApplicationEvent event)voidsetEncryptedContentStoreBeanName(java.lang.String encryptedContentStoreBeanName)voidsetUnencryptedContentStoreBeanName(java.lang.String unencryptedContentStoreBeanName)The bean name of the unencrypted ContentStore subsystem.-
Methods inherited from class org.alfresco.repo.management.subsystems.SwitchableApplicationContextFactory
getApplicationContext, getCurrentSourceBeanName, setSourceBeanName
-
Methods inherited from class org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
afterPropertiesSet, applyDefaultOverrides, destroy, destroy, doInit, getCategory, getDescription, getEncryptedPropertyDefaults, getId, getInstancePath, getParent, getProperty, getPropertyDefaults, getPropertyNames, getRegistry, getState, init, performEarlyPropertyChecks, removeProperties, removeProperty, resolveDefault, revert, setApplicationContext, setAutoStart, setBeanName, setCategory, setEarlyPropertyCheckers, setEncryptedPropertyDefaults, setInstancePath, setProperties, setProperty, setPropertyDefaults, setRegistry, setSaveSetProperty, start, start, stop, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.alfresco.repo.management.subsystems.PropertyBackedBean
getDescription, getId, removeProperties, revert, setProperties
-
Methods inherited from interface org.alfresco.repo.management.subsystems.PropertyBackedBeanState
getProperty, getPropertyNames, removeProperty, setProperty, start, stop
-
-
-
-
Method Detail
-
isUpdateable
public boolean isUpdateable(java.lang.String name)
Description copied from class:AbstractPropertyBackedBeanChecks if a property is updateable.- Specified by:
isUpdateablein interfacePropertyBackedBean- Overrides:
isUpdateablein classAbstractPropertyBackedBean- Parameters:
name- the property name- Returns:
trueif the property is updateable
-
createInitialState
protected PropertyBackedBeanState createInitialState() throws java.io.IOException
Description copied from class:AbstractPropertyBackedBeanCreates the initial state.- Overrides:
createInitialStatein classSwitchableApplicationContextFactory- Returns:
- the property backed bean state
- Throws:
java.io.IOException- Signals that an I/O exception has occurred.
-
setUnencryptedContentStoreBeanName
public void setUnencryptedContentStoreBeanName(java.lang.String unencryptedContentStoreBeanName)
The bean name of the unencrypted ContentStore subsystem.- Parameters:
unencryptedContentStoreBeanName- String
-
getEncryptedContentStoreBeanName
public java.lang.String getEncryptedContentStoreBeanName()
-
setEncryptedContentStoreBeanName
public void setEncryptedContentStoreBeanName(java.lang.String encryptedContentStoreBeanName)
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
Description copied from class:AbstractPropertyBackedBean- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>- Overrides:
onApplicationEventin classAbstractPropertyBackedBean
-
-