Package com.day.cq.dam.handler.ffmpeg
Class LocatorImpl
- java.lang.Object
-
- com.day.cq.dam.handler.ffmpeg.LocatorImpl
-
- All Implemented Interfaces:
ExecutableLocator
@Service @Properties(@Property(name="service.description",value="CQ Executable Locator")) public class LocatorImpl extends java.lang.Object implements ExecutableLocator
Finds an executable on a configurable search path.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROP_SEARCH_PATH
-
Constructor Summary
Constructors Constructor Description LocatorImpl()
Default constructor for SCR.LocatorImpl(java.lang.String[] searchPath)
Constructor for non-OSGi component usage.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getPath(java.lang.String cmd)
Returns the absolute path to an executable, if found, ornull
if it could not be found.static java.lang.String[]
getPathEnv()
-
-
-
Field Detail
-
PROP_SEARCH_PATH
@Property({"/opt/local/bin","/usr/local/bin","PATH"}) public static final java.lang.String PROP_SEARCH_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPath
public java.lang.String getPath(java.lang.String cmd)
Description copied from interface:ExecutableLocator
Returns the absolute path to an executable, if found, ornull
if it could not be found.- Specified by:
getPath
in interfaceExecutableLocator
- Parameters:
cmd
- the name of an executable file (e.g. "ffmpeg")- Returns:
- absolute path to executable or
null
-
getPathEnv
public static java.lang.String[] getPathEnv()
-
-