Java Code Examples for org.apache.wicket.util.lang.Args#notEmpty()

The following examples show how to use org.apache.wicket.util.lang.Args#notEmpty() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InfinitePagingDataTable.java    From sakai with Educational Community License v2.0 6 votes vote down vote up
public InfinitePagingDataTable(String id, final List<? extends IColumn<T, S>> columns, final InfiniteDataProvider<T> dataProvider, final long rowsPerPage)
{
	super(id);

	Args.notEmpty(columns, "columns");

	this.columns = columns;
	this.caption = new Caption("caption", getCaptionModel());
	add(caption);
	body = newBodyContainer("body");
	datagrid = newInfinitePagingDataGridView("rows", columns, dataProvider);
	datagrid.setItemsPerPage(rowsPerPage);
	body.add(datagrid);
	add(body);
	topToolbars = new ToolbarsContainer("topToolbars");
	bottomToolbars = new ToolbarsContainer("bottomToolbars");
	add(topToolbars);
	add(bottomToolbars);
}
 
Example 2
Source File: InfinitePagingDataTable.java    From sakai with Educational Community License v2.0 6 votes vote down vote up
public InfinitePagingDataTable(String id, final List<? extends IColumn<T, S>> columns, final InfiniteDataProvider<T> dataProvider, final long rowsPerPage)
{
	super(id);

	Args.notEmpty(columns, "columns");

	this.columns = columns;
	this.caption = new Caption("caption", getCaptionModel());
	add(caption);
	body = newBodyContainer("body");
	datagrid = newInfinitePagingDataGridView("rows", columns, dataProvider);
	datagrid.setItemsPerPage(rowsPerPage);
	body.add(datagrid);
	add(body);
	topToolbars = new ToolbarsContainer("topToolbars");
	bottomToolbars = new ToolbarsContainer("bottomToolbars");
	add(topToolbars);
	add(bottomToolbars);
}
 
Example 3
Source File: RedirectRequestHandler.java    From onedev with MIT License 5 votes vote down vote up
/**
 * @param redirectUrl
 *            URL to redirect to.
 * @param status
 *            301 (Moved permanently) or 302 (Moved temporarily)
 */
public RedirectRequestHandler(final String redirectUrl, final int status)
{
	if ((status != HttpServletResponse.SC_MOVED_PERMANENTLY) &&
		(status != HttpServletResponse.SC_MOVED_TEMPORARILY) &&
		(status != HttpServletResponse.SC_SEE_OTHER))
	{
		throw new IllegalStateException("Status must be either 301, 302 or 303, but was: " + status);
	}
	this.redirectUrl = Args.notEmpty(redirectUrl, "redirectUrl");
	this.status = status;
}
 
Example 4
Source File: OIndexPrototyper.java    From wicket-orientdb with Apache License 2.0 5 votes vote down vote up
public OIndexPrototyper(String className, List<String> fields)
{
	Args.notEmpty(fields, "fields");
	values.put(DEF_CLASS_NAME, className);
	values.put(DEF_FIELDS, fields);
	values.put(DEF_NULLS_IGNORED, true);
	if(fields!=null && fields.size()==1) {
		values.put(NAME, className+"."+fields.get(0));
	}
}
 
Example 5
Source File: AbstractSimpleVisualizer.java    From Orienteer with Apache License 2.0 5 votes vote down vote up
public AbstractSimpleVisualizer(String name, boolean extended,
		Collection<OType> supportedTypes)
{
	Args.notNull(name, "name");
	Args.notNull(supportedTypes, "supportedTypes");
	Args.notEmpty(supportedTypes, "supportedTypes");
	
	this.name = name;
	this.extended = extended;
	this.supportedTypes = Collections.unmodifiableCollection(supportedTypes);
}
 
Example 6
Source File: SimpleVisualizer.java    From Orienteer with Apache License 2.0 5 votes vote down vote up
public SimpleVisualizer(String name, boolean extended, Class<? extends Component> viewComponentClass, 
							Class<? extends Component> editComponentClass, Collection<OType> supportedTypes)
{
	super(name, extended, supportedTypes);
	Args.notNull(name, "name");
	Args.notNull(viewComponentClass, "viewComponentClass");
	Args.notNull(editComponentClass, "editComponentClass");
	Args.notNull(supportedTypes, "supportedTypes");
	Args.notEmpty(supportedTypes, "supportedTypes");
	this.viewComponentClass = viewComponentClass;
	this.editComponentClass = editComponentClass;
}