org.bedework.util.misc.Util.buildPath()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(88)

本文整理了Java中org.bedework.util.misc.Util.buildPath()方法的一些代码示例,展示了Util.buildPath()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.buildPath()方法的具体详情如下:
包路径:org.bedework.util.misc.Util
类名称:Util
方法名:buildPath

Util.buildPath介绍

暂无

代码示例

代码示例来源: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-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

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-facade

public String getHref() {
 return Util.buildPath(false, getColPath(),
            "/",
            getName());
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade

private static String getHref(final BwEvent ev) throws Throwable {
  return Util.buildPath(false, ev.getColPath(), "/", ev.getName());
 }
}

代码示例来源:origin: org.bedework/bw-util-config

@Override
 public ResourceBundle newBundle(final String baseName,
                 final Locale locale,
                 final String format,
                 final ClassLoader loader,
                 final boolean reload)
     throws IllegalAccessException, InstantiationException, IOException {
  if (!format.equals("java.properties")) {
   throw new IllegalArgumentException("unknown format: " + format);
  }

  final String bundleName = toBundleName(baseName, locale);

  final String resourceName = toResourceName(bundleName, "properties");

  final ResourceBundle bundle;
  try (InputStream stream = new FileInputStream(Util.buildPath(false,
                                 dirPath,
                                 "/",
                                 resourceName))) {
   bundle = new PropertyResourceBundle(stream);
  }

  return bundle;
 }
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade

public String getHref() {
 return Util.buildPath(false, getColPath(),
            "/",
            getName());
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade

/**
 * @param pr the principal
 * @return the path for calendar home for the given principal, e.g. /user/douglm
 */
public String getCalendarHomePath(final AccessPrincipal pr) {
 if (pr.getKind() == WhoDefs.whoTypeUser) {
  return Util.buildPath(BasicSystemProperties.colPathEndsWithSlash, 
             getUserHomePath(), "/", pr.getAccount());
 }
 return Util.buildPath(BasicSystemProperties.colPathEndsWithSlash, 
            getUserHomePath(), "/", pr.getPrincipalRef());
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade

@Override
public void fixNames(final BasicSystemProperties props,
           final BwPrincipal principal) {
 if (getHref() != null) {
  return;
 }
 String extra = getWordVal();
 final String name;
 final int pos = extra.lastIndexOf("/");
 if (pos < 0) {
  name = extra;
  extra = "";
 } else {
  name = extra.substring(pos + 1);
  extra = extra.substring(0, pos);
 }
 setName(name);
 setColPath(props, principal, "categories", extra);
 setHref(Util.buildPath(false, getColPath(), getName()));
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade

@Override
public void fixNames(final BasicSystemProperties props,
           final BwPrincipal principal) {
 if (getHref() != null) {
  return;
 }
 setColPath(props, principal, "contacts", null);
 setHref(Util.buildPath(false, getColPath(), getUid()));
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade

@Override
public void fixNames(final BasicSystemProperties props,
           final BwPrincipal principal) {
 if (getHref() != null) {
  return;
 }
 setColPath(props, principal, "filters", null);
 setHref(Util.buildPath(false, getColPath(), getName()));
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade

@NoProxy
@NoDump
@IcalProperty(pindex = PropertyInfoIndex.HREF,
       jname = "href",
       required = true,
       eventProperty = true,
       todoProperty = true,
       journalProperty = true)
public String getHref() {
 return Util.buildPath(false, getColPath(), "/", getName());
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade

@Override
public void fixNames(final BasicSystemProperties props,
           final BwPrincipal principal) {
 if (getHref() != null) {
  return;
 }
 setColPath(props, principal, "locations", null);
 setHref(Util.buildPath(false, getColPath(), getUid()));
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade

final String namePart) {
if (getPublick()) {
 setColPath(Util.buildPath(true,
              "/public",
              "/",
setColPath(Util.buildPath(true,
             "/",
             homeDir,

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade

@NoProxy
@NoDump
public String getEncodedHref() {
 final String href = Util.buildPath(false, getColPath(), "/", getName());
 if (getRecurrenceId() == null) {
  return href;
 }
 return href + "%23" + getRecurrenceId();
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade

public String makeKey() {
 if (getEntityName() == null) {
  return getCollection().getPath();
 }
 
 return Util.buildPath(false, getCollection().getPath(),
            "/",
            getEntityName());
}

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade

final String namePart) {
if (getPublick()) {
 setColPath(Util.buildPath(true,
            "/public",
            "/",
setColPath(Util.buildPath(true,
             "/",
             homeDir,

代码示例来源:origin: org.bedework.caleng/bw-calendar-engine-facade

/** Set from Calsuite
 *
 * @param val    BwCalsuite
 */
@NoDump
public static BwCalSuitePrincipal from(final BwCalSuite val) {
 final BwCalSuitePrincipal csp = new BwCalSuitePrincipal();
 csp.setPrincipalRef(Util.buildPath(true,
                 BwPrincipal.calsuitePrincipalRoot,
                 "/", val.getName()));
 csp.setAccount(val.getName());
 csp.setGroup(val.getGroup());
 csp.setRootCollectionPath(val.getRootCollectionPath());
 csp.setSubmissionsRootPath(val.getSubmissionsRootPath());
 return csp;
}

相关文章

微信公众号

最新文章

更多