congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
PublisherCoreService
Code IndexAdd Tabnine to your IDE (free)

How to use
PublisherCoreService
in
org.eclipse.dirigible.core.publisher.service

Best Java code snippets using org.eclipse.dirigible.core.publisher.service.PublisherCoreService (Showing top 8 results out of 315)

origin: org.eclipse.dirigible/dirigible-core-publisher

@Override
public PublishRequestDefinition createPublishRequest(String workspace, String path) throws PublisherException {
  return createPublishRequest(workspace, path, IRepositoryStructure.PATH_REGISTRY_PUBLIC);
}
origin: org.eclipse.dirigible/dirigible-core-publisher

/**
 * Gets the pending published requests.
 *
 * @return the pending published requests
 * @throws PublisherException
 *             the publisher exception
 */
private List<PublishRequestDefinition> getPendingPublishedRequests() throws PublisherException {
  Timestamp timestamp = publishCoreService.getLatestPublishLog();
  List<PublishRequestDefinition> publishRequestDefinitions = publishCoreService.getPublishRequestsAfter(timestamp);
  return publishRequestDefinitions;
}
origin: org.eclipse.dirigible/dirigible-runtime-ide-publisher

/**
 * List publishing log.
 *
 * @return the list
 * @throws PublisherException
 *             the publisher exception
 */
public List<PublishLogDefinition> listPublishingLog() throws PublisherException {
  List<PublishLogDefinition> publishLogDefinitions = publishCoreService.getPublishLogs();
  return publishLogDefinitions;
}
origin: org.eclipse.dirigible/dirigible-runtime-ide-publisher

/**
 * Clear publishing log.
 *
 * @throws PublisherException
 *             the publisher exception
 */
public void clearPublishingLog() throws PublisherException {
  List<PublishLogDefinition> publishLogDefinitions = publishCoreService.getPublishLogs();
  for (PublishLogDefinition publishLogDefinition : publishLogDefinitions) {
    publishCoreService.removePublishLog(publishLogDefinition.getId());
  }
}
origin: org.eclipse.dirigible/dirigible-runtime-ide-publisher

/**
 * Gets the publishing request.
 *
 * @param id
 *            the id
 * @return the publishing request
 * @throws PublisherException
 *             the publisher exception
 */
public PublishRequestDefinition getPublishingRequest(long id) throws PublisherException {
  PublishRequestDefinition publishRequestDefinition = publishCoreService.getPublishRequest(id);
  return publishRequestDefinition;
}
origin: org.eclipse.dirigible/dirigible-core-publisher

/**
 * Removes the processed requests.
 *
 * @param publishRequestDefinitions
 *            the publish request definitions
 * @throws PublisherException
 *             the publisher exception
 */
private void removeProcessedRequests(List<PublishRequestDefinition> publishRequestDefinitions) throws PublisherException {
  for (PublishRequestDefinition publishRequestDefinition : publishRequestDefinitions) {
    publishCoreService.removePublishRequest(publishRequestDefinition.getId());
  }
}
origin: org.eclipse.dirigible/dirigible-core-publisher

/**
 * Publish resource.
 *
 * @param entry
 *            the entry
 * @throws SynchronizationException
 *             the synchronization exception
 */
private void publishResource(Map.Entry<String, String> entry) throws SynchronizationException {
  String sourceLocation = entry.getKey();
  String targetLocation = entry.getValue();
  IResource sourceResource = getRepository().getResource(sourceLocation);
  IResource targetResource = getRepository().getResource(targetLocation);
  if (targetResource.exists()) {
    java.util.Date lastModified = targetResource.getInformation().getModifiedAt();
    if ((lastModified == null) || (currentRequestTime.getTime() > lastModified.getTime())) {
      targetResource.setContent(sourceResource.getContent());
    }
  } else {
    getRepository().createResource(targetLocation, sourceResource.getContent());
  }
  try {
    publishCoreService.createPublishLog(sourceResource.getPath(), targetResource.getPath());
  } catch (PublisherException e) {
    throw new SynchronizationException(e);
  }
}
origin: org.eclipse.dirigible/dirigible-runtime-ide-publisher

/**
 * Request publishing.
 *
 * @param user
 *            the user
 * @param workspace
 *            the workspace
 * @param path
 *            the path
 * @return the long
 * @throws PublisherException
 *             the publisher exception
 */
public long requestPublishing(String user, String workspace, String path) throws PublisherException {
  StringBuilder workspacePath = generateWorkspacePath(user, workspace, null, null);
  if ("*".equals(path)) {
    path = "";
  }
  PublishRequestDefinition publishRequestDefinition = publishCoreService.createPublishRequest(workspacePath.toString(), path,
      IRepositoryStructure.PATH_REGISTRY_PUBLIC);
  logger.info("Publishing request created [{}]", publishRequestDefinition.getId());
  // force synchronization ?
  PublisherSynchronizer.forceSynchronization();
  return publishRequestDefinition.getId();
}
org.eclipse.dirigible.core.publisher.servicePublisherCoreService

Javadoc

The PublisherCoreService implementation managing the requests for publish artifacts.

Most used methods

  • createPublishRequest
  • createPublishLog
  • getLatestPublishLog
  • getPublishLogs
  • getPublishRequest
  • getPublishRequestsAfter
  • removePublishLog
  • removePublishRequest

Popular in Java

  • Updating database using SQL prepared statement
  • getSystemService (Context)
  • putExtra (Intent)
  • compareTo (BigDecimal)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • JCheckBox (javax.swing)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now