Package org.metagrid.gatekeeper.node.property

Examples of org.metagrid.gatekeeper.node.property.DateProperty


            this.idbuilder = idbuilder;
            //
            // Created date.
            this.init(
                ReadOnlyProperty.wrap(
                    new DateProperty(
                        this,
                        LoggedException.CREATED_PROPERTY_URI
                        ){
                        @Override
                        protected Date getDate()
                            {
                            return LoggedExceptionImpl.this.created();
                            }
                        @Override
                        protected void setDate(final Date value)
                            {
                            throw new IllegalArgumentException(
                                "Attempt to set a readonly property [" + this + "] to [" + value + "]"
                                );
                            }
                        }
                    )
                );
            //
            // Modified date.
            this.init(
                new DateProperty(
                    this,
                    LoggedException.MODIFIED_PROPERTY_URI
                    ){
                    @Override
                    protected Date getDate()
View Full Code Here


        this.builder = builder;
        //
        // Created date.
        this.init(
            ReadOnlyProperty.wrap(
                new DateProperty(
                    this,
                    FruitNode.CREATED_PROPERTY_URI
                    ){
                    @Override
                    protected Date getDate()
                        {
                        return object().created();
                        }

                    @Override
                    protected void setDate(Date value)
                        {
                        //
                        // This should be trapped by theReadOnlyProperty wrapper, so if it gets this far it is an error.
                        log.error("Attempt to set a readonly property [" + this + "] to [" + value + "]");
                        throw new IllegalArgumentException(
                            "Attempt to set a readonly property [" + this + "] to [" + value + "]"
                            );
                        }
                    }
                )
            );
        //
        // Modified date.
        this.init(
            new DateProperty(
                this,
                FruitNode.MODIFIED_PROPERTY_URI
                ){
                @Override
                protected Date getDate()
View Full Code Here

TOP

Related Classes of org.metagrid.gatekeeper.node.property.DateProperty

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.