Class DeprecationInfo
- java.lang.Object
-
- org.apache.sling.feature.extension.apiregions.api.DeprecationInfo
-
public class DeprecationInfo extends Object
Deprecation info for a package or member. This class is not thread safe.- Since:
- 1.1
-
-
Constructor Summary
Constructors Constructor Description DeprecationInfo(String msg)
Create a new info
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getForRemoval()
Get the optional for removal information.Calendar
getForRemovalBy()
Return a date by which this member will be removedString
getMessage()
Get the messageDeprecationValidationMode
getMode()
Get the optional validation mode.String
getSince()
Get the optional since informationint
hashCode()
boolean
isForRemoval()
Is this member intended to be removed?void
setForRemoval(String value)
Set the for removal information.void
setMode(DeprecationValidationMode value)
Set the validation mode.void
setSince(String since)
Set the since information
-
-
-
Constructor Detail
-
DeprecationInfo
public DeprecationInfo(String msg)
Create a new info- Parameters:
msg
- The msg- Throws:
IllegalArgumentException
- if msg isnull
-
-
Method Detail
-
getMessage
public String getMessage()
Get the message- Returns:
- The message
-
getSince
public String getSince()
Get the optional since information- Returns:
- The since information or
null
-
setSince
public void setSince(String since)
Set the since information- Parameters:
since
- The new info
-
getForRemoval
public String getForRemoval()
Get the optional for removal information. This should either be 'true' or 'false' or a date in the format 'YYYY-MM-DD'.- Returns:
- The for removal information or
null
- Since:
- 1.3.0
-
setForRemoval
public void setForRemoval(String value)
Set the for removal information. This should either be 'true' or 'false' or a date in the format 'YYYY-MM-DD'.- Parameters:
value
- The new removal info- Since:
- 1.3.0
-
isForRemoval
public boolean isForRemoval()
Is this member intended to be removed?- Returns:
true
if the member will be removed in the future- Since:
- 1.3.0
-
getForRemovalBy
public Calendar getForRemovalBy()
Return a date by which this member will be removed- Returns:
- A calendar if the value from
getForRemoval()
is formatted as 'YYYY-MM-DD'. - Since:
- 1.3.0
-
getMode
public DeprecationValidationMode getMode()
Get the optional validation mode.- Returns:
- The mode or
null
- Since:
- 1.4.0
-
setMode
public void setMode(DeprecationValidationMode value)
Set the validation mode.- Parameters:
value
- The new mode- Since:
- 1.4.0
-
-