Package com.starbase.starteam

Examples of com.starbase.starteam.Folder


     *                   if the root folder cannot be found in the repository
     */
    private final Folder configureRootStarteamFolder()
        throws BuildException
    {
        Folder starteamrootfolder = null;
        try {
            // no root local mapping has been specified.
            View snapshot = openView();

            // find the starteam folder specified to be the root of the
View Full Code Here


     */

    public final void execute() throws BuildException {
        try {

            Folder starteamrootfolder = configureRootStarteamFolder();

            // set the local folder.
            java.io.File localrootfolder =
                getLocalRootMapping(starteamrootfolder);

View Full Code Here

               
                log("adding " + localFile + " to UnmatchedFileMap",
                    Project.MSG_DEBUG);
   
                if (localFile.isDirectory()) {
                    this.put(localFile, new Folder( remoteFolder, fn, fn));
                }
                else {
                    com.starbase.starteam.File remoteFile =
                        new com.starbase.starteam.File(remoteFolder);
                    remoteFile.setName(fn);
View Full Code Here

     * @param v A view name from the specified project.
     * @param t An item type which is currently always "file".
     */
    protected void runType(Server s, com.starbase.starteam.Project p, View v, Type t) {
        // This is ugly; checking for the root folder.
        Folder f = v.getRootFolder();

        if (getFolderName() != null) {
            if (getFolderName().equals("\\") || getFolderName().equals("/")) {
                setFolderName(null);
            } else {
                f = StarTeamFinder.findFolder(v.getRootFolder(), getFolderName());
                assertTrue(null != f, "ERROR: " + getProjectName() + delim
                    + getViewName() + delim + v.getRootFolder() + delim
                    + getFolderName() + delim
                    + " does not exist.");
            }
        }

        if (getVerbose() && getFolderName() != null) {
            log("Found " + getProjectName() + delim + getViewName()
                + delim + getFolderName() + delim + "\n");
        }

        // For performance reasons, it is important to pre-fetch all the
        // properties we'll need for all the items we'll be searching.

        // We always display the ItemID (OBJECT_ID) and primary descriptor.
        int nProperties = 2;

        // We'll need this item type's primary descriptor.
        Property p1 = getPrimaryDescriptor(t);

        // Does this item type have a secondary descriptor?
        // If so, we'll need it.
        Property p2 = getSecondaryDescriptor(t);

        if (p2 != null) {
            nProperties++;
        }

        // Now, build an array of the property names.
        String[] strNames = new String[nProperties];
        int iProperty = 0;

        strNames[iProperty++] = s.getPropertyNames().OBJECT_ID;
        strNames[iProperty++] = p1.getName();
        if (p2 != null) {
            strNames[iProperty++] = p2.getName();
        }

        // Pre-fetch the item properties and cache them.
        f.populateNow(t.getName(), strNames, -1);

        // Now, search for items in the selected folder.
        runFolder(s, p, v, t, f, calcTargetFolder(v, f));

        // Free up the memory used by the cached items.
        f.discardItems(t.getName(), -1);
    }
View Full Code Here

                log("adding " + localFile + " to UnmatchedFileMap",
                    Project.MSG_DEBUG);

                if (localFile.isDirectory()) {
                    this.put(localFile, new Folder(remoteFolder, fn, fn));
                } else {
                    com.starbase.starteam.File remoteFile =
                        new com.starbase.starteam.File(remoteFolder);
                    remoteFile.setName(fn);
                    this.put(localFile, remoteFile);
View Full Code Here

                new CheckinMap().init(
                    targetFolder.getAbsoluteFile(), starteamFolder);


            for (int i = 0, size = foldersList.length; i < size; i++) {
                Folder stFolder = foldersList[i];
                java.io.File subfolder =
                    new java.io.File(targetFolder, stFolder.getName());

                ufm.removeControlledItem(subfolder);

                if (isRecursive()) {
                    visit(stFolder, subfolder);
View Full Code Here

                    remoteItem.update();

                    // once we find a folder that isn't in the repository,
                    // we know we can add it.
                    if (local.isDirectory()) {
                        Folder folder = (Folder) remoteItem;
                        log("Added uncontrolled folder "
                            + folder.getFolderHierarchy()
                            + " from " + local.getAbsoluteFile());
                        if (isRecursive()) {
                            UnmatchedFileMap submap =
                                new CheckinMap().init(local, folder);
                            submap.processUncontrolledItems();
View Full Code Here

                    Item remoteItem = (Item) this.get(local);

                    // once we find a folder that isn't in the repository,
                    // we know we can add it.
                    if (local.isDirectory()) {
                        Folder folder = (Folder) remoteItem;
                        if (isRecursive()) {
                            log("Listing uncontrolled folder "
                                + folder.getFolderHierarchy()
                                + " from " + local.getAbsoluteFile());
                            UnmatchedFileMap submap =
                                new UnmatchedListingMap().init(local, folder);
                            submap.processUncontrolledItems();
                        }
View Full Code Here

                    init(targetFolder.getAbsoluteFile(), starteamFolder);



            for (int i = 0; i < foldersList.length; i++) {
                Folder stFolder = foldersList[i];

                java.io.File subfolder =
                     new java.io.File(targetFolder, stFolder.getName());

                 ufm.removeControlledItem(subfolder);

                 if (isRecursive()) {
                         visit(stFolder, subfolder);
View Full Code Here

     * @exception BuildException
     *                   if the root folder cannot be found in the repository
     */
    private Folder configureRootStarteamFolder()
        throws BuildException {
        Folder starteamrootfolder = null;
        try {
            // no root local mapping has been specified.
            View snapshot = openView();

            // find the starteam folder specified to be the root of the
            // operation.  Throw if it can't be found.

            starteamrootfolder =
                    StarTeamFinder.findFolder(snapshot.getRootFolder(),
                            this.rootStarteamFolder);

            if (this.isPreloadFileInformation()) {
                PropertyNames pn = getServer().getPropertyNames();
                String[] props = new String[] {pn.FILE_NAME, pn.FILE_PATH,
                                               pn.FILE_STATUS, pn.MODIFIED_TIME,
                                               pn.FILE_FILE_TIME_AT_CHECKIN,
                                               pn.MODIFIED_USER_ID, pn.FILE_SIZE,
                                               pn.FILE_ENCODING};

                int depth = this.isRecursive() ? -1 : 0;
                starteamrootfolder.populateNow(getServer().getTypeNames().FILE,
                                                props, depth);
            }


        } catch (BuildException e) {
View Full Code Here

TOP

Related Classes of com.starbase.starteam.Folder

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.