Class Beans
- java.lang.Object
-
- org.apereo.cas.configuration.support.Beans
-
public class Beans extends java.lang.Object
A re-usable collection of utility methods for object instantiations and configurations used cross various@Bean
creation methods throughout CAS server.- Since:
- 5.0.0
-
-
Constructor Summary
Constructors Constructor Description Beans()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getTempFilePath(java.lang.String prefix, java.lang.String suffix)
Gets temp file path.static boolean
isInfinitelyDurable(java.lang.String value)
Is infinitely durable?static boolean
isNeverDurable(java.lang.String value)
Is never durable?static java.time.Duration
newDuration(java.lang.String value)
New duration.static org.apereo.services.persondir.IPersonAttributeDao
newStubAttributeRepository(PrincipalAttributesProperties p)
New attribute repository person attribute dao.static org.springframework.beans.factory.FactoryBean<java.util.concurrent.ExecutorService>
newThreadPoolExecutorFactoryBean(ConnectionPoolingProperties config)
New thread pool executor factory bean.
-
-
-
Method Detail
-
newThreadPoolExecutorFactoryBean
public static org.springframework.beans.factory.FactoryBean<java.util.concurrent.ExecutorService> newThreadPoolExecutorFactoryBean(ConnectionPoolingProperties config)
New thread pool executor factory bean.- Parameters:
config
- the config- Returns:
- the thread pool executor factory bean
-
newStubAttributeRepository
public static org.apereo.services.persondir.IPersonAttributeDao newStubAttributeRepository(PrincipalAttributesProperties p)
New attribute repository person attribute dao.- Parameters:
p
- the properties- Returns:
- the person attribute dao
-
newDuration
public static java.time.Duration newDuration(java.lang.String value)
New duration. If the provided length is duration, it will be parsed accordingly, or if it's a numeric value it will be pared as a duration assuming it's provided as seconds.- Parameters:
value
- the length in seconds.- Returns:
- the duration
-
isInfinitelyDurable
public static boolean isInfinitelyDurable(java.lang.String value)
Is infinitely durable?- Parameters:
value
- the value- Returns:
- true/false
-
isNeverDurable
public static boolean isNeverDurable(java.lang.String value)
Is never durable?- Parameters:
value
- the value- Returns:
- true/false
-
getTempFilePath
public static java.lang.String getTempFilePath(java.lang.String prefix, java.lang.String suffix)
Gets temp file path.- Parameters:
prefix
- the prefixsuffix
- the suffix- Returns:
- the temp file path
-
-