Examples of Remote


Examples of javax.ejb.Remote

            }
        }
    }

    private Collection<Class<?>> getRemoteBusinessInterfaces(Class<?> sessionBeanClass) throws DeploymentUnitProcessingException {
        final Remote remoteViewAnnotation = sessionBeanClass.getAnnotation(Remote.class);
        if (remoteViewAnnotation == null) {
            Collection<Class<?>> interfaces = getBusinessInterfacesFromInterfaceAnnotations(sessionBeanClass, Remote.class);
            if (!interfaces.isEmpty()) {
                return interfaces;
            }
            return Collections.emptySet();
        }
        Class<?>[] remoteViews = remoteViewAnnotation.value();
        if (remoteViews == null || remoteViews.length == 0) {
            Set<Class<?>> interfaces = getPotentialBusinessInterfaces(sessionBeanClass);
            if (interfaces.size() != 1)
                throw MESSAGES.beanWithRemoteAnnotationImplementsMoreThanOneInterface(sessionBeanClass);
            return interfaces;
View Full Code Here

Examples of javax.ejb.Remote

      // Initialize issue used in Error Message
      String issue = "[" + ErrorCodes.ERROR_CODE_EJBTHREE1025 + "]";

      // Obtain annotations, if found
      Local local = (Local) resolveAnnotation(Local.class);
      Remote remote = (Remote) resolveAnnotation(Remote.class);

      // If either local or remote is unspecified, return safely - there can be no overlap
      if (local == null || remote == null)
      {
         return;
      }

      // Ensure "value" attribute of both local and remote are not blank
      if (local.value().length < 1 && local.value().length < 1)
      {
         throw new EJBException("Cannot designate both " + Local.class.getName() + " and " + Remote.class.getName()
               + " annotations without 'value' attribute on " + this.getEjbName() + ". " + issue);
      }

      // Iterate through local and remote interfaces, ensuring any one interface is not being used for both local and remote exposure
      for (Class<?> localClass : local.value())
      {
         for (Class<?> remoteClass : remote.value())
         {
            if (localClass.equals(remoteClass))
            {
               throw new EJBException("Cannot designate " + localClass.getName() + " as both " + Local.class.getName()
                     + " and " + Remote.class.getName() + " on " + this.getEjbName() + ". " + issue);
View Full Code Here

Examples of javax.ejb.Remote

      throw new IllegalStateException("Not implemented");
   }

   protected Object getInvokedInterface(Method method)
   {
      Remote remoteAnnotation = (Remote) resolveAnnotation(Remote.class);
      if (remoteAnnotation != null)
      {
         Class[] remotes = remoteAnnotation.value();
         for (int i = 0; i < remotes.length; ++i)
         {
            try
            {
               remotes[i].getMethod(method.getName(), method.getParameterTypes());
View Full Code Here

Examples of org.eclipse.orion.server.git.objects.Remote

        Repository db = null;
        try {
          db = repositoryForPath(request, new Path(resource.getPath()));
          URI cloneLocation = BaseToCloneConverter.getCloneLocation(resource, BaseToCloneConverter.FILE);
          String branch = db == null ? null : db.getBranch();
          Remote defaultRemote = db == null ? null : new Remote(cloneLocation, db, Constants.DEFAULT_REMOTE_NAME);
          RemoteBranch defaultRemoteBranch = db == null ? null : new RemoteBranch(cloneLocation, db, defaultRemote, branch);
          addGitLinks(request, resource, representation, cloneLocation, db, defaultRemoteBranch, branch);

          JSONArray children = representation.optJSONArray(ProtocolConstants.KEY_CHILDREN);
          if (children != null) {
View Full Code Here

Examples of org.eluder.coveralls.maven.plugin.domain.Git.Remote

public class JobTest {

    @Test
    public void testGetBranchWithRemote() {
        List<Remote> remotes = Arrays.asList(new Remote("origin", "git@github.com"));
        Git git = new Git(null, new Head(null, null, null, null, null, null), "master", remotes);
       
        Job job = new Job().withBranch("origin/master").withGit(git);
        assertEquals("master", job.getBranch());
    }
View Full Code Here

Examples of org.exoplatform.web.application.javascript.Javascript.Remote

    private void parseDesc(Element element, ScriptResourceDescriptor desc) {
        Element urlElement = XMLTools.getUniqueChild(element, URL_TAG, false);
        if (urlElement != null) {
            String remoteURL = XMLTools.asString(urlElement);
            desc.id.setFullId(false);
            Remote script = new Javascript.Remote(desc.id, contextPath, remoteURL, 0);
            desc.modules.add(script);
        } else {
            for (Element localeElt : XMLTools.getChildren(element, "supported-locale")) {
                String localeValue = XMLTools.asString(localeElt);
                Locale locale = I18N.parseTagIdentifier(localeValue);
View Full Code Here

Examples of org.locationtech.geogig.api.Remote

        String remoteName2 = "myremote2";
        String remoteURL2 = "http://test2.org";
        String branch = "mybranch";

        Remote remote = remoteAdd.setName(remoteName1).setURL(remoteURL1).call();

        assertEquals(remoteName1, remote.getName());
        assertEquals(remoteURL1, remote.getFetchURL());
        assertEquals(remoteURL1, remote.getPushURL());
        assertEquals("+refs/heads/*:refs/remotes/" + remoteName1 + "/*", remote.getFetch());

        remote = remoteAdd.setName(remoteName2).setURL(remoteURL2).setBranch(branch).call();

        assertEquals(remoteName2, remote.getName());
        assertEquals(remoteURL2, remote.getFetchURL());
        assertEquals(remoteURL2, remote.getPushURL());
        assertEquals("+refs/heads/" + branch + ":refs/remotes/" + remoteName2 + "/" + branch,
                remote.getFetch());

        final RemoteListOp remoteList = geogig.command(RemoteListOp.class);

        ImmutableList<Remote> allRemotes = remoteList.call();

        assertEquals(2, allRemotes.size());

        Remote firstRemote = allRemotes.get(0);
        Remote secondRemote = allRemotes.get(1);

        if (!firstRemote.getName().equals(remoteName1)) {
            // swap first and second
            Remote tempRemote = firstRemote;
            firstRemote = secondRemote;
            secondRemote = tempRemote;
        }

        assertEquals(remoteName1, firstRemote.getName());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.