/** * Perform hashing on given String <code>source</code>. UTF-8 encoding is used for source to bytes conversion. * @param algorithmName Hash algorithm to use * @param source Source string * @param salt Optional salt * @param iterations Hash iterations to perform * @return Hashed source as bytes array * @throws NoSuchAlgorithmException Hash algorithm is not available in the environment */ public static byte[] hash(String algorithmName, String source, byte[] salt, int iterations) throws NoSuchAlgorithmException { return hash(algorithmName, ConversionUtils.toBytes(source), salt, iterations); }
/** * Constructor. * @param delegate Delegate transaction (not null) */ public AbstractDelegatedTransaction(T delegate) { super(); ObjectUtils.argumentNotNull(delegate, "Delegate transaction must be not null"); this.delegate = delegate; }
/** * Construct a new PropertyRendererRegistry * @param loadDefaults <code>true</code> to load default {@link PropertyRenderer}s from * <code>META-INF/services</code> using <code>com.holonplatform.core.property.PropertyRenderer</code> files * using default ClassLoader. Every default renderer will be registered using an always <code>true</code> * condition. */ public DefaultPropertyRendererRegistry(boolean loadDefaults) { this(loadDefaults, ClassUtils.getDefaultClassLoader()); }
/** * Convert a {@link Date} value into a {@link LocalDate}, using default calendar and default time zone. * @param date Date to convert (may be null) * @return Converted {@link LocalDate}, or <code>null</code> if given date was <code>null</code> */ public static LocalDate toLocalDate(Date date) { return toLocalDate(date, null); }
/** * Constructor * @param value Constant value * @param type Value type (not null) */ public DefaultConstantExpression(T value, Class<? extends T> type) { super(); ObjectUtils.argumentNotNull(type, "Value type must be not null"); this.value = value; this.type = type; }
/** * Constructor. * @param queryAdapter Query adapter (not null) * @param queryDefinition Query definition (not null) */ public QueryAdapterQuery(QueryAdapter<? super D> queryAdapter, D queryDefinition) { super(queryDefinition); ObjectUtils.argumentNotNull(queryAdapter, "QueryAdapter must be not null"); this.queryAdapter = queryAdapter; }
/** * Constructor. * @param source Source context (not null) */ public DefaultLocalizationChangeEvent(LocalizationContext source) { super(); ObjectUtils.argumentNotNull(source, "LocalizationContext must be not null"); this.source = source; }
/** * Constructor * @param propertySet PropertySet instance to use */ @SuppressWarnings("unchecked") public AbstractPropertyBox(PropertySet<? extends Property> propertySet) { super(); ObjectUtils.argumentNotNull(propertySet, "PropertySet must be not null"); this.propertySet = (PropertySet<Property>) propertySet; }
/** * Constructor for non-leaf nodes. * @param name Serialization name */ public DefaultPropertySetSerializationNode(String name) { super(); ObjectUtils.argumentNotNull(name, "Serialization name must be not null"); this.name = name; this.property = null; }
public DefaultThemableLayoutConfigurator(ThemableLayout component) { super(); ObjectUtils.argumentNotNull(component, "The component to configure must be not null"); this.component = component; }
/** * Constructor. * @param input The actual Input (not null) * @param converter The value converter (not null) */ public InputConverterAdapter(Input<T> input, Converter<T, V> converter) { super(); ObjectUtils.argumentNotNull(input, "Input must be not null"); ObjectUtils.argumentNotNull(converter, "Converter must be not null"); this.input = input; this.converter = converter; }
public DefaultGroupElementValidationStatusEvent(S source, P property, E element, Status status, List<Localizable> errors) { super(source, status, errors); ObjectUtils.argumentNotNull(property, "Property must be not null"); ObjectUtils.argumentNotNull(element, "Group element must be not null"); this.property = property; this.element = element; }
/** * Constructor * @param request Vaadin request (not null) */ public DefaultVaadinHttpRequest(VaadinRequest request) { super(); ObjectUtils.argumentNotNull(request, "VaadinRequest must be not null"); this.request = request; }
public DefaultItemListingFooterRow(FooterRow row, Function<P, Column<?>> propertyColumnProvider) { super(); ObjectUtils.argumentNotNull(row, "Row must be not null"); ObjectUtils.argumentNotNull(propertyColumnProvider, "Property column provider must be not null"); this.row = row; this.propertyColumnProvider = propertyColumnProvider; }
public DefaultItemListingFooterSection(Grid<?> grid, Function<P, Column<?>> propertyColumnProvider) { super(); ObjectUtils.argumentNotNull(grid, "Grid must be not null"); ObjectUtils.argumentNotNull(propertyColumnProvider, "Property column provider must be not null"); this.grid = grid; this.propertyColumnProvider = propertyColumnProvider; }
/** * Constructor. * @param component Component to configure (not null) */ public DefaultHasValueChangeModeConfigurator(HasValueChangeMode component) { super(); ObjectUtils.argumentNotNull(component, "The component to configure must be not null"); this.component = component; }
/** * Constructor. * @param getter label text supplier (not null) * @param setter label text consumer (not null) */ public CallbackHasLabel(Supplier<String> getter, Consumer<String> setter) { super(); ObjectUtils.argumentNotNull(getter, "The label text supplier must be not null"); ObjectUtils.argumentNotNull(setter, "The label text consumer must be not null"); this.getter = getter; this.setter = setter; }
/** * Constructor. * @param component Component to configure (not null) */ public DefaultHasEnabledConfigurator(HasEnabled component) { super(); ObjectUtils.argumentNotNull(component, "The component to configure must be not null"); this.component = component; }
/** * Constructor. * @param grid The Grid to use */ protected AbstractItemListing(Grid<T> grid) { super(); ObjectUtils.argumentNotNull(grid, "Grid must be not null"); this.grid = grid; }
public ItemListingContextMenuItemBuilder(B parentBuilder, MenuItem menuItem, ContextMenuItemListenerHandler<T, P> handler) { super(); ObjectUtils.argumentNotNull(parentBuilder, "Parent builder must be not null"); ObjectUtils.argumentNotNull(menuItem, "Menu item must be not null"); this.parentBuilder = parentBuilder; this.menuItem = menuItem; this.handler = handler; }