Package com.evolveum.midpoint.ninja.util
Class NinjaUtils
- java.lang.Object
-
- com.evolveum.midpoint.ninja.util.NinjaUtils
-
public class NinjaUtils extends Object
Created by Viliam Repan (lazyman).
-
-
Field Summary
Fields Modifier and Type Field Description static longCOUNT_STATUS_LOG_INTERVALstatic DecimalFormatDECIMAL_FORMATstatic longWAIT_FOR_EXECUTOR_FINISHstatic StringXML_OBJECTS_PREFIXstatic StringXML_OBJECTS_SUFFIX
-
Constructor Summary
Constructors Constructor Description NinjaUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GetOperationOptionsBuilderaddIncludeOptionsForExport(GetOperationOptionsBuilder optionsBuilder, Class<? extends ObjectType> type)static ObjectFiltercreateObjectFilter(FileReference strFilter, NinjaContext context, Class<? extends ObjectType> objectClass)static ObjectQuerycreateObjectQuery(FileReference ref, NinjaContext context, Class<? extends ObjectType> objectClass)static WritercreateWriter(File output, Charset charset, boolean zip, boolean overwrite)static <T> TgetOptions(com.beust.jcommander.JCommander jc, Class<T> type)static List<ObjectTypes>getTypes(Set<ObjectTypes> selected)static OperationResultparseResult(String result)static StringprintStackToString(Exception ex)static com.beust.jcommander.JCommandersetupCommandLineParser()
-
-
-
Field Detail
-
XML_OBJECTS_PREFIX
public static final String XML_OBJECTS_PREFIX
- See Also:
- Constant Field Values
-
XML_OBJECTS_SUFFIX
public static final String XML_OBJECTS_SUFFIX
- See Also:
- Constant Field Values
-
DECIMAL_FORMAT
public static final DecimalFormat DECIMAL_FORMAT
-
COUNT_STATUS_LOG_INTERVAL
public static final long COUNT_STATUS_LOG_INTERVAL
- See Also:
- Constant Field Values
-
WAIT_FOR_EXECUTOR_FINISH
public static final long WAIT_FOR_EXECUTOR_FINISH
- See Also:
- Constant Field Values
-
-
Method Detail
-
setupCommandLineParser
public static com.beust.jcommander.JCommander setupCommandLineParser()
-
getOptions
public static <T> T getOptions(com.beust.jcommander.JCommander jc, Class<T> type)
-
createObjectFilter
public static ObjectFilter createObjectFilter(FileReference strFilter, NinjaContext context, Class<? extends ObjectType> objectClass) throws IOException, SchemaException
- Throws:
IOExceptionSchemaException
-
createObjectQuery
public static ObjectQuery createObjectQuery(FileReference ref, NinjaContext context, Class<? extends ObjectType> objectClass) throws IOException, SchemaException
- Throws:
IOExceptionSchemaException
-
parseResult
public static OperationResult parseResult(String result)
-
createWriter
public static Writer createWriter(File output, Charset charset, boolean zip, boolean overwrite) throws IOException
- Throws:
IOException
-
addIncludeOptionsForExport
public static GetOperationOptionsBuilder addIncludeOptionsForExport(GetOperationOptionsBuilder optionsBuilder, Class<? extends ObjectType> type)
-
getTypes
public static List<ObjectTypes> getTypes(Set<ObjectTypes> selected)
-
-