Add the deprecated apis back

It is not good practices to just delete the deprecated APIs. They are
added back and marked as @Deprecated.