Examples of Customization


Examples of org.gatein.mop.api.content.Customization

            return localizedString.getDefaultString();
        }
    }

    private static String getApplicationIconURL(ContentDefinition contentDef) {
        Customization customization = contentDef.getCustomization();
        if (customization != null) {
            ContentType type = customization.getType();
            String contentId = customization.getContentId();
            if (type == Portlet.CONTENT_TYPE) {
                String[] chunks = contentId.split("/");
                if (chunks.length == 2) {
                    return "/" + chunks[0] + "/skin/DefaultSkin/portletIcons/" + chunks[1] + ".png";
                }
View Full Code Here

Examples of org.gatein.mop.api.content.Customization

               UIWindow srcWindow = (UIWindow)srcChild;
               UIWindow dstWindow = (UIWindow)dstChild;
               Customization<?> customization = srcWindow.getCustomization();
               ContentType contentType = customization.getType();
               String contentId = customization.getContentId();
               Customization parent = customization.getParent();
               Customization dstParent = null;
               if (parent != null)
               {
                  WorkspaceCustomizationContext parentCtx = (WorkspaceCustomizationContext)parent.getContext();
                  String name = parentCtx.nameOf(parent);
                  if (parentCtx == srcPage)
                  {
                     dstParent = dstPage.getCustomizationContext().getCustomization(name);
                     if (dstParent == null)
                     {
                        Object state = parent.getVirtualState();
                        dstParent = dstPage.getCustomizationContext().customize(name, contentType, contentId, state);
                     }
                  }
                  if (dstParent != null)
                  {
                     Object state = customization.getState();
                     Customization dstCustomization = dstWindow.customize(dstParent);
                     dstCustomization.setState(state);
                  }
                  else
                  {
                     Object state = customization.getVirtualState();
                     dstWindow.customize(contentType, contentId, state);
View Full Code Here

Examples of org.skyscreamer.jsonassert.Customization

  private static final String CONSTANT_URI_REGEX_EXPECTED_JSON = "{d:{results:[{__metadata:{uri:X}}]}}";

  private void doTest(String jsonPath, String regex, String expectedJSON,
      String actualJSON) throws JSONException {
    JSONAssert.assertEquals(expectedJSON, actualJSON, new CustomComparator(
        JSONCompareMode.STRICT_ORDER, new Customization(jsonPath,
            new RegularExpressionValueMatcher<Object>(regex))));
  }
View Full Code Here

Examples of org.skyscreamer.jsonassert.Customization

    }

    @Test
    public void dynamicRegexMatchesStringAttributeInsideArrayWithNoArgConstructor() throws JSONException {
    JSONAssert.assertEquals("{d:{results:[{__metadata:{uri:\"http://localhost:80/Person\\\\('\\\\d+'\\\\)\"}}]}}", JSON_STRING_WITH_ARRAY, new CustomComparator(
        JSONCompareMode.STRICT_ORDER, new Customization(ARRAY_ELEMENT_PREFIX,
            new RegularExpressionValueMatcher<Object>())));
    }
View Full Code Here

Examples of org.skyscreamer.jsonassert.Customization

        this.customizations = Arrays.asList(customizations);
    }

    @Override
    public void compareValues(String prefix, Object expectedValue, Object actualValue, JSONCompareResult result) throws JSONException {
        Customization customization = getCustomization(prefix);
        if (customization != null) {
            try {
              if (!customization.matches(prefix, actualValue, expectedValue, result)) {
                    result.fail(prefix, expectedValue, actualValue);
                }
            }
            catch (ValueMatcherException e) {
                result.fail(prefix, e);
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.