Tabnine Logo
org.eclipse.dirigible.core.publisher.service
Code IndexAdd Tabnine to your IDE (free)

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

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

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-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-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-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.service

Most used classes

  • PublisherCoreService
    The PublisherCoreService implementation managing the requests for publish artifacts.
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