You can use Replicator to make your job:
@Reference private Replicator replicator;
String path = "PATH OF THE RESOURCE HERE";
Session session = //Get the session from eg. a the request
try
{
replicator.replicate(session, "ACTIVATE", path);
}
catch(ReplicationException replicationException)
{
//Handle the replication exception
}