You can immediately publish a page you have under your fingertips with directly available method on a page.
The easiest way to publish a page in one language and one project variant without following pages goes like this:
CmsClient client = new CmsClient(logonGuid);
Project project = client.getProject(sessionKey, projectGuid);
ProjectVariant projectVariant = project.getProjectVariantByName(“project variant name”);
LanguageVariant languageVariant = project.getLanguageVariantByRfcLanguageId(“en”);
boolean withFollowingPages = false;
Page currentPg = project.getPageById(“34009”);
currentPg.publish(withFollowingPages, projectVariant, languageVariant);
This publish() method will not send an e-mail to the author per default. It return a PublishingJob instance.
There are several publish methods available on page to handle publishing of related pages and sending an e-mail or not. And of course publish for more project variants. Please check the javadoc for other publish methods (in most cases sufficient) or see the article how to configure a PublishingJob manually.