Package org.apache.sling.feature.extension.apiregions.api

# 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

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 removed
`String`
`getMessage()`
Get the message
`DeprecationValidationMode`
`getMode()`
Get the optional validation mode.
`String`
`getSince()`
Get the optional since information
`int`
`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

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DeprecationInfo

public DeprecationInfo(String msg)
Create a new info

Parameters:
  `msg` - The msg
Throws:
  `IllegalArgumentException` - if msg is `null`

## Method Details

### 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

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`