Package eu.planets_project.pp.plato.model

Examples of eu.planets_project.pp.plato.model.ChangeLog


            }
            if (property != null) {
                clone.setProperty(property.clone());
            }
            // created-timestamp is automatically set to now
            clone.setChangeLog(new ChangeLog(this.getChangeLog().getChangedBy()));
            return clone;
        } catch (CloneNotSupportedException e) {
            // never thrown
            return null;
        }
View Full Code Here


                }
            } else {
                clone.possibleMetrics = null;
            }
            // created-timestamp is automatically set to now
            clone.setChangeLog(new ChangeLog(this.getChangeLog().getChangedBy()));
            return clone;
        } catch (CloneNotSupportedException e) {
            // never thrown
            return null;
        }
View Full Code Here

     */
    public Metric clone() {
        try {
            Metric clone = (Metric)super.clone();
            // created-timestamp is automatically set to now
            clone.setChangeLog(new ChangeLog(this.getChangeLog().getChangedBy()));
            if (this.scale != null) {
                clone.setScale(this.scale.clone());
            }
            clone.id = 0;
            return clone;
View Full Code Here

        try {
            Value clone = (Value)super.clone();
            clone.id = 0;
            clone.scale = null;
            // created-timestamp is automatically set to now
            clone.setChangeLog(new ChangeLog(this.getChangeLog().getChangedBy()));
            return clone;
        } catch (CloneNotSupportedException e) {
            // never thrown
            return null;
        }
View Full Code Here

    public Scale clone() {
        try {
            Scale clone = (Scale)super.clone();
            clone.id = 0;
            // created-timestamp is automatically set to now
            clone.setChangeLog(new ChangeLog(this.getChangeLog().getChangedBy()));
            return clone;
        } catch (CloneNotSupportedException e) {
            // never thrown
            return null;
        }
View Full Code Here

     * and resets the modified flag.
     * Resetting the modified flag is ok: If persisting fails the user was already set.
     *
     */
    public void visit(ITouchable t) {
        ChangeLog log = t.getChangeLog();
        // maybe this object was just created
        String createdBy = log.getCreatedBy();
        if (createdBy == null || "".equals(createdBy))
            log.setCreatedBy(user);
        // set user name and reset dirty flag
        if (log.isDirty()) {
            if (user != null) {
               log.setChangedBy(user);
            }
            log.setDirty(false);
        }
    }
View Full Code Here

            clone.id = 0;

            clone.setParent(null);
           
            // created-timestamp is automatically set to now
            clone.setChangeLog(new ChangeLog(this.getChangeLog().getChangedBy()));
           
            if (this.getChildren() != null) {
                List<TreeNode> clonedChildren = new ArrayList<TreeNode>();
                for (TreeNode child : this.getChildren()) {
                    clonedChildren.add(child.clone());
View Full Code Here

*
*/public class ChangeLogFactory extends AbstractObjectCreationFactory {

    @Override
    public Object createObject(Attributes arg0) throws Exception {
        ChangeLog c = new ChangeLog();
        TimestampFormatter formatter = new TimestampFormatter();
        c.setChangedBy(arg0.getValue("changedBy"));
        c.setCreatedBy(arg0.getValue("createdBy"));
        String changed = arg0.getValue("changed");
        String created = arg0.getValue("created");
        c.setChanged(formatter.parseTimestamp(changed));
        c.setCreated(formatter.parseTimestamp(created));
        return c;
    }
View Full Code Here

TOP

Related Classes of eu.planets_project.pp.plato.model.ChangeLog

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.