Examples of ProfileService


Examples of com.ibm.sbt.services.client.connections.profiles.ProfileService

    ProfileUrls.CHECK_COLLEAGUE.format(service, ProfileParams.sourceId.get(sourceId));
  }

  @Test
  public void testGenerateUrlWithUrlParametersNameAndValue(){
    ProfileService service = new ProfileService();
    String urlAssert = "profiles/atom/connection.do?connectionId=12345678";
    String url = ProfileUrls.CONNECTION.format(service, ProfileUrls.getConnectionId("12345678"));
    assertEquals(urlAssert, url);
  }
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.profiles.ProfileService

    }
   
    public Profile getProfile(String userId) {
        createContext();
       
        ProfileService profileService = getProfileService();
        Profile profile = null;
        try {
            profile = profileService.getProfile(userId);
        } catch (ClientServicesException cse) {
            Assert.fail("Error get profile: " + cse.getMessage());
            cse.printStackTrace();
    }
        return profile;
View Full Code Here

Examples of com.ibm.sbt.services.client.connections.profiles.ProfileService

        return profile;
    }
   
    protected ProfileService getProfileService() {
        if (profileService == null) {
            profileService = new ProfileService();
        }
        return profileService;
    }
View Full Code Here

Examples of com.ibm.sbt.services.client.smartcloud.profiles.ProfileService

    }
   
    public Profile getProfile(String userId) {
        createContext();
       
        ProfileService profileService = getProfileService();
        Profile profile = null;
        try {
            profile = profileService.getProfile(userId);
        } catch (ProfileServiceException pse) {
            Assert.fail("Error get profile: " + pse.getMessage());
            pse.printStackTrace();
        }
        return profile;
View Full Code Here

Examples of com.ibm.sbt.services.client.smartcloud.profiles.ProfileService

        return profile;
    }
   
    protected ProfileService getProfileService() {
        if (profileService == null) {
            profileService = new ProfileService("smartcloud");
        }
        return profileService;
    }
View Full Code Here

Examples of com.sk89q.squirrelid.resolver.ProfileService

            OfflinePlayer player = Bukkit.getOfflinePlayer(namespace.replace("~", ""));
            if(player.hasPlayedBefore()) {
                String originalNamespace = namespace;

                try {
                    ProfileService resolver = HttpRepositoryService.forMinecraft();
                    Profile profile = resolver.findByName("player.getName()"); // May be null

                    namespace = "~" + CraftBookPlugin.inst().getUUIDMappings().getCBID(profile.getUniqueId());
                    CopyManager.renameNamespace(CraftBookPlugin.inst().getDataFolder(), originalNamespace, namespace);
                    sign.setLine(0, namespace);
                } catch (Exception e) {
View Full Code Here

Examples of io.fabric8.api.ProfileService

    @Override
    protected Object doExecute() throws Exception {
       
        String latestVersion = null;

        ProfileService profileService = fabricService.adapt(ProfileService.class);
        List<String> versions = profileService.getVersions();
        if (versions.size() > 0) {
            latestVersion = versions.get(versions.size() - 1);
        }
       
        if (versionId == null) {
            IllegalStateAssertion.assertNotNull(latestVersion, "Cannot default the new version name as there are no versions available");
            VersionSequence sequence = new VersionSequence(latestVersion);
            versionId = sequence.next().getName();
        }

        // TODO we maybe want to choose the version which is less than the 'name' if it was specified
        // e.g. if you create a version 1.1 then it should use 1.0 if there is already a 2.0
       
        String sourceId = null;
        if (parentVersion == null) {
            sourceId = latestVersion;
        } else {
            IllegalStateAssertion.assertTrue(profileService.hasVersion(parentVersion), "Cannot find parent version: " + parentVersion);
            sourceId = parentVersion;
        }
       
        Version targetVersion;
        if (sourceId != null) {
            Map<String, String> attributes = description != null ? Collections.singletonMap(Version.DESCRIPTION, description) : null;
            targetVersion = profileService.createVersionFrom(sourceId, versionId, attributes);
            System.out.println("Created version: " + versionId + " as copy of: " + sourceId);
        } else {
            VersionBuilder builder = VersionBuilder.Factory.create(versionId);
            if (description != null) {
                builder.addAttribute(Version.DESCRIPTION, description);
            }
            targetVersion = profileService.createVersion(builder.getVersion());
            System.out.println("Create version: " + versionId);
        }
       
        if (defaultVersion == Boolean.TRUE) {
            fabricService.setDefaultVersionId(targetVersion.getId());
View Full Code Here

Examples of org.apache.maven.continuum.profile.ProfileService

        installation.setType( InstallationService.JDK_TYPE );
        installation.setName( "automaticJdk" );
        installation.setVarName( "automaticvarName" );
        installation.setVarValue( "automaticvarValue" );
        installation = getInstallationService().add( installation, true );
        ProfileService profileService = (ProfileService) lookup( ProfileService.ROLE, "default" );
        List<Profile> profiles = profileService.getAllProfiles();
        assertEquals( 1, profiles.size() );
        Profile profile = (Profile) profiles.get( 0 );
        assertEquals( "automaticJdk", profile.getName() );
        Installation jdk = profile.getJdk();
        assertNotNull( jdk );
View Full Code Here

Examples of org.beangle.struts2.convention.route.ProfileService

@Test
public class SmartActionConfigBuilderTest {

  public void test21() {
    ActionBuilder actionNameBuilder = new DefaultActionBuilder();
    ProfileService profileService = new ProfileServiceImpl();
    actionNameBuilder.setProfileService(profileService);

    ObjectFactory of = new ObjectFactory();
    final DummyContainer mockContainer = new DummyContainer();
    Configuration configuration = new DefaultConfiguration() {
View Full Code Here

Examples of org.jboss.profileservice.spi.ProfileService

                InitialContext ic  = new InitialContext(env);
               
                try {
                  return (ProfileService)ic.lookup(PROFILE_SERVICE_JNDI_NAME);
                } catch(NamingException e) {
                  ProfileService ps =  (ProfileService)ic.lookup(SECURE_PROFILE_SERVICE_JNDI_NAME);
                  return (ProfileService)Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] {ProfileService.class}, new JaasSecurityHandler(ps, this.userName, this.password));
                }
          } catch(NamingException e) {
            throw new AdminComponentException(e);
          } finally {
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.