From 34bdb5f4e3f9cf1da2d7cb3e3986b99936e33906 Mon Sep 17 00:00:00 2001 From: fortuna Date: Sun, 17 Jan 2010 05:31:21 +0000 Subject: [PATCH] Added custom groupwise and exchange properties --- .../extensions/property/GwAutodateKey.java | 105 ++++++++++++++++ .../extensions/property/GwItemType.java | 111 +++++++++++++++++ .../extensions/property/GwMessageId.java | 105 ++++++++++++++++ .../extensions/property/GwRecordId.java | 105 ++++++++++++++++ .../ical4j/extensions/property/GwshowAs.java | 111 +++++++++++++++++ .../extensions/property/LicLocation.java | 105 ++++++++++++++++ .../property/MicrosoftCdoAllDayEvent.java | 115 ++++++++++++++++++ .../property/MicrosoftCdoBusyStatus.java | 115 ++++++++++++++++++ .../property/MicrosoftCdoImportance.java | 105 ++++++++++++++++ .../property/MicrosoftCdoInstType.java | 105 ++++++++++++++++ 10 files changed, 1082 insertions(+) create mode 100755 src/main/java/net/fortuna/ical4j/extensions/property/GwAutodateKey.java create mode 100755 src/main/java/net/fortuna/ical4j/extensions/property/GwItemType.java create mode 100755 src/main/java/net/fortuna/ical4j/extensions/property/GwMessageId.java create mode 100755 src/main/java/net/fortuna/ical4j/extensions/property/GwRecordId.java create mode 100755 src/main/java/net/fortuna/ical4j/extensions/property/GwshowAs.java create mode 100755 src/main/java/net/fortuna/ical4j/extensions/property/LicLocation.java create mode 100755 src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoAllDayEvent.java create mode 100755 src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoBusyStatus.java create mode 100755 src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoImportance.java create mode 100755 src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoInstType.java diff --git a/src/main/java/net/fortuna/ical4j/extensions/property/GwAutodateKey.java b/src/main/java/net/fortuna/ical4j/extensions/property/GwAutodateKey.java new file mode 100755 index 0000000..84a5bea --- /dev/null +++ b/src/main/java/net/fortuna/ical4j/extensions/property/GwAutodateKey.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2009, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.extensions.property; + +import net.fortuna.ical4j.model.Parameter; +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.PropertyFactory; +import net.fortuna.ical4j.model.ValidationException; +import net.fortuna.ical4j.util.ParameterValidator; + +/** + * @author fortuna + * + */ +public class GwAutodateKey extends Property { + + private static final String NAME = "X-GWAUTODATE-KEY"; + + public static final PropertyFactory FACTORY = new Factory(); + + private String value; + + /** + * @param factory + */ + public GwAutodateKey(PropertyFactory factory) { + super(NAME, factory); + } + + /** + * @param aList + * @param factory + */ + public GwAutodateKey(ParameterList aList, PropertyFactory factory, String value) { + super(NAME, aList, factory); + setValue(value); + } + + /** + * {@inheritDoc} + */ + @Override + public void setValue(String aValue) { + this.value = aValue; + } + + /** + * {@inheritDoc} + */ + @Override + public void validate() throws ValidationException { + ParameterValidator.getInstance().assertOneOrLess(Parameter.VALUE, + getParameters()); + } + + /** + * {@inheritDoc} + */ + @Override + public String getValue() { + return value; + } + + private static class Factory implements PropertyFactory { + + public Property createProperty(String name) { + return new GwAutodateKey(this); + } + + public Property createProperty(String name, ParameterList parameters, String value) { + GwAutodateKey property = new GwAutodateKey(parameters, this, value); + return property; + } + } +} diff --git a/src/main/java/net/fortuna/ical4j/extensions/property/GwItemType.java b/src/main/java/net/fortuna/ical4j/extensions/property/GwItemType.java new file mode 100755 index 0000000..fc83cb8 --- /dev/null +++ b/src/main/java/net/fortuna/ical4j/extensions/property/GwItemType.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) 2009, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.extensions.property; + +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.PropertyFactory; +import net.fortuna.ical4j.model.ValidationException; + +/** + * @author fortuna + * + */ +public class GwItemType extends Property { + + private static final String NAME = "X-GWITEM-TYPE"; + + public static final PropertyFactory FACTORY = new Factory(); + + public static final GwItemType APPOINTMENT = new GwItemType(new ParameterList(true), FACTORY, "APPOINTMENT"); + + private String value; + + /** + * @param factory + */ + public GwItemType(PropertyFactory factory) { + super(NAME, factory); + } + + /** + * @param aList + * @param factory + */ + public GwItemType(ParameterList aList, PropertyFactory factory, String value) { + super(NAME, aList, factory); + setValue(value); + } + + /** + * {@inheritDoc} + */ + @Override + public void setValue(String aValue) { + this.value = aValue; + } + + /** + * {@inheritDoc} + */ + @Override + public void validate() throws ValidationException { + // TODO Auto-generated method stub + + } + + /** + * {@inheritDoc} + */ + @Override + public String getValue() { + return value; + } + + private static class Factory implements PropertyFactory { + + public Property createProperty(String name) { + return new GwItemType(this); + } + + public Property createProperty(String name, ParameterList parameters, String value) { + GwItemType property = null; + if (APPOINTMENT.getValue().equals(value)) { + property = APPOINTMENT; + } + else { + property = new GwItemType(parameters, this, value); + } + return property; + } + } +} diff --git a/src/main/java/net/fortuna/ical4j/extensions/property/GwMessageId.java b/src/main/java/net/fortuna/ical4j/extensions/property/GwMessageId.java new file mode 100755 index 0000000..5288047 --- /dev/null +++ b/src/main/java/net/fortuna/ical4j/extensions/property/GwMessageId.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2009, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.extensions.property; + +import net.fortuna.ical4j.model.Parameter; +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.PropertyFactory; +import net.fortuna.ical4j.model.ValidationException; +import net.fortuna.ical4j.util.ParameterValidator; + +/** + * @author fortuna + * + */ +public class GwMessageId extends Property { + + private static final String NAME = "X-GWMESSAGEID"; + + public static final PropertyFactory FACTORY = new Factory(); + + private String value; + + /** + * @param factory + */ + public GwMessageId(PropertyFactory factory) { + super(NAME, factory); + } + + /** + * @param aList + * @param factory + */ + public GwMessageId(ParameterList aList, PropertyFactory factory, String value) { + super(NAME, aList, factory); + setValue(value); + } + + /** + * {@inheritDoc} + */ + @Override + public void setValue(String aValue) { + this.value = aValue; + } + + /** + * {@inheritDoc} + */ + @Override + public void validate() throws ValidationException { + ParameterValidator.getInstance().assertOneOrLess(Parameter.VALUE, + getParameters()); + } + + /** + * {@inheritDoc} + */ + @Override + public String getValue() { + return value; + } + + private static class Factory implements PropertyFactory { + + public Property createProperty(String name) { + return new GwMessageId(this); + } + + public Property createProperty(String name, ParameterList parameters, String value) { + GwMessageId property = new GwMessageId(parameters, this, value); + return property; + } + } +} diff --git a/src/main/java/net/fortuna/ical4j/extensions/property/GwRecordId.java b/src/main/java/net/fortuna/ical4j/extensions/property/GwRecordId.java new file mode 100755 index 0000000..1a1d0f5 --- /dev/null +++ b/src/main/java/net/fortuna/ical4j/extensions/property/GwRecordId.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2009, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.extensions.property; + +import net.fortuna.ical4j.model.Parameter; +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.PropertyFactory; +import net.fortuna.ical4j.model.ValidationException; +import net.fortuna.ical4j.util.ParameterValidator; + +/** + * @author fortuna + * + */ +public class GwRecordId extends Property { + + private static final String NAME = "X-RECORDID"; + + public static final PropertyFactory FACTORY = new Factory(); + + private String value; + + /** + * @param factory + */ + public GwRecordId(PropertyFactory factory) { + super(NAME, factory); + } + + /** + * @param aList + * @param factory + */ + public GwRecordId(ParameterList aList, PropertyFactory factory, String value) { + super(NAME, aList, factory); + setValue(value); + } + + /** + * {@inheritDoc} + */ + @Override + public void setValue(String aValue) { + this.value = aValue; + } + + /** + * {@inheritDoc} + */ + @Override + public void validate() throws ValidationException { + ParameterValidator.getInstance().assertOneOrLess(Parameter.VALUE, + getParameters()); + } + + /** + * {@inheritDoc} + */ + @Override + public String getValue() { + return value; + } + + private static class Factory implements PropertyFactory { + + public Property createProperty(String name) { + return new GwRecordId(this); + } + + public Property createProperty(String name, ParameterList parameters, String value) { + GwRecordId property = new GwRecordId(parameters, this, value); + return property; + } + } +} diff --git a/src/main/java/net/fortuna/ical4j/extensions/property/GwshowAs.java b/src/main/java/net/fortuna/ical4j/extensions/property/GwshowAs.java new file mode 100755 index 0000000..125d0e1 --- /dev/null +++ b/src/main/java/net/fortuna/ical4j/extensions/property/GwshowAs.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) 2009, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.extensions.property; + +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.PropertyFactory; +import net.fortuna.ical4j.model.ValidationException; + +/** + * @author fortuna + * + */ +public class GwShowAs extends Property { + + private static final String NAME = "X-GWSHOW-AS"; + + public static final PropertyFactory FACTORY = new Factory(); + + public static final GwShowAs BUSY = new GwShowAs(new ParameterList(true), FACTORY, "BUSY"); + + private String value; + + /** + * @param factory + */ + public GwShowAs(PropertyFactory factory) { + super(NAME, factory); + } + + /** + * @param aList + * @param factory + */ + public GwShowAs(ParameterList aList, PropertyFactory factory, String value) { + super(NAME, aList, factory); + setValue(value); + } + + /** + * {@inheritDoc} + */ + @Override + public void setValue(String aValue) { + this.value = aValue; + } + + /** + * {@inheritDoc} + */ + @Override + public void validate() throws ValidationException { + // TODO Auto-generated method stub + + } + + /** + * {@inheritDoc} + */ + @Override + public String getValue() { + return value; + } + + private static class Factory implements PropertyFactory { + + public Property createProperty(String name) { + return new GwShowAs(this); + } + + public Property createProperty(String name, ParameterList parameters, String value) { + GwShowAs property = null; + if (BUSY.getValue().equals(value)) { + property = BUSY; + } + else { + property = new GwShowAs(parameters, this, value); + } + return property; + } + } +} diff --git a/src/main/java/net/fortuna/ical4j/extensions/property/LicLocation.java b/src/main/java/net/fortuna/ical4j/extensions/property/LicLocation.java new file mode 100755 index 0000000..bc72623 --- /dev/null +++ b/src/main/java/net/fortuna/ical4j/extensions/property/LicLocation.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2009, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.extensions.property; + +import net.fortuna.ical4j.model.Parameter; +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.PropertyFactory; +import net.fortuna.ical4j.model.ValidationException; +import net.fortuna.ical4j.util.ParameterValidator; + +/** + * @author fortuna + * + */ +public class LicLocation extends Property { + + private static final String NAME = "X-LIC-LOCATION"; + + public static final PropertyFactory FACTORY = new Factory(); + + private String value; + + /** + * @param factory + */ + public LicLocation(PropertyFactory factory) { + super(NAME, factory); + } + + /** + * @param aList + * @param factory + */ + public LicLocation(ParameterList aList, PropertyFactory factory, String value) { + super(NAME, aList, factory); + setValue(value); + } + + /** + * {@inheritDoc} + */ + @Override + public void setValue(String aValue) { + this.value = aValue; + } + + /** + * {@inheritDoc} + */ + @Override + public void validate() throws ValidationException { + ParameterValidator.getInstance().assertOneOrLess(Parameter.VALUE, + getParameters()); + } + + /** + * {@inheritDoc} + */ + @Override + public String getValue() { + return value; + } + + private static class Factory implements PropertyFactory { + + public Property createProperty(String name) { + return new LicLocation(this); + } + + public Property createProperty(String name, ParameterList parameters, String value) { + LicLocation property = new LicLocation(parameters, this, value); + return property; + } + } +} diff --git a/src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoAllDayEvent.java b/src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoAllDayEvent.java new file mode 100755 index 0000000..37a2710 --- /dev/null +++ b/src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoAllDayEvent.java @@ -0,0 +1,115 @@ +/** + * Copyright (c) 2009, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.extensions.property; + +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.PropertyFactory; +import net.fortuna.ical4j.model.ValidationException; + +/** + * @author fortuna + * + */ +public class MicrosoftCdoAllDayEvent extends Property { + + private static final long serialVersionUID = -3514682572599864426L; + + private static final String NAME = "X-MICROSOFT-CDO-ALLDAYEVENT"; + + public static final PropertyFactory FACTORY = new Factory(); + + public static final MicrosoftCdoAllDayEvent FALSE = new MicrosoftCdoAllDayEvent(new ParameterList(true), FACTORY, "FALSE"); + + private String value; + + /** + * @param factory + */ + public MicrosoftCdoAllDayEvent(PropertyFactory factory) { + super(NAME, factory); + } + + /** + * @param aList + * @param factory + */ + public MicrosoftCdoAllDayEvent(ParameterList aList, PropertyFactory factory, String value) { + super(NAME, aList, factory); + setValue(value); + } + + /** + * {@inheritDoc} + */ + @Override + public void setValue(String aValue) { + this.value = aValue; + } + + /** + * {@inheritDoc} + */ + @Override + public void validate() throws ValidationException { + // TODO Auto-generated method stub + + } + + /** + * {@inheritDoc} + */ + @Override + public String getValue() { + return value; + } + + private static class Factory implements PropertyFactory { + + private static final long serialVersionUID = 596282786680252116L; + + public Property createProperty(String name) { + return new MicrosoftCdoAllDayEvent(this); + } + + public Property createProperty(String name, ParameterList parameters, String value) { + MicrosoftCdoAllDayEvent property = null; + if (FALSE.getValue().equals(value)) { + property = FALSE; + } + else { + property = new MicrosoftCdoAllDayEvent(parameters, this, value); + } + return property; + } + } +} diff --git a/src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoBusyStatus.java b/src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoBusyStatus.java new file mode 100755 index 0000000..8084d27 --- /dev/null +++ b/src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoBusyStatus.java @@ -0,0 +1,115 @@ +/** + * Copyright (c) 2009, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.extensions.property; + +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.PropertyFactory; +import net.fortuna.ical4j.model.ValidationException; + +/** + * @author fortuna + * + */ +public class MicrosoftCdoBusyStatus extends Property { + + private static final long serialVersionUID = -3514682572599864426L; + + private static final String NAME = "X-MICROSOFT-CDO-BUSYSTATUS"; + + public static final PropertyFactory FACTORY = new Factory(); + + public static final MicrosoftCdoBusyStatus BUSY = new MicrosoftCdoBusyStatus(new ParameterList(true), FACTORY, "BUSY"); + + private String value; + + /** + * @param factory + */ + public MicrosoftCdoBusyStatus(PropertyFactory factory) { + super(NAME, factory); + } + + /** + * @param aList + * @param factory + */ + public MicrosoftCdoBusyStatus(ParameterList aList, PropertyFactory factory, String value) { + super(NAME, aList, factory); + setValue(value); + } + + /** + * {@inheritDoc} + */ + @Override + public void setValue(String aValue) { + this.value = aValue; + } + + /** + * {@inheritDoc} + */ + @Override + public void validate() throws ValidationException { + // TODO Auto-generated method stub + + } + + /** + * {@inheritDoc} + */ + @Override + public String getValue() { + return value; + } + + private static class Factory implements PropertyFactory { + + private static final long serialVersionUID = 596282786680252116L; + + public Property createProperty(String name) { + return new MicrosoftCdoBusyStatus(this); + } + + public Property createProperty(String name, ParameterList parameters, String value) { + MicrosoftCdoBusyStatus property = null; + if (BUSY.getValue().equals(value)) { + property = BUSY; + } + else { + property = new MicrosoftCdoBusyStatus(parameters, this, value); + } + return property; + } + } +} diff --git a/src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoImportance.java b/src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoImportance.java new file mode 100755 index 0000000..ecfebb4 --- /dev/null +++ b/src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoImportance.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2009, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.extensions.property; + +import net.fortuna.ical4j.model.Parameter; +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.PropertyFactory; +import net.fortuna.ical4j.model.ValidationException; +import net.fortuna.ical4j.util.ParameterValidator; + +/** + * @author fortuna + * + */ +public class MicrosoftCdoImportance extends Property { + + private static final String NAME = "X-MICROSOFT-CDO-IMPORTANCE"; + + public static final PropertyFactory FACTORY = new Factory(); + + private String value; + + /** + * @param factory + */ + public MicrosoftCdoImportance(PropertyFactory factory) { + super(NAME, factory); + } + + /** + * @param aList + * @param factory + */ + public MicrosoftCdoImportance(ParameterList aList, PropertyFactory factory, String value) { + super(NAME, aList, factory); + setValue(value); + } + + /** + * {@inheritDoc} + */ + @Override + public void setValue(String aValue) { + this.value = aValue; + } + + /** + * {@inheritDoc} + */ + @Override + public void validate() throws ValidationException { + ParameterValidator.getInstance().assertOneOrLess(Parameter.VALUE, + getParameters()); + } + + /** + * {@inheritDoc} + */ + @Override + public String getValue() { + return value; + } + + private static class Factory implements PropertyFactory { + + public Property createProperty(String name) { + return new MicrosoftCdoImportance(this); + } + + public Property createProperty(String name, ParameterList parameters, String value) { + MicrosoftCdoImportance property = new MicrosoftCdoImportance(parameters, this, value); + return property; + } + } +} diff --git a/src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoInstType.java b/src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoInstType.java new file mode 100755 index 0000000..f55bd99 --- /dev/null +++ b/src/main/java/net/fortuna/ical4j/extensions/property/MicrosoftCdoInstType.java @@ -0,0 +1,105 @@ +/** + * Copyright (c) 2009, Ben Fortuna + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * o Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * o Neither the name of Ben Fortuna nor the names of any other contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.fortuna.ical4j.extensions.property; + +import net.fortuna.ical4j.model.Parameter; +import net.fortuna.ical4j.model.ParameterList; +import net.fortuna.ical4j.model.Property; +import net.fortuna.ical4j.model.PropertyFactory; +import net.fortuna.ical4j.model.ValidationException; +import net.fortuna.ical4j.util.ParameterValidator; + +/** + * @author fortuna + * + */ +public class MicrosoftCdoInstType extends Property { + + private static final String NAME = "X-MICROSOFT-CDO-IMPORTANCE"; + + public static final PropertyFactory FACTORY = new Factory(); + + private String value; + + /** + * @param factory + */ + public MicrosoftCdoInstType(PropertyFactory factory) { + super(NAME, factory); + } + + /** + * @param aList + * @param factory + */ + public MicrosoftCdoInstType(ParameterList aList, PropertyFactory factory, String value) { + super(NAME, aList, factory); + setValue(value); + } + + /** + * {@inheritDoc} + */ + @Override + public void setValue(String aValue) { + this.value = aValue; + } + + /** + * {@inheritDoc} + */ + @Override + public void validate() throws ValidationException { + ParameterValidator.getInstance().assertOneOrLess(Parameter.VALUE, + getParameters()); + } + + /** + * {@inheritDoc} + */ + @Override + public String getValue() { + return value; + } + + private static class Factory implements PropertyFactory { + + public Property createProperty(String name) { + return new MicrosoftCdoInstType(this); + } + + public Property createProperty(String name, ParameterList parameters, String value) { + MicrosoftCdoInstType property = new MicrosoftCdoInstType(parameters, this, value); + return property; + } + } +}