本文整理了Java中org.bedework.util.misc.Util
类的一些代码示例,展示了Util
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util
类的具体详情如下:
包路径:org.bedework.util.misc.Util
类名称:Util
暂无
代码示例来源:origin: org.bedework/bw-util-dav
/**
*/
public DavUtil(final List<Header> extraHeaders) {
this();
if (!Util.isEmpty(extraHeaders)) {
this.extraHeaders = new ArrayList<>(extraHeaders);
}
}
代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade
public static String makeKey(final String collectionHref,
final String entityName) {
if (entityName == null) {
return collectionHref;
}
return Util.buildPath(false, collectionHref,
"/",
entityName);
}
代码示例来源:origin: org.bedework/bw-access
@Override
public int compareTo(final CurrentAccess that) {
if (this == that) {
return 0;
}
int res = Util.compare(aclChars, that.aclChars);
if (res != 0) {
return res;
}
res = Util.cmpObjval(privileges, that.privileges);
if (res != 0) {
return res;
}
return Util.cmpBoolval(accessAllowed, that.accessAllowed);
}
代码示例来源:origin: org.bedework/bw-caldav-util
public void copyForAlias(final BaseEntityChangeType copy,
final String collectionHref) {
final String[] split = Util.splitName(href);
copy.href = Util.buildPath(href.endsWith("/"), collectionHref,
"/", split[1]);
copy.changedBy = changedBy;
}
代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade
@Override
public boolean differsFrom(final BwAttendee val) {
return (Util.compareStrings(val.getPartstat(), getPartstat()) != 0) ||
(Util.compareStrings(val.getCn(), getCn()) != 0) ||
(Util.compareStrings(val.getCuType(), getCuType()) != 0) ||
(Util.compareStrings(val.getDelegatedFrom(), getDelegatedFrom()) != 0) ||
(Util.compareStrings(val.getDelegatedTo(), getDelegatedTo()) != 0) ||
(Util.compareStrings(val.getDir(), getDir()) != 0) ||
(Util.compareStrings(val.getLanguage(), getLanguage()) != 0) ||
(Util.compareStrings(val.getMember(), getMember()) != 0) ||
(Util.cmpBoolval(val.getRsvp(), getRsvp()) != 0) ||
(Util.compareStrings(val.getRole(), getRole()) != 0) ||
(Util.compareStrings(val.getSentByVal(), getSentByVal()) != 0) ||
(Util.compareStrings(val.getAttendeeUri(), getAttendeeUri()) != 0) ||
(Util.cmpIntval(val.getScheduleAgent(), getScheduleAgent()) != 0);
}
代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-ical
if (!Util.isEmpty(xcompProps)) {
final BwXproperty xcompProp = xcompProps.get(0);
final String xcompPropVal = xcompProp.getValue();
info = Util.decodeArray(relx);
URI uri = Util.validURI(strval);
if (uri != null) {
pl.add(new Url(uri));
代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade
@Override
public int compareTo(final Xpar o) {
if (o == null) {
return 1;
}
final int cmp = Util.cmpObjval(getName(), o.getName());
if (cmp != 0) {
return cmp;
}
return Util.cmpObjval(getValue(), o.getValue());
}
}
代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade
final String namePart) {
if (getPublick()) {
setColPath(Util.buildPath(true,
"/public",
"/",
homeDir = userRoot;
} else {
homeDir = Util.pathElement(1, principal.getPrincipalRef());
setColPath(Util.buildPath(true,
"/",
homeDir,
代码示例来源:origin: org.bedework/bw-util-servlet
/** Get a request parameter stripped of white space. Return null for zero
* length.
*
* @param name name of parameter
* @return String value
*/
public String getReqPar(final String name) {
return Util.checkNull(request.getParameter(name));
}
代码示例来源:origin: org.bedework/bw-util2-calendar
public int compareTo(final ValueTypeEntry o) {
int res = typeElement.getNamespaceURI().compareTo(o.typeElement.getNamespaceURI());
if (res != 0) {
return res;
}
res = typeElement.getLocalPart().compareTo(o.typeElement.getLocalPart());
if (res != 0) {
return res;
}
return Util.compareStrings(value, o.value);
}
代码示例来源:origin: org.bedework/bw-util-config
return Util.propertyReplace(ndval,
new Util.PropertiesPropertyFetcher(System.getProperties()));
代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade
@Override
public int compareTo(final BwResource that) {
if (this == that) {
return 0;
}
int res = Util.cmpObjval(getColPath(), that.getColPath());
if (res != 0) {
return res;
}
return Util.cmpObjval(getName(), that.getName());
}
代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade
final String namePart) {
if (getPublick()) {
setColPath(Util.buildPath(true,
"/public",
"/",
homeDir = props.getUserCalendarRoot();
} else {
homeDir = Util.pathElement(1, principal.getPrincipalRef());
setColPath(Util.buildPath(true,
"/",
homeDir,
代码示例来源:origin: org.bedework/bw-util-servlet
/** Get a request parameter stripped of white space. Return default for null
* or zero length.
*
* @param name name of parameter
* @param def default value
* @return String value
*/
public String getReqPar(final String name, final String def) {
final String s = Util.checkNull(request.getParameter(name));
if (s != null) {
return s;
}
return def;
}
代码示例来源:origin: org.bedework/bw-util2-calendar
public int compareTo(final BaseEntityWrapper o) {
int res = Util.compareStrings(getName().getLocalPart(),
o.getName().getLocalPart());
if (res != 0) {
return res;
}
return Util.compareStrings(getName().getNamespaceURI(),
o.getName().getNamespaceURI());
}
代码示例来源:origin: org.bedework/bw-util-jmx
pfile.put(o, Util.propertyReplace(pfile.getProperty((String)o),
ppf));
代码示例来源:origin: org.bedework/bw-util-dav
/**
* @param nm a QName
* @return DavProp or null
*/
public DavProp findProp(final QName nm) {
if (Util.isEmpty(propVals)) {
return null;
}
for (DavProp dp: propVals) {
if (nm.equals(dp.name)) {
return dp;
}
}
return null;
}
@Override
代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade
public static String makePrincipalHref(final String id,
final int whoType) throws AccessException {
if (isPrincipal(id)) {
return id;
}
final String root = fromWho.get(whoType);
if (root == null) {
throw new AccessException(CalFacadeException.unknownPrincipalType);
}
return Util.buildPath(true, root, "/", id);
}
代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-api
@Override
public int compareTo(final SynchReportItem that) {
int res = token.compareTo(that.token);
if (res != 0) {
return res;
}
res = Util.cmpObjval(this.getResource(), that.getResource());
if (res != 0) {
return res;
}
res = Util.cmpObjval(this.getEvent(), that.getEvent());
if (res != 0) {
return res;
}
return Util.cmpObjval(this.getCol(), that.getCol());
}
代码示例来源:origin: org.bedework/bw-util-servlet
/** Get a multi-valued request parameter stripped of white space.
* Return null for zero length.
*
* @param name name of parameter
* @return List<String> or null
* @throws Throwable
*/
public List<String> getReqPars(final String name) throws Throwable {
String[] s = request.getParameterValues(name);
ArrayList<String> res = null;
if ((s == null) || (s.length == 0)) {
return null;
}
for (String par: s) {
par = Util.checkNull(par);
if (par != null) {
if (res == null) {
res = new ArrayList<>();
}
res.add(par);
}
}
return res;
}
内容来源于网络,如有侵权,请联系作者删除!