Creates a new {@link FacebookPrivacyDialogFragment} instance.

@param albumName      the name of the album to share to.
@param albumGraphPath the graph path of the album to share to.
@return the new {@link FacebookPrivacyDialogFragment} instance.
168622
public static FacebookPrivacyDialogFragment newInstance(String albumName, String albumGraphPath) {
        FacebookPrivacyDialogFragment fragment = new FacebookPrivacyDialogFragment();

        Bundle args = new Bundle();
        args.putString(FRAGMENT_BUNDLE_KEY_ALBUM_NAME, albumName);
        args.putString(FRAGMENT_BUNDLE_KEY_ALBUM_GRAPH_PATH, albumGraphPath);
        fragment.setArguments(args);

        return fragment;
    }
479898
public function renameEventAlbum($albumId, $albumName)
    {
        if (is_null($albumId) || $albumId == '') {
            throw new Exception('The albumId is required to rename an album.');
        }

        if (is_null($albumName) || $albumName == '') {
            throw new Exception('The albumName is required to create a new album.');
        }

        $params = array(
            'method' => 'sp.album.rename',
            'album_id' => $albumId,
            'album_name' => $albumName
        );

        return $this->_makeApiRequest($params);
    }
1062767
public static CmsEditExternalLinkDialog showNewLinkDialog(CmsListInfoBean typeInfo, String parentFolderPath) {

        CmsEditExternalLinkDialog dialog = new CmsEditExternalLinkDialog(typeInfo, parentFolderPath);
        dialog.center();
        return dialog;
    }
1345553
private void populateGraph(final EntityGraph<?> graph, final Set<String> fetches)
	{
		Map<String, Subgraph<?>> created = new HashMap<>();

		for (String fetch : fetches)
		{
			final String[] parts = StringUtils.split(fetch, '.');

			// Starts of null (meaning parent is the root graph), updated as we go through path segments to refer to the last path segment
			Subgraph<?> parent = null;

			// Iterate over the path segments, adding attributes subgraphs
			for (int i = 0; i < parts.length; i++)
			{
				final String path = StringUtils.join(parts, '.', 0, i + 1);
				final boolean isLeaf = (i == parts.length - 1);

				final Subgraph<?> existing = created.get(path);

				if (existing == null)
				{
					if (parent == null)
					{
						try
						{
							// Relation under root
							graph.addAttributeNodes(parts[i]);

							// Only set up a subgraph if this is not a leaf node
							// This prevents us trying to add a Subgraph for a List of Embeddable
							if (!isLeaf)
								parent = graph.addSubgraph(parts[i]);
						}
						catch (IllegalArgumentException e)
						{
							throw new IllegalArgumentException("Error adding graph member " +
							                                   parts[i] +
							                                   " with isLeaf=" +
							                                   isLeaf +
							                                   " to root as part of " +
							                                   fetch, e);
						}
					}
					else
					{
						try
						{
							// Relation under parent
							parent.addAttributeNodes(parts[i]);

							// Only set up a subgraph if this is not a leaf node
							// This prevents us trying to add a Subgraph for a List of Embeddable
							if (!isLeaf)
								parent = parent.addSubgraph(parts[i]);
						}
						catch (IllegalArgumentException e)
						{
							throw new IllegalArgumentException("Error adding graph member " +
							                                   parts[i] +
							                                   " with isLeaf=" +
							                                   isLeaf +
							                                   " as part of " +
							                                   fetch +
							                                   " with parent.class=" +
							                                   parent.getClassType(), e);
						}
					}

					if (!isLeaf)
						created.put(path, parent);
				}
				else
				{
					// Already seen this graph node before
					parent = existing;
				}
			}
		}
	}
29356
protected function createGraphForNamespace($full_namespace_name, $label)
    {
        return GraphVizGraph::create('cluster_' . $full_namespace_name)
            ->setLabel($label)
            ->setStyle('rounded')
            ->setColor('gray')
            ->setFontColor('gray')
            ->setFontSize('11')
            ->setRankDir('LR');
    }
294300
@Override
  public void enterGraph(GDLParser.GraphContext graphContext) {
    inGraph = true;
    String variable = getVariable(graphContext.header());
    Graph g;
    if (variable != null && userGraphCache.containsKey(variable)) {
      g = userGraphCache.get(variable);
    } else {
      g = initNewGraph(graphContext);

      if (variable != null) {
        userGraphCache.put(variable, g);
      } else {
        variable = String.format(ANONYMOUS_GRAPH_VARIABLE, g.getId());
        autoGraphCache.put(variable, g);
      }
      g.setVariable(variable);
      graphs.add(g);
    }
    currentGraphId = g.getId();
  }
829118
public FacebookPage addInstagramUser(String username) {
        ResourceParams parameterSet = newResourceParams();
        parameterSet.set("id", username);
        parameterSet.set("type", "instagram_user");
        return this;
    }
450299
public ApiResponse createGroup(String groupPath, String groupTitle, String groupName){
        Map<String, Object> data = new HashMap<String, Object>();
        data.put("type", "group");
        data.put("path", groupPath);
        
        if (groupTitle != null) {
            data.put("title", groupTitle);
        }
        
        if(groupName != null){
            data.put("name", groupName);
        }
        
        return apiRequest(HttpMethod.POST, null, data,  organizationId, applicationId, "groups");
    }
206155
public T photos_upload(File photo)
    throws FacebookException, IOException {
    return photos_upload(photo, /*caption*/ null, /*albumId*/ null) ;
  }
40272
public static MvcGraph graph() {
        if (graph == null) {
            graph = new MvcGraph();

            try {
                graph.getRootComponent().register(new Object() {
                    @Provides
                    @EventBusC
                    public EventBus eventBusC() {
                        return new EventBusImpl();
                    }

                    @Provides
                    @EventBusV
                    public EventBus eventBusV() {
                        return new EventBusImpl() {
                            @Override
                            public void post(final Object event) {
                                if (graph.uiThreadRunner.isOnUiThread()) {
                                    postEvent(event);
                                } else {
                                    graph.uiThreadRunner.post(new Runnable() {
                                        @Override
                                        public void run() {
                                            postEvent(event);
                                        }
                                    });
                                }
                            }

                            private void postEvent(Object event) {
                                super.post(event);
                            }
                        };
                    }

                    @Provides
                    public ExecutorService executorService() {
                        return Executors.newFixedThreadPool(10, new ThreadFactory() {
                            @Override
                            public Thread newThread(final Runnable r) {
                                return new Thread(new Runnable() {
                                    @Override
                                    public void run() {
                                        Thread.currentThread().setPriority(Thread.NORM_PRIORITY - 1);
                                        r.run();
                                    }
                                }, "MvcBackgroundThread");
                            }
                        });
                    }
                });
            } catch (ProvideException e) {
                throw new MvcGraphException("Failed to register base Mvc dependencies", e);
            } catch (ProviderConflictException e) {
                throw new MvcGraphException("Failed to register base Mvc dependencies", e);
            }
        }
        return graph;
    }
1270824
@MemberOrder(sequence = "2")
    public ExampleTaggableEntity create(
            final @ParameterLayout(named="Name") String name,
            final @ParameterLayout(named="Brand") String brand,
            final @ParameterLayout(named="Sector") String sector) {
        final ExampleTaggableEntity obj = container.newTransientInstance(ExampleTaggableEntity.class);
        obj.setName(name);
        obj.setBrand(brand);
        obj.setSector(sector);
        container.persistIfNotAlready(obj);
        return obj;
    }
371051
@Override
    public Resource createRelative(String relativePath) {
        String pathToUse = ResourceUtils.applyRelativePath(path, relativePath);
        return new FileSystemResource(pathToUse);
    }
507134
public static PlaceholderFragment newInstance(int sectionNumber, @LayoutRes int layoutRes) {
        PlaceholderFragment fragment = new PlaceholderFragment();
        Bundle args = new Bundle();
        args.putInt(ARG_SECTION_NUMBER, sectionNumber);
        args.putInt(ARG_LAYOUT_RESOURCE, layoutRes);
        fragment.setArguments(args);
        return fragment;
    }
1244161
private void handlePhotoPrivacySelection(int photoPrivacyIndex, String albumName, String albumGraphPath) {
        FacebookSettingsActivity activity = (FacebookSettingsActivity) getActivity();
        if (activity != null && !activity.isFinishing()) {
            // Convert privacy index to privacy setting to store.
            String[] privacyArray = getResources().getStringArray(R.array.wings_facebook_privacy__privacies);
            String privacyString = privacyArray[photoPrivacyIndex];

            String photoPrivacy = null;
            if (getString(R.string.wings_facebook__privacy__photo_privacy_self).equals(privacyString)) {
                photoPrivacy = FacebookEndpoint.PHOTO_PRIVACY_SELF;
            } else if (getString(R.string.wings_facebook__privacy__photo_privacy_friends).equals(privacyString)) {
                photoPrivacy = FacebookEndpoint.PHOTO_PRIVACY_FRIENDS;
            } else if (getString(R.string.wings_facebook__privacy__photo_privacy_friends_of_friends).equals(privacyString)) {
                photoPrivacy = FacebookEndpoint.PHOTO_PRIVACY_FRIENDS_OF_FRIENDS;
            } else if (getString(R.string.wings_facebook__privacy__photo_privacy_everyone).equals(privacyString)) {
                photoPrivacy = FacebookEndpoint.PHOTO_PRIVACY_EVERYONE;
            }

            // Set Facebook settings.
            if (photoPrivacy != null && photoPrivacy.length() > 0 && albumName != null && albumName.length() > 0
                    && albumGraphPath != null && albumGraphPath.length() > 0) {
                activity.mDestinationId = FacebookEndpoint.DestinationId.PROFILE;
                activity.mPhotoPrivacy = photoPrivacy;
                activity.mAlbumName = albumName;
                activity.mAlbumGraphPath = albumGraphPath;
            } else {
                activity.mHasErrorOccurred = true;
            }

            // Finish activity.
            activity.tryFinish();
        }
    }
656986
public Resource createRelative(String relativePath) {
        if (relativePath.startsWith("/")) {
            relativePath = relativePath.substring(1);
        }
        try {
            return new UrlResource(new URL(url, relativePath));
        } catch (MalformedURLException e) {
            return null;
        }
    }
410113
public function getAlbumPhotos($albumId, $page = 1)
    {
        if (is_null($albumId) || $albumId == '') {
            throw new Exception('The albumId is required to get the list of photos in the album.');
        }

        $params = array(
            'method' => 'sp.album.get_photos',
            'album_id' => $albumId,
            'page' => $page
        );

        return $this->_makeApiRequest($params);
    }
501680
protected ProducerRecord<Object, Object> createKafkaMessage(Object pRequestString, Map<String, String> headers) {
        if (headers == null)
            recordProps = getRecordProps();
        else {
            recordProps = new Properties();
            recordProps.putAll(headers);
            String partition = (String)recordProps.get(RECORD_PARTITION);
            Integer partitionInt = new Integer(partition);
            recordProps.replace(RECORD_PARTITION, partitionInt);
        }
        return  new ProducerRecord<>((String)recordProps.get(KAFKA_TOPIC_NAME), (Integer)recordProps.get(RECORD_PARTITION), recordProps.get(RECORD_KEY), pRequestString);
    }