public String getHref() { return getPrincipalRef(); }
/** Add a principal to the ToString object * * @param ts ToString object * @param name tag * @param val BwPrincipal */ public static void toStringSegment(final ToString ts, final String name, final BwPrincipal val) { if (val == null) { ts.append(name, "**NULL**"); } else { ts.append(name, "(" + val.getId() + ", " + val.getPrincipalRef() + ")"); } }
@Override protected void toStringSegment(final ToString ts) { super.toStringSegment(ts); Collection<String> refs = new ArrayList<String>(); Collection<BwPrincipal> ms = getGroupMembers(); if (ms != null) { for (BwPrincipal mbr: ms) { refs.add(mbr.getPrincipalRef()); } } ts.newLine().append("groupMembers", refs); }
/** * @param val * @param methodType * @param pattern * @return JSON jcal * @throws CalFacadeException */ public String toJcal(final EventInfo val, final int methodType, final IcalendarType pattern) throws CalFacadeException { String currentPrincipal = null; BwPrincipal principal = cb.getPrincipal(); if (principal != null) { currentPrincipal = principal.getPrincipalRef(); } List<EventInfo> eis = new ArrayList<>(); eis.add(val); return JcalHandler.toJcal(eis, methodType, pattern, currentPrincipal, new EventTimeZonesRegistry(this, val.getEvent())); }
/** Write a collection of calendar data as json * * @param vals * @param methodType int value fromIcalendar * @param wtr for output * @throws CalFacadeException */ public void writeJcal(final Collection<EventInfo> vals, final int methodType, final Writer wtr) throws CalFacadeException { String currentPrincipal = null; BwPrincipal principal = cb.getPrincipal(); if (principal != null) { currentPrincipal = principal.getPrincipalRef(); } JcalHandler.outJcal(wtr, vals, methodType, null, currentPrincipal, new EventTimeZonesRegistry(this, null)); }
private static EventInfo makeNewEvent(final IcalCallback cb, final int entityType, final String uid, final String colPath) throws CalFacadeException { final BwEvent ev = new BwEventObj(); final EventInfo evinfo = new EventInfo(ev); //ev.setDtstamps(); ev.setEntityType(entityType); ev.setCreatorHref(cb.getPrincipal().getPrincipalRef()); ev.setOwnerHref(cb.getOwner().getPrincipalRef()); ev.setUid(uid); ev.setColPath(colPath); final ChangeTable chg = evinfo.getChangeset(cb.getPrincipal().getPrincipalRef()); chg.changed(PropertyInfoIndex.UID, null, uid); // get that out of the way evinfo.setNewEvent(true); return evinfo; }
if (pUri.equals(cb.getCaladdr(cb.getPrincipal().getPrincipalRef()))) {
homeDir = userRoot; } else { homeDir = Util.pathElement(1, principal.getPrincipalRef());
homeDir = props.getUserCalendarRoot(); } else { homeDir = Util.pathElement(1, principal.getPrincipalRef());
@Override protected void toStringSegment(final ToString ts) { super.toStringSegment(ts); ts.append("account", getAccount()) .append("pref", getPrincipalRef()) .append("created", getCreated()) .newLine() .append("logon", getLogon()) .append("lastAccess", getLastAccess()) .append("lastModify", getLastModify()) .append("kind", getKind()); ts.append("quota", getQuota()); }
EventInfo ei = new EventInfo(fb); ChangeTable chg = ei.getChangeset(cb.getPrincipal().getPrincipalRef()); setDates(cb.getPrincipal().getPrincipalRef(), ei, (DtStart)pl.getProperty(Property.DTSTART),
currentPrincipal = principal.getPrincipalRef();
/** Copy this to val * * @param val BwPrincipal target */ public void copyTo(final BwPrincipal val) { val.setAccount(getAccount()); val.setPrincipalRef(getPrincipalRef()); val.setId(getId()); val.setSeq(getSeq()); val.setCreated(getCreated()); val.setLogon(getLogon()); val.setLastAccess(getLastAccess()); val.setLastModify(getLastModify()); val.setCategoryAccess(getCategoryAccess()); val.setLocationAccess(getLocationAccess()); val.setContactAccess(getContactAccess()); val.setGroups(getGroups()); // XXX this should be cloned }
currentPrincipal = principal.getPrincipalRef(); attUri = cb.getCaladdr(cb.getPrincipal().getPrincipalRef()); setDates(cb.getPrincipal().getPrincipalRef(), masterEI, mdtStart, null, null); e.setRecurring(true); final ChangeTable chg = evinfo.getChangeset(cb.getPrincipal().getPrincipalRef()); setDates(cb.getPrincipal().getPrincipalRef(), evinfo, dtStart, dtEnd, duration); ev.getPeruserTransparency( cb.getPrincipal() .getPrincipalRef()), pval)) { BwXproperty pu = ev.setPeruserTransparency( cb.getPrincipal().getPrincipalRef(), pval); if (pu != null) {
currentPrincipal = principal.getPrincipalRef();