Package com.jidesoft.icons

Examples of com.jidesoft.icons.JideIconsFactory$FileType


        }

        // Decode and normalise the path
        UriParser.canonicalizePath(name, 0, name.length(), this);
        UriParser.fixSeparators(name);
        final FileType fileType = UriParser.normalisePath(name);
        final String path = name.toString();

        return new LayeredFileName(scheme, rootUri, path, fileType);
    }
View Full Code Here


        final String queryString = UriParser.extractQueryString(name);

        // Decode and normalise the file name
        UriParser.canonicalizePath(name, 0, name.length(), this);
        UriParser.fixSeparators(name);
        final FileType fileType = UriParser.normalisePath(name);
        final String path = name.toString();

        return new URLFileName(
            auth.getScheme(),
            auth.getHostName(),
View Full Code Here

     * @param type The FileType.
     * @throws Exception if an error occurs.
     */
    public void attachChild(final FileName baseName, final FileType type) throws Exception
    {
        final FileType oldType = doGetType();
        if (children.add(baseName.getBaseName()))
        {
            childrenChanged(baseName, type);
        }
        maybeTypeChanged(oldType);
View Full Code Here

     * @param file The FileObject.
     * @throws Exception if an error occurs.
     */
    public void setFile(final FileObject file) throws Exception
    {
        final FileType oldType = doGetType();

        if (file != null)
        {
            WeakRefFileListener.installListener(file, this);
        }
View Full Code Here

     * @param oldType The old FileType.
     * @throws Exception if an error occurs.
     */
    private void maybeTypeChanged(final FileType oldType) throws Exception
    {
        final FileType newType = doGetType();
        if (oldType == FileType.IMAGINARY && newType != FileType.IMAGINARY)
        {
            handleCreate(newType);
        }
        else if (oldType != FileType.IMAGINARY && newType == FileType.IMAGINARY)
View Full Code Here

        // Normalize separators in the path
        UriParser.fixSeparators(name);

        // Normalise the path
        FileType fileType = UriParser.normalisePath(name);

        // Extract bucket name
        final String bucketName = UriParser.extractFirstElement(name);

        return new S3FileName(scheme, bucketName, name.toString(), fileType);
View Full Code Here

                {
                    String msg = "File Id [" + fileId + "] not found on the ReferencesSection";
                    throw new IdNotFoundException(msg);
                }

                FileType file = fileIdToFileType.get(fileId);
                final String filePath = file.getHref();
                final Long fileSize = file.getSize().longValue();

                String format = diskDescType.getFormat(); // XXX using the same format on the OVF
                // disk

                if (!diskIdToVSs.containsKey(diskId))
View Full Code Here

        // final String completPath = packRelPath +'/'+diskPath;
        // System.err.println(packRelPath);

        try
        {
            FileType fileRef =
                OVFReferenceUtils.createFileType("diskFile", diskPath,
                    BigInteger.valueOf(diskSize), null, null);
            OVFReferenceUtils.addFile(references, fileRef);

            DiskSectionType diskSection = createDiskSection(template);
View Full Code Here

        // all the disk files should be marked with "snapshot + OVF_BUNDLE_PATH_IDENTIFIER" + hRef
        // (packagePath relative)
        for (String diskFileId : diskFileIds)
        {
            FileType file;
            try
            {
                file = OVFReferenceUtils.getReferencedFile(envelope, diskFileId);
            }
            catch (IdNotFoundException e)
            {
                throw new AMException(AMError.TEMPLATE_BOUNDLE, String.format(
                    "The bundle [%s] can not be created because the "
                        + "referenced file Id [%s] is not found on the Envelope", snapshot,
                    diskFileId), e);
            }

            // TODO check hRef is 'packagePath' relative
            final String relativeBundleFileRef = snapshot + file.getHref();
            final String absoluteBundleFileRef = packagePath + relativeBundleFileRef;

            File bundleFile = new File(absoluteBundleFileRef);
            Long bundleFileSize;

            if (!bundleFile.exists() || bundleFile.isDirectory())
            {

                throw new AMException(AMError.TEMPLATE_BOUNDLE, String.format(
                    "The bundle [%s] can not be created because the "
                        + "referenced file on [%s] is not found", snapshot, absoluteBundleFileRef));
            }
            else
            {
                // actually exist
                bundleFileSize = bundleFile.length(); // Bytes

                file.setSize(BigInteger.valueOf(bundleFileSize));
                file.setHref(relativeBundleFileRef);
            }

            for (VirtualDiskDescType vDiskDesc : disks)
            {
                if (diskFileId.equalsIgnoreCase(vDiskDesc.getFileRef()))
View Full Code Here

        // all the disk files should be marked with "snapshot + OVF_BUNDLE_PATH_IDENTIFIER" + hRef
        // (packagePath relative)
        for (String diskFileId : diskFileIds)
        {
            FileType file;
            try
            {
                file = OVFReferenceUtils.getReferencedFile(envelope, diskFileId);
            }
            catch (IdNotFoundException e)
            {
                throw new AMException(AMError.PROMOTE_MASTER_OVF, String.format(
                    "The promote [%s] can not be created because the "
                        + "referenced file Id [%s] is not found on the Envelope", relativeDiskPath,
                    diskFileId), e);
            }

                file.setSize(diskSizeInBytes);
                file.setHref(relativeDiskPath);
        }

        return envelope;
    }
View Full Code Here

TOP

Related Classes of com.jidesoft.icons.JideIconsFactory$FileType

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.