Changeset View
Changeset View
Standalone View
Standalone View
src/main/java/net/wildfyre/posts/Draft.java
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | public class Draft extends PostData implements PostData.Setters<Draft> { | ||||
*/ | */ | ||||
public Draft(String areaID){ | public Draft(String areaID){ | ||||
super(); | super(); | ||||
if(areaID == null || areaID.equals("")) | if(areaID == null || areaID.equals("")) | ||||
throw new IllegalArgumentException("The parameter areaID should not be null nor empty: '" + areaID + "'"); | throw new IllegalArgumentException("The parameter areaID should not be null nor empty: '" + areaID + "'"); | ||||
super.areaID = areaID; | super.areaID = areaID; | ||||
super.authorID = Users.myID().orElseThrow(RuntimeException::new); | super.authorID = Users.INSTANCE.myID(); | ||||
isOnlyLocal = true; | isOnlyLocal = true; | ||||
} | } | ||||
/** | /** | ||||
* Creates a new Draft that points to a server-side Draft. | * Creates a new Draft that points to a server-side Draft. | ||||
* | * | ||||
* <p>This method is for advanced-users only. If you want to create a Draft, use {@link #Draft(String)} or | * <p>This method is for advanced-users only. If you want to create a Draft, use {@link #Draft(String)} or | ||||
* {@link Area#draft()}.</p> | * {@link Area#draft()}.</p> | ||||
▲ Show 20 Lines • Show All 224 Lines • Show Last 20 Lines |