Code example for UriMatcher

Methods: addURI

0
	private static final int EXPORT_NUMGROUPS = 202;
	/** Internal id: export. */ 
	private static final int EXPORT_HOURGROUPS = 203;
 
	static { 
		URI_MATCHER = new UriMatcher(UriMatcher.NO_MATCH);
		URI_MATCHER.addURI(AUTHORITY, "ruleset", EXPORT_RULESET);
		URI_MATCHER.addURI(AUTHORITY, "logs", EXPORT_LOGS);
		URI_MATCHER.addURI(AUTHORITY, "numgroups", EXPORT_NUMGROUPS);
		URI_MATCHER.addURI(AUTHORITY, "hourgroups", EXPORT_HOURGROUPS);
	} 
 
	@Override 
	public int delete(final Uri uri, final String selection, final String[] selectionArgs) {
		throw new IllegalStateException("Unsupported operation: delete(" + uri + ")");
	} 
 
	@Override 
	public String getType(final Uri uri) {
		switch (URI_MATCHER.match(uri)) {