Java String Index Of getUserGroupsFromImpex( final String impexContent, final int uidIndex)

Here you can find the source of getUserGroupsFromImpex( final String impexContent, final int uidIndex)

Description

get User Groups From Impex

License

Open Source License

Declaration

public static List<String> getUserGroupsFromImpex(
            final String impexContent, final int uidIndex) 

Method Source Code

//package com.java2s;
/*/* w w w  . j a  va2  s  .  co m*/
 * [y] hybris Platform
 *
 * Copyright (c) 2000-2014 hybris AG
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of hybris
 * ("Confidential Information"). You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the
 * license agreement you entered into with hybris.
 *
 *  
 */

import java.util.ArrayList;
import java.util.List;

public class Main {
    public static List<String> getUserGroupsFromImpex(
            final String impexContent, final int uidIndex) {

        final List<String> list = new ArrayList<String>();

        final String[] lines = impexContent.split("\n");

        int index = 0;

        while (!lines[index].trim().startsWith("INSERT_UPDATE UserGroup")) {
            index++;
        }

        while (++index < lines.length
                && lines[index].trim().startsWith(";")) {
            final String[] lineTockens = lines[index].split(";");
            list.add(lineTockens[uidIndex]);

        }

        return list;
    }
}

Related

  1. getOffspringStrings(int startIndex, String treeStr)
  2. getPDFEncodingIndex(String key)
  3. getReplaceIndexes(String input, int startIndex, Stack replaceStack)
  4. getStructValue(String struct, int index)
  5. getTabIndexes(String text)
  6. indexOf(final String str, final String searchString)
  7. indexOfClosingBracket(String text, int openingBracket)
  8. indexOfIgnoreCase(final String src, char c, int startIndex, int endIndex)
  9. indexOfIgnoreCase(String str, String substring)