Mercurial Hosting > nabble
view src/nabble/model/User.java @ 44:cc5b7d515580
remove post by email
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 11 Jun 2021 09:43:51 -0600 |
parents | 7ecd1a4ef557 |
children | 72765b66e2c3 |
line wrap: on
line source
/* Copyright (C) 2003 Franklin Schmidt <frank@gustos.com> */ package nabble.model; import fschmidt.db.DbObject; import fschmidt.db.LongKey; import java.awt.image.BufferedImage; import java.util.Collection; import java.util.Comparator; import java.util.Date; import java.util.Map; public interface User extends Person, DbObject<LongKey,UserImpl> { public long getId(); public String getEmail(); public void setEmail(String email) throws ModelException; public String getPasswordDigest(); public void setPasswordDigest(String passwordDigest); public void setPassword(String password) throws ModelException; public void register() throws ModelException; // insert into db public void register(Date registerDate) throws ModelException; // insert into db public boolean isRegistered(); public void update(); public java.util.Date getRegistered(); public User getGoodCopy(); public int getExternalHash(String url); // not used anywhere public NodeIterator<? extends Node> getPendingPosts(); public User setSignature( String signature, Message.Format signatureFormat ) throws ModelException; public boolean isSubscribed(Node node); public Subscription getSubscription(Node node); public Subscription subscribe(Node node,Subscription.To to,Subscription.Type type); public void deactivate(); public boolean isDeactivated(); public void saveAvatar(BufferedImage smallImage,BufferedImage bigImage) throws ModelException; public void deleteAvatar(); public boolean hasAvatar(); public boolean hasTooManyPosts(); public static final Comparator<User> BY_NAME_COMPARATOR = new Comparator<User>() { public int compare(User o1, User o2) { return o1.getName().compareToIgnoreCase(o2.getName()); } }; public Node newRootNode(Node.Kind kind,String subject,String message,Message.Format msgFmt,Site site,String type) throws ModelException; // will be already inserted into db public Comparator<User> nodeCountComparatorDesc = new Comparator<User>(){ public int compare(User u1,User u2) { return u2.getNodeCount(null) - u1.getNodeCount(null); } }; public void moveToRegisteredAccount(String cookie); public <T> T getExtension(ExtensionFactory<User,T> factory); public Long lastVisitedNodeId(long nodeId); public Map<Long,Long> lastVisitedNodeIds(Collection<Long> nodeIds); public void markVisited(Node node, long lastNodeId); public void unmarkVisited(Node node); public String getProperty(String key); public void setProperty(String key,String value); public String getPasscookie(); public boolean checkPassword(String password); public boolean checkPasscookie(String passcookie); public String getResetcode(); public boolean checkResetcode(String resetcode); public void setNoArchive(boolean noArchive); }