Package org.platformlayer.federation

Examples of org.platformlayer.federation.FederationMap$Rule


            String segment = currTextSegment.toString();
            List<Rule> parentMatches = getMatches().peek();
            int len = parentMatches.size();
            for ( int i = 0; i < len; ++i )
            {
                Rule r = parentMatches.get( i );
                if ( r instanceof TextSegmentHandler )
                {
                    TextSegmentHandler h = (TextSegmentHandler) r;
                    try
                    {
View Full Code Here


    {

        @Override
        protected void configure()
        {
            forPattern( "bar" ).addRule( new Rule()
            {

                @Override
                public void body( String namespace, String name, String text )
                    throws Exception
View Full Code Here

            Log log = getDigester().getLogger();
            boolean debug = log.isDebugEnabled();
            for ( int i = 0; i < rules.size(); i++ )
            {
                int j = ( rules.size() - i ) - 1;
                Rule rule = rules.get( j );
                if ( debug )
                {
                    log.debug( "  Fire end() for " + rule );
                }
                try
                {
                    rule.end( namespaceURI, name );
                }
                catch ( Exception e )
                {
                    throw getDigester().createSAXException( e );
                }
View Full Code Here

    TypedPlatformLayerClient defaultClient = buildClient(runAsProject);

    FederationConfiguration federationMapConfig = FederatedPlatformLayerClient
        .buildFederationConfiguration(defaultClient);

    FederationMap federationMap = new FederationMap(httpStrategy, mapper, federationMapConfig);

    if (multitenant != null) {
      ProjectAuthorization localProject = projectAuthz; // .getProject();
      TypedPlatformLayerClient localClient = buildClient(localProject);

      FederationKey host = FederationKey.LOCAL;
      ProjectId project = localClient.getProject();
      FederationMapping mapKey = new FederationMapping(host, project);

      federationMap.addMapping(mapKey, localClient);

      for (PlatformLayerKey mappedService : multitenant.getMappedItems()) {
        FederationMap.Rule rule = new FederationMap.Rule();
        rule.mappedItems = mappedService;
        rule.targetKey = mapKey;
        federationMap.addRule(rule);
      }
    }

    ProjectId runAsProjectId = new ProjectId(runAsProject.getName());

    PlatformLayerClient platformLayerClient;
    if (federationMap.isEmpty()) {
      platformLayerClient = defaultClient;
    } else {
      federationMap.addDefault(defaultClient);

      platformLayerClient = FederatedPlatformLayerClient.build(runAsProjectId, federationMap);
    }

    ServiceConfiguration serviceConfiguration = new ServiceConfiguration(runAsProjectId, serviceType);
View Full Code Here

   */
  public String graph() throws Exception {
    StringBuffer text = new StringBuffer();
   
    text.append("digraph M5Tree {\n");
    Rule temp = (Rule)m_ruleSet.elementAt(0);
    temp.topOfTree().graph(text);
    text.append("}\n");
    return text.toString();
  }
View Full Code Here

TOP

Related Classes of org.platformlayer.federation.FederationMap$Rule

Copyright © 2018 www.massapicom. 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.