Examples of names()


Examples of org.jboss.as.controller.persistence.ConfigurationPersister.SnapshotInfo.names()

        try {
            SnapshotInfo info = persister.listSnapshots();
            ModelNode result = context.getResult();
            result.get(ModelDescriptionConstants.DIRECTORY).set(info.getSnapshotDirectory());
            result.get(ModelDescriptionConstants.NAMES).setEmptyList();
            for (String name : info.names()) {
                result.get(ModelDescriptionConstants.NAMES).add(name);
            }
            context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER);
        } catch (Exception e) {
            throw new OperationFailedException(e.getMessage(), new ModelNode().set(e.getMessage()));
View Full Code Here

Examples of org.jgroups.annotations.DeprecatedProperty.names()

    public static void removeDeprecatedProperties(Object obj, Properties props) throws Exception {
        //traverse class hierarchy and find all deprecated properties
        for(Class<?> clazz=obj.getClass(); clazz != null; clazz=clazz.getSuperclass()) {
            if(clazz.isAnnotationPresent(DeprecatedProperty.class)) {
                DeprecatedProperty declaredAnnotation=clazz.getAnnotation(DeprecatedProperty.class);
                String[] deprecatedProperties=declaredAnnotation.names();
                for(String propertyName : deprecatedProperties) {
                    String propertyValue=props.getProperty(propertyName);
                    if(propertyValue != null) {
                        if(log.isWarnEnabled()) {
                            String name=obj instanceof Protocol? ((Protocol)obj).getName() : obj.getClass().getName();
View Full Code Here

Examples of org.jgroups.annotations.DeprecatedProperty.names()

    public static void removeDeprecatedProperties(Object obj, Map<String,String> props) throws Exception {
        //traverse class hierarchy and find all deprecated properties
        for(Class<?> clazz=obj.getClass(); clazz != null; clazz=clazz.getSuperclass()) {
            if(clazz.isAnnotationPresent(DeprecatedProperty.class)) {
                DeprecatedProperty declaredAnnotation=clazz.getAnnotation(DeprecatedProperty.class);
                String[] deprecatedProperties=declaredAnnotation.names();
                for(String propertyName : deprecatedProperties) {
                    String propertyValue=props.get(propertyName);
                    if(propertyValue != null) {
                        if(log.isWarnEnabled()) {
                            String name=obj instanceof Protocol? ((Protocol)obj).getName() : obj.getClass().getName();
View Full Code Here

Examples of org.json.JSONObject.names()

                return failureResultForStatusCode(responseStatus);

            JSONObject result = new JSONObject(get.getResponseBodyAsString());

            ResourceProxy resource = new ResourceProxy(path);
            JSONArray names = result.names();
            for (int i = 0; i < names.length(); i++) {
                String name = names.getString(i);
                Object object = result.get(name);
                if (object instanceof String) {
                    resource.addProperty(name, object);
View Full Code Here

Examples of org.json.JSONObject.names()

            final Set<String> keyNames = Repositories.getKeyNames(Article.ARTICLE);

            for (int i = 0; i < articles.length(); i++) {
                final JSONObject article = articles.getJSONObject(i);

                final JSONArray names = article.names();
                final Set<String> nameSet = CollectionUtils.<String>jsonArrayToSet(names);

                if (nameSet.removeAll(keyNames)) {
                    for (final String unusedName : nameSet) {
                        article.remove(unusedName);
View Full Code Here

Examples of org.json.JSONObject.names()

     */
    public boolean isSettingUserPref() {
        try {
            if (metadata_ != null) {
                JSONObject userPrefs = metadata_.getJSONObject(METADATA_USERPREFS);
                JSONArray names = userPrefs.names();
                int count = names.length();
                if (count > 0) {
                    for (int i = 0; i < count; i++) {
                        JSONObject o = (JSONObject) userPrefs.get(names.get(i).toString());
                        String prefType = o.optString(METADATA_USERPREFS_TYPE);
View Full Code Here

Examples of org.json.JSONObject.names()

            final Set<String> keyNames = Repositories.getKeyNames(Article.ARTICLE);
            for (int i = 0; i < articles.length(); i++) {
                final JSONObject article = articles.getJSONObject(i);

                final JSONArray names = article.names();
                final Set<String> nameSet = CollectionUtils.<String>jsonArrayToSet(names);

                if (nameSet.removeAll(keyNames)) {
                    for (final String unusedName : nameSet) {
                        article.remove(unusedName);
View Full Code Here

Examples of org.json.JSONObject.names()

            Asset<String> themeAsset = repository.loadAssetFromPath(profile.getRepositoryGlobalDir( uuid ) + "/" + THEME_NAME+THEME_EXT);

            JSONObject themesObject =  new JSONObject(themeAsset.getAssetContent());
            JSONObject themes = (JSONObject) themesObject.get("themes");
            for (int i = 0; i < themes.names().length(); i++) {
                themesStr += themes.names().getString(i) + ",";
            }
            if(themesStr.endsWith(",")) {
                themesStr = themesStr.substring(0, themesStr.length() - 1);
            }
View Full Code Here

Examples of org.nutz.dao.sql.VarIndex.names()

  public String toPreparedStatement() {
    String[] ss = _createSqlElements();

    // 填充参数
    VarIndex vIndex = literal.getParamIndexes();
    for (String name : vIndex.names()) {
      int[] is = vIndex.indexesOf(name);
      for (int i : is)
        ss[i] = "?";

    }
View Full Code Here

Examples of org.nutz.dao.sql.VarIndex.names()

   */
  private String[] _createSqlElements() {
    String[] ss = literal.stack.cloneChain();
    VarIndex vIndex = literal.getVarIndexes();
    VarSet vs = vars;
    for (String name : vIndex.names()) {
      int[] is = vIndex.indexesOf(name);
      Object obj = vs.get(name);
      for (int i : is)
        ss[i] = null == obj ? "" : obj.toString();
    }
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.