Search in sources :

Example 6 with NoDump

use of org.bedework.calfacade.annotations.NoDump in project bw-calendar-engine by Bedework.

the class BwCategory method getRestoreCallback.

@NoDump
public static FromXmlCallback getRestoreCallback() {
    if (fromXmlCb == null) {
        fromXmlCb = new FromXmlCallback();
        fromXmlCb.addSkips("byteSize", "id", "seq");
        fromXmlCb.addMapField("public", "publick");
    }
    return fromXmlCb;
}
Also used : FromXmlCallback(org.bedework.util.xml.FromXmlCallback) NoDump(org.bedework.calfacade.annotations.NoDump)

Example 7 with NoDump

use of org.bedework.calfacade.annotations.NoDump in project bw-calendar-engine by Bedework.

the class BwEvent method getXicalProperties.

/**
 * Find x-properties storing the value of the named ical property
 *
 * @param val - name to match
 * @return list of matching properties - never null
 *  @throws CalFacadeException
 */
@NoProxy
@NoDump
public List<BwXproperty> getXicalProperties(final String val) throws CalFacadeException {
    List<BwXproperty> res = new ArrayList<>();
    List<BwXproperty> xs = getXproperties();
    if (xs == null) {
        return res;
    }
    for (BwXproperty x : xs) {
        if (x.getName().equals(BwXproperty.bedeworkIcalProp)) {
            List<Xpar> xpars = x.getParameters();
            Xpar xp = xpars.get(0);
            if (xp.getName().equals(val)) {
                res.add(x);
            }
        }
    }
    return res;
}
Also used : Xpar(org.bedework.calfacade.BwXproperty.Xpar) ArrayList(java.util.ArrayList) NoProxy(org.bedework.calfacade.annotations.ical.NoProxy) NoDump(org.bedework.calfacade.annotations.NoDump)

Example 8 with NoDump

use of org.bedework.calfacade.annotations.NoDump in project bw-calendar-engine by Bedework.

the class BwContact method getRestoreCallback.

@NoDump
public static FromXmlCallback getRestoreCallback() {
    if (fromXmlCb == null) {
        fromXmlCb = new FromXmlCallback();
        fromXmlCb.addSkips("byteSize", "id", "seq");
        fromXmlCb.addMapField("public", "publick");
    }
    return fromXmlCb;
}
Also used : FromXmlCallback(org.bedework.util.xml.FromXmlCallback) NoDump(org.bedework.calfacade.annotations.NoDump)

Example 9 with NoDump

use of org.bedework.calfacade.annotations.NoDump in project bw-calendar-engine by Bedework.

the class BwPrincipal method getRestoreCallback.

@NoDump
public static FromXmlCallback getRestoreCallback() {
    if (fromXmlCb == null) {
        fromXmlCb = new FromXmlCallback() {

            protected Timestamp lastAccess;

            /**
             * Last time principal modified something in our
             * system.
             */
            protected Timestamp lastModify;

            @Override
            public Object simpleValue(final Class cl, final String val) throws Throwable {
                if (cl.getCanonicalName().equals(Timestamp.class.getCanonicalName())) {
                    return Timestamp.valueOf(val);
                }
                return null;
            }
        };
        fromXmlCb.addSkips("id", "seq");
    }
    return fromXmlCb;
}
Also used : ToString(org.bedework.util.misc.ToString) FromXmlCallback(org.bedework.util.xml.FromXmlCallback) Timestamp(java.sql.Timestamp) NoDump(org.bedework.calfacade.annotations.NoDump)

Example 10 with NoDump

use of org.bedework.calfacade.annotations.NoDump in project bw-calendar-engine by Bedework.

the class BwPreferences method getRestoreCallback.

@NoDump
public static FromXmlCallback getRestoreCallback() {
    if (fromXmlCb == null) {
        fromXmlCb = new FromXmlCallback();
        fromXmlCb.addClassForName("view", BwView.class);
        fromXmlCb.addClassForName("property", BwProperty.class);
        fromXmlCb.addSkips("byteSize", "id", "seq");
    }
    return fromXmlCb;
}
Also used : FromXmlCallback(org.bedework.util.xml.FromXmlCallback) NoDump(org.bedework.calfacade.annotations.NoDump)

Aggregations

NoDump (org.bedework.calfacade.annotations.NoDump)21 ToString (org.bedework.util.misc.ToString)8 FromXmlCallback (org.bedework.util.xml.FromXmlCallback)7 CalFacadeException (org.bedework.calfacade.exc.CalFacadeException)5 TreeSet (java.util.TreeSet)4 ArrayList (java.util.ArrayList)3 NoProxy (org.bedework.calfacade.annotations.ical.NoProxy)3 Method (java.lang.reflect.Method)2 QName (javax.xml.namespace.QName)2 Dur (net.fortuna.ical4j.model.Dur)2 Xpar (org.bedework.calfacade.BwXproperty.Xpar)2 Dump (org.bedework.calfacade.annotations.Dump)2 NoWrap (org.bedework.calfacade.annotations.NoWrap)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 InputStream (java.io.InputStream)1 Blob (java.sql.Blob)1 Timestamp (java.sql.Timestamp)1 Date (java.util.Date)1 DateTime (net.fortuna.ical4j.model.DateTime)1 Period (net.fortuna.ical4j.model.Period)1